9 #ifndef LLVM_CLANG_AST_RAWCOMMENTLIST_H 10 #define LLVM_CLANG_AST_RAWCOMMENTLIST_H 15 #include "llvm/ADT/ArrayRef.h" 16 #include "llvm/ADT/DenseMap.h" 53 return Kind == RCK_Invalid;
57 return Kind == RCK_Merged;
75 return IsTrailingComment;
82 return IsAlmostTrailingComment;
87 return ((
Kind == RCK_OrdinaryBCPL) || (
Kind == RCK_OrdinaryC));
100 RawText = getRawTextSlow(SourceMgr);
113 return extractBriefText(Context);
147 mutable StringRef RawText;
148 mutable const char *BriefText;
150 mutable bool RawTextValid : 1;
151 mutable bool BriefTextValid : 1;
158 bool IsTrailingComment : 1;
159 bool IsAlmostTrailingComment : 1;
163 bool IsAlmostTrailingComment) :
165 IsAttached(
false), IsTrailingComment(IsTrailingComment),
166 IsAlmostTrailingComment(IsAlmostTrailingComment)
169 StringRef getRawTextSlow(
const SourceManager &SourceMgr)
const;
171 const char *extractBriefText(
const ASTContext &Context)
const;
189 return operator()(*LHS, *RHS);
200 llvm::BumpPtrAllocator &Allocator);
204 const std::map<unsigned, RawComment *> *getCommentsInFile(
FileID File)
const;
210 unsigned getCommentEndOffset(
RawComment *C)
const;
215 llvm::DenseMap<FileID, std::map<unsigned, RawComment *>> OrderedComments;
216 mutable llvm::DenseMap<RawComment *, unsigned> CommentBeginLine;
217 mutable llvm::DenseMap<RawComment *, unsigned> CommentEndOffset;
Defines the SourceManager interface.
Decl - This represents one declaration (or definition), e.g.
The l-value was an access to a declared entity or something equivalently strong, like the address of ...
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Concrete class used by the front-end to report problems and issues.
Comparison function object.
Encodes a location in the source.
An opaque identifier used by SourceManager which refers to a source file (MemoryBuffer) along with it...
static bool isInvalid(LocType Loc, bool *Invalid)
Dataflow Directional Tag Classes.
Reads an AST files chain containing the contents of a translation unit.
Defines the clang::SourceLocation class and associated facilities.
Writes an AST file containing the contents of a translation unit.
A trivial tuple used to represent a source range.
This class handles loading and caching of source files into memory.
Engages in a tight little dance with the lexer to efficiently preprocess tokens.