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;
54#define COMMENT(CLASS, PARENT) CLASS,
55#define COMMENT_RANGE(BASE, FIRST, LAST) \
56 First##BASE##Constant = FIRST, Last##BASE##Constant = LAST,
57#define LAST_COMMENT_RANGE(BASE, FIRST, LAST) \
58 First##BASE##Constant = FIRST, Last##BASE##Constant = LAST
59#define ABSTRACT_COMMENT(COMMENT)
60#include "clang/AST/CommentNodes.inc"
90 LLVM_PREFERRED_TYPE(
bool)
91 unsigned HasTrailingNewline : 1;
102 LLVM_PREFERRED_TYPE(
bool)
103 mutable unsigned IsWhitespaceValid : 1;
106 LLVM_PREFERRED_TYPE(
bool)
107 mutable unsigned IsWhitespace : 1;
118 unsigned RenderKind : 3;
133 LLVM_PREFERRED_TYPE(
bool)
134 unsigned IsMalformed : 1;
146 LLVM_PREFERRED_TYPE(
bool)
147 unsigned IsSelfClosing : 1;
158 LLVM_PREFERRED_TYPE(
bool)
159 mutable unsigned IsWhitespaceValid : 1;
162 LLVM_PREFERRED_TYPE(
bool)
163 mutable unsigned IsWhitespace : 1;
179 unsigned CommandMarker : 1;
192 unsigned Direction : 2;
195 LLVM_PREFERRED_TYPE(
bool)
196 unsigned IsDirectionExplicit : 1;
276 return C->getCommentKind() >=
277 CommentKind::FirstInlineContentCommentConstant &&
278 C->getCommentKind() <= CommentKind::LastInlineContentCommentConstant;
302 return C->getCommentKind() == CommentKind::TextComment;
321 bool isWhitespaceNoCache()
const;
352 return C->getCommentKind() == CommentKind::InlineCommandComment;
381 return Args[Idx].Text;
385 return Args[Idx].Range;
411 return C->getCommentKind() >= CommentKind::FirstHTMLTagCommentConstant &&
412 C->getCommentKind() <= CommentKind::LastHTMLTagCommentConstant;
471 LocBegin.getLocWithOffset(1),
472 LocBegin.getLocWithOffset(1 +
TagName.size())) {
477 return C->getCommentKind() == CommentKind::HTMLStartTagComment;
485 return Attributes.size();
489 return Attributes[Idx];
494 if (!Attrs.empty()) {
524 TagName, LocBegin.getLocWithOffset(2),
525 LocBegin.getLocWithOffset(2 +
TagName.size())) {}
528 return C->getCommentKind() == CommentKind::HTMLEndTagComment;
548 return C->getCommentKind() >=
549 CommentKind::FirstBlockContentCommentConstant &&
550 C->getCommentKind() <= CommentKind::LastBlockContentCommentConstant;
563 if (Content.empty()) {
572 Content.back()->getEndLoc()));
577 return C->getCommentKind() == CommentKind::ParagraphComment;
598 bool isWhitespaceNoCache()
const;
635 return C->getCommentKind() >=
636 CommentKind::FirstBlockCommandCommentConstant &&
637 C->getCommentKind() <= CommentKind::LastBlockCommandCommentConstant;
671 return Args[Idx].Text;
675 return Args[Idx].Range;
680 if (
Args.size() > 0) {
725 CommandID, CommandMarker),
733 return C->getCommentKind() == CommentKind::ParamCommandComment;
763 return Args[0].Range;
813 CommandID, CommandMarker) {}
816 return C->getCommentKind() == CommentKind::TParamCommandComment;
830 return Args[0].Range;
834 return !Position.empty();
839 return Position.size();
844 return Position[Depth];
848 Position = NewPosition;
860 LocBegin.getLocWithOffset(
Text.size())),
864 return C->getCommentKind() == CommentKind::VerbatimBlockLineComment;
894 return C->getCommentKind() == CommentKind::VerbatimBlockComment;
923 return Lines[LineIdx]->getText();
945 return C->getCommentKind() == CommentKind::VerbatimLineComment;
1038 LLVM_PREFERRED_TYPE(
bool)
1050 LLVM_PREFERRED_TYPE(
bool)
1056 LLVM_PREFERRED_TYPE(
bool)
1062 LLVM_PREFERRED_TYPE(
bool)
1066 LLVM_PREFERRED_TYPE(
bool)
1090 Blocks(Blocks), ThisDeclInfo(
D) {
1095 SourceRange(Blocks.front()->getBeginLoc(), Blocks.back()->getEndLoc()));
1100 return C->getCommentKind() == CommentKind::FullComment;
1117 ThisDeclInfo->
fill();
1118 return ThisDeclInfo;
enum clang::sema::@1712::IndirectLocalPathEntry::EntryKind Kind
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 ...
The JSON file list parser is used to communicate input to InstallAPI.