9#ifndef LLVM_CLANG_AST_RAWCOMMENTLIST_H
10#define LLVM_CLANG_AST_RAWCOMMENTLIST_H
14#include "llvm/ADT/ArrayRef.h"
15#include "llvm/ADT/DenseMap.h"
16#include "llvm/Support/Allocator.h"
24class DiagnosticsEngine;
77 return IsTrailingComment;
84 return IsAlmostTrailingComment;
102 RawText = getRawTextSlow(SourceMgr);
115 return extractBriefText(Context);
122 if (
Text.size() < 6 ||
Text[0] !=
'/')
126 return Text[1] !=
'/';
175 mutable StringRef RawText;
176 mutable const char *BriefText =
nullptr;
178 mutable bool RawTextValid : 1;
179 mutable bool BriefTextValid : 1;
186 bool IsTrailingComment : 1;
187 bool IsAlmostTrailingComment : 1;
191 bool IsAlmostTrailingComment) :
192 Range(SR), RawTextValid(
false), BriefTextValid(
false), Kind(K),
193 IsAttached(
false), IsTrailingComment(IsTrailingComment),
194 IsAlmostTrailingComment(IsAlmostTrailingComment)
197 StringRef getRawTextSlow(
const SourceManager &SourceMgr)
const;
199 const char *extractBriefText(
const ASTContext &Context)
const;
211 llvm::BumpPtrAllocator &Allocator);
220 unsigned Offset)
const;
226 llvm::DenseMap<FileID, std::map<unsigned, RawComment *>> OrderedComments;
227 mutable llvm::DenseMap<RawComment *, unsigned> CommentBeginLine;
228 mutable llvm::DenseMap<RawComment *, unsigned> CommentEndOffset;
Defines the clang::SourceLocation class and associated facilities.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Reads an AST files chain containing the contents of a translation unit.
Writes an AST file containing the contents of a translation unit.
Decl - This represents one declaration (or definition), e.g.
Concrete class used by the front-end to report problems and issues.
An opaque identifier used by SourceManager which refers to a source file (MemoryBuffer) along with it...
Engages in a tight little dance with the lexer to efficiently preprocess tokens.
Represents an unpacked "presumed" location which can be presented to the user.
Encodes a location in the source.
This class handles loading and caching of source files into memory.
A trivial tuple used to represent a source range.
SourceLocation getEnd() const
SourceLocation getBegin() const
@ Decl
The l-value was an access to a declared entity or something equivalently strong, like the address of ...
@ C
Languages that the frontend can parse and compile.