13#ifndef LLVM_CLANG_AST_COMMENT_H
14#define LLVM_CLANG_AST_COMMENT_H
20#include "llvm/ADT/ArrayRef.h"
21#include "llvm/ADT/StringRef.h"
26class TemplateParameterList;
75 unsigned HasTrailingNewline : 1;
85 mutable unsigned IsWhitespaceValid : 1;
88 mutable unsigned IsWhitespace : 1;
97 unsigned RenderKind : 3;
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"
252 return C->getCommentKind() >= FirstInlineContentCommentConstant &&
253 C->getCommentKind() <= LastInlineContentCommentConstant;
279 return C->getCommentKind() == TextCommentKind;
298 bool isWhitespaceNoCache()
const;
331 return C->getCommentKind() == InlineCommandCommentKind;
359 return Args[Idx].Text;
363 return Args[Idx].Range;
389 return C->getCommentKind() >= FirstHTMLTagCommentConstant &&
390 C->getCommentKind() <= LastHTMLTagCommentConstant;
449 LocBegin, LocBegin.getLocWithOffset(1 +
TagName.size()),
451 LocBegin.getLocWithOffset(1),
452 LocBegin.getLocWithOffset(1 +
TagName.size())) {
457 return C->getCommentKind() == HTMLStartTagCommentKind;
465 return Attributes.size();
469 return Attributes[Idx];
474 if (!Attrs.empty()) {
507 LocBegin.getLocWithOffset(2),
508 LocBegin.getLocWithOffset(2 +
TagName.size()))
512 return C->getCommentKind() == HTMLEndTagCommentKind;
532 return C->getCommentKind() >= FirstBlockContentCommentConstant &&
533 C->getCommentKind() <= LastBlockContentCommentConstant;
547 if (Content.empty()) {
556 Content.back()->getEndLoc()));
561 return C->getCommentKind() == ParagraphCommentKind;
582 bool isWhitespaceNoCache()
const;
621 return C->getCommentKind() >= FirstBlockCommandCommentConstant &&
622 C->getCommentKind() <= LastBlockCommandCommentConstant;
656 return Args[Idx].Text;
660 return Args[Idx].Range;
665 if (
Args.size() > 0) {
710 CommandID, CommandMarker),
717 return C->getCommentKind() == ParamCommandCommentKind;
752 return Args[0].Range;
808 return C->getCommentKind() == TParamCommandCommentKind;
822 return Args[0].Range;
826 return !Position.empty();
831 return Position.size();
836 return Position[Depth];
840 Position = NewPosition;
852 Comment(VerbatimBlockLineCommentKind,
854 LocBegin.getLocWithOffset(
Text.size())),
859 return C->getCommentKind() == VerbatimBlockLineCommentKind;
883 unsigned CommandID) :
885 LocBegin, LocEnd, CommandID,
890 return C->getCommentKind() == VerbatimBlockCommentKind;
919 return Lines[LineIdx]->getText();
946 return C->getCommentKind() == VerbatimLineCommentKind;
1084 Blocks(Blocks), ThisDeclInfo(D) {
1089 SourceRange(Blocks.front()->getBeginLoc(), Blocks.back()->getEndLoc()));
1094 return C->getCommentKind() == FullCommentKind;
1111 ThisDeclInfo->
fill();
1112 return ThisDeclInfo;
Defines the clang::SourceLocation class and associated facilities.
C Language Family Type Representation.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Attr - This represents one attribute.
Decl - This represents one declaration (or definition), e.g.
A (possibly-)qualified type.
bool isNull() const
Return true if this QualType doesn't point to a type yet.
Encodes a location in the source.
bool isValid() const
Return true if this is a valid SourceLocation object.
SourceLocation getLocWithOffset(IntTy Offset) const
Return a source location with the specified offset from this SourceLocation.
A trivial tuple used to represent a source range.
SourceLocation getEnd() const
SourceLocation getBegin() const
void setEnd(SourceLocation e)
Stores a list of template parameters for a TemplateDecl and its derived classes.
@ 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.