clang 22.0.0git
clang::RawCommentList Class Reference

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

Detailed Description

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.

Constructor & Destructor Documentation

◆ RawCommentList()

clang::RawCommentList::RawCommentList ( SourceManager & SourceMgr)
inline

Definition at line 214 of file RawCommentList.h.

Member Function Documentation

◆ addComment()

◆ empty()

bool RawCommentList::empty ( ) const

Definition at line 335 of file RawCommentList.cpp.

◆ getCommentBeginLine()

unsigned RawCommentList::getCommentBeginLine ( RawComment * C,
FileID File,
unsigned Offset ) const

Definition at line 337 of file RawCommentList.cpp.

References clang::C, clang::File, and clang::Line.

◆ getCommentEndOffset()

unsigned RawCommentList::getCommentEndOffset ( RawComment * C) const

Definition at line 347 of file RawCommentList.cpp.

References clang::C.

◆ getCommentsInFile()

const std::map< unsigned, RawComment * > * RawCommentList::getCommentsInFile ( FileID File) const
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 File.

Definition at line 327 of file RawCommentList.cpp.

References clang::File.

◆ ASTReader

friend class ASTReader
friend

Definition at line 236 of file RawCommentList.h.

References ASTReader.

Referenced by ASTReader.

◆ ASTWriter

friend class ASTWriter
friend

Definition at line 237 of file RawCommentList.h.

References ASTWriter.

Referenced by ASTWriter.


The documentation for this class was generated from the following files: