14 #ifndef LLVM_CLANG_AST_COMMENT_H
15 #define LLVM_CLANG_AST_COMMENT_H
21 #include "llvm/ADT/ArrayRef.h"
22 #include "llvm/ADT/StringRef.h"
27 class TemplateParameterList;
76 unsigned HasTrailingNewline : 1;
86 mutable unsigned IsWhitespaceValid : 1;
89 mutable unsigned IsWhitespace : 1;
98 unsigned RenderKind : 2;
110 unsigned IsMalformed : 1;
121 unsigned IsSelfClosing : 1;
131 mutable unsigned IsWhitespaceValid : 1;
134 mutable unsigned IsWhitespace : 1;
147 unsigned CommandMarker : 1;
158 unsigned Direction : 2;
161 unsigned IsDirectionExplicit : 1;
188 #define COMMENT(CLASS, PARENT) CLASS##Kind,
189 #define COMMENT_RANGE(BASE, FIRST, LAST) \
190 First##BASE##Constant=FIRST##Kind, Last##BASE##Constant=LAST##Kind,
191 #define LAST_COMMENT_RANGE(BASE, FIRST, LAST) \
192 First##BASE##Constant=FIRST##Kind, Last##BASE##Constant=LAST##Kind
193 #define ABSTRACT_COMMENT(COMMENT)
194 #include "clang/AST/CommentNodes.inc"
253 return C->
getCommentKind() >= FirstInlineContentCommentConstant &&
287 StringRef
getText() const LLVM_READONLY {
return Text; }
299 bool isWhitespaceNoCache()
const;
367 return Args[Idx].Text;
371 return Args[Idx].Range;
434 NameLocBegin(NameLocBegin), Name(Name),
442 NameLocBegin(NameLocBegin), Name(Name),
443 EqualsLoc(EqualsLoc),
444 ValueRange(ValueRange), Value(Value)
463 LocBegin, LocBegin.getLocWithOffset(1 + TagName.size()),
465 LocBegin.getLocWithOffset(1),
466 LocBegin.getLocWithOffset(1 + TagName.size())) {
479 return Attributes.size();
483 return Attributes[Idx];
488 if (!Attrs.empty()) {
521 LocBegin.getLocWithOffset(2),
522 LocBegin.getLocWithOffset(2 + TagName.size()))
561 if (Content.empty()) {
570 Content.back()->getLocEnd()));
596 bool isWhitespaceNoCache()
const;
679 return Args[Idx].Text;
683 return Args[Idx].Range;
688 if (
Args.size() > 0) {
733 CommandID, CommandMarker),
775 return Args[0].Range;
845 return Args[0].Range;
849 return !Position.empty();
854 return Position.size();
859 return Position[
Depth];
863 Position = NewPosition;
875 Comment(VerbatimBlockLineCommentKind,
877 LocBegin.getLocWithOffset(Text.size())),
906 unsigned CommandID) :
908 LocBegin, LocEnd, CommandID,
942 return Lines[LineIdx]->getText();
1104 Blocks(Blocks), ThisDeclInfo(D) {
1109 Blocks.back()->getLocEnd()));
1131 ThisDeclInfo->
fill();
1132 return ThisDeclInfo;
SourceLocation getEnd() const
A (possibly-)qualified type.
C Language Family Type Representation.
Stores a list of template parameters for a TemplateDecl and its derived classes.
class LLVM_ALIGNAS(8) DependentTemplateSpecializationType const IdentifierInfo * Name
Represents a template specialization type whose template cannot be resolved, e.g. ...
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
SourceLocation getLocWithOffset(int Offset) const
Return a source location with the specified offset from this SourceLocation.
Encodes a location in the source.
bool isValid() const
Return true if this is a valid SourceLocation object.
SourceLocation getBegin() const
Defines the clang::SourceLocation class and associated facilities.
void setEnd(SourceLocation e)
A trivial tuple used to represent a source range.
This class handles loading and caching of source files into memory.
Attr - This represents one attribute.