clang  6.0.0svn
Functions
RawCommentList.cpp File Reference
#include "clang/AST/RawCommentList.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Comment.h"
#include "clang/AST/CommentBriefParser.h"
#include "clang/AST/CommentCommandTraits.h"
#include "clang/AST/CommentLexer.h"
#include "clang/AST/CommentParser.h"
#include "clang/AST/CommentSema.h"
#include "clang/Basic/CharInfo.h"
#include "llvm/ADT/STLExtras.h"
Include dependency graph for RawCommentList.cpp:

Go to the source code of this file.

Functions

static bool onlyWhitespaceOnLineBefore (const char *Buffer, unsigned P)
 Determines whether there is only whitespace in Buffer between P and the previous line. More...
 
static bool isOrdinaryKind (RawComment::CommentKind K)
 Returns whether K is an ordinary comment kind. More...
 
static bool onlyWhitespaceBetween (SourceManager &SM, SourceLocation Loc1, SourceLocation Loc2, unsigned MaxNewlinesAllowed)
 

Function Documentation

◆ isOrdinaryKind()

static bool isOrdinaryKind ( RawComment::CommentKind  K)
static

Returns whether K is an ordinary comment kind.

Definition at line 104 of file RawCommentList.cpp.

References clang::RawComment::RCK_OrdinaryBCPL, and clang::RawComment::RCK_OrdinaryC.

Referenced by clang::RawComment::RawComment().

◆ onlyWhitespaceBetween()

static bool onlyWhitespaceBetween ( SourceManager SM,
SourceLocation  Loc1,
SourceLocation  Loc2,
unsigned  MaxNewlinesAllowed 
)
static

Definition at line 224 of file RawCommentList.cpp.

References clang::SourceManager::getDecomposedLoc().

◆ onlyWhitespaceOnLineBefore()

static bool onlyWhitespaceOnLineBefore ( const char *  Buffer,
unsigned  P 
)
static

Determines whether there is only whitespace in Buffer between P and the previous line.

Parameters
BufferThe buffer to search in.
PThe offset from the beginning of Buffer to start from.
Returns
true if all of the characters in Buffer ranging from the closest line-ending character before P (or the beginning of Buffer) to P - 1 are whitespace.

Definition at line 90 of file RawCommentList.cpp.