clang 20.0.0git
|
This class represents all comments included in the translation unit, sorted in order of appearance in the translation unit. More...
#include "clang/AST/RawCommentList.h"
Public Member Functions | |
RawCommentList (SourceManager &SourceMgr) | |
void | addComment (const RawComment &RC, const CommentOptions &CommentOpts, llvm::BumpPtrAllocator &Allocator) |
const std::map< unsigned, RawComment * > * | getCommentsInFile (FileID File) const |
bool | empty () const |
unsigned | getCommentBeginLine (RawComment *C, FileID File, unsigned Offset) const |
unsigned | getCommentEndOffset (RawComment *C) const |
Friends | |
class | ASTReader |
class | ASTWriter |
This class represents all comments included in the translation unit, sorted in order of appearance in the translation unit.
Definition at line 212 of file RawCommentList.h.
|
inline |
Definition at line 214 of file RawCommentList.h.
void RawCommentList::addComment | ( | const RawComment & | RC, |
const CommentOptions & | CommentOpts, | ||
llvm::BumpPtrAllocator & | Allocator | ||
) |
Definition at line 274 of file RawCommentList.cpp.
References empty(), clang::RawComment::getBeginLoc(), clang::SourceManager::getDecomposedLoc(), clang::RawComment::getEndLoc(), clang::RawComment::getKind(), clang::RawComment::isInvalid(), clang::RawComment::isOrdinary(), isOrdinaryKind(), clang::RawComment::isTrailingComment(), Loc, onlyWhitespaceBetween(), and clang::CommentOptions::ParseAllComments.
Referenced by clang::ASTContext::addComment().
bool RawCommentList::empty | ( | ) | const |
Definition at line 338 of file RawCommentList.cpp.
Referenced by addComment(), clang::ASTContext::attachCommentsToJustParsedDecls(), and clang::ASTContext::getRawCommentForDeclNoCache().
unsigned RawCommentList::getCommentBeginLine | ( | RawComment * | C, |
FileID | File, | ||
unsigned | Offset | ||
) | const |
Definition at line 340 of file RawCommentList.cpp.
References clang::C, clang::File, clang::SourceManager::getLineNumber(), and clang::Line.
Referenced by clang::ASTContext::getRawCommentForDeclNoCacheImpl().
unsigned RawCommentList::getCommentEndOffset | ( | RawComment * | C | ) | const |
Definition at line 350 of file RawCommentList.cpp.
References clang::C, and clang::SourceManager::getDecomposedLoc().
Referenced by clang::ASTContext::getRawCommentForDeclNoCacheImpl().
const std::map< unsigned, RawComment * > * RawCommentList::getCommentsInFile | ( | FileID | File | ) | const |
File
. Definition at line 330 of file RawCommentList.cpp.
References clang::File.
Referenced by clang::ASTContext::attachCommentsToJustParsedDecls(), and clang::ASTContext::getRawCommentForDeclNoCache().
|
friend |
Definition at line 236 of file RawCommentList.h.
|
friend |
Definition at line 237 of file RawCommentList.h.