class RawCommentList
Declaration
class RawCommentList { /* full declaration omitted */ };
Description
This class represents all comments included in the translation unit, sorted in order of appearance in the translation unit.
Declared at: clang/include/clang/AST/RawCommentList.h:195
Member Variables
- private clang::SourceManager& SourceMgr
- private llvm::DenseMap< FileID, std::map<unsigned int, RawComment*>> OrderedComments
- private llvm::DenseMap<RawComment*, unsigned int> CommentBeginLine
- private llvm::DenseMap<RawComment*, unsigned int> CommentEndOffset
Method Overview
- public RawCommentList(clang::SourceManager & SourceMgr)
- public void addComment(const clang::RawComment & RC, const clang::CommentOptions & CommentOpts, llvm::BumpPtrAllocator & Allocator)
- public bool empty() const
- public unsigned int getCommentBeginLine(clang::RawComment * C, clang::FileID File, unsigned int Offset) const
- public unsigned int getCommentEndOffset(clang::RawComment * C) const
- public const std::map<unsigned int, RawComment *> * getCommentsInFile(clang::FileID File) const
Methods
¶RawCommentList(clang::SourceManager& SourceMgr)
RawCommentList(clang::SourceManager& SourceMgr)
Declared at: clang/include/clang/AST/RawCommentList.h:197
Parameters
- clang::SourceManager& SourceMgr
¶void addComment(
const clang::RawComment& RC,
const clang::CommentOptions& CommentOpts,
llvm::BumpPtrAllocator& Allocator)
void addComment(
const clang::RawComment& RC,
const clang::CommentOptions& CommentOpts,
llvm::BumpPtrAllocator& Allocator)
Declared at: clang/include/clang/AST/RawCommentList.h:199
Parameters
- const clang::RawComment& RC
- const clang::CommentOptions& CommentOpts
- llvm::BumpPtrAllocator& Allocator
¶bool empty() const
bool empty() const
Declared at: clang/include/clang/AST/RawCommentList.h:206
¶unsigned int getCommentBeginLine(
clang::RawComment* C,
clang::FileID File,
unsigned int Offset) const
unsigned int getCommentBeginLine(
clang::RawComment* C,
clang::FileID File,
unsigned int Offset) const
Declared at: clang/include/clang/AST/RawCommentList.h:208
Parameters
- clang::RawComment* C
- clang::FileID File
- unsigned int Offset
¶unsigned int getCommentEndOffset(
clang::RawComment* C) const
unsigned int getCommentEndOffset(
clang::RawComment* C) const
Declared at: clang/include/clang/AST/RawCommentList.h:210
Parameters
¶const std::map<unsigned int, RawComment*>*
getCommentsInFile(clang::FileID File) const
const std::map<unsigned int, RawComment*>*
getCommentsInFile(clang::FileID File) const
Declared at: clang/include/clang/AST/RawCommentList.h:204
Parameters
- clang::FileID File
Returns
A mapping from an offset of the start of the comment to the comment itself, or nullptr in case there are no comments in \p File.