clang 19.0.0git
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 "llvm/ADT/StringExtras.h"
#include "llvm/Support/Allocator.h"

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.
 
static bool isOrdinaryKind (RawComment::CommentKind K)
 Returns whether K is an ordinary comment kind.
 
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 105 of file RawCommentList.cpp.

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

Referenced by clang::RawCommentList::addComment(), and clang::RawComment::RawComment().

◆ onlyWhitespaceBetween()

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

Definition at line 226 of file RawCommentList.cpp.

References clang::Invalid, and SM.

Referenced by clang::RawCommentList::addComment().

◆ 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 91 of file RawCommentList.cpp.

References clang::C, clang::isHorizontalWhitespace(), clang::isVerticalWhitespace(), and P.

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