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"
22#include "llvm/Support/Compiler.h"
27class TemplateParameterList;
55#define COMMENT(CLASS, PARENT) CLASS,
56#define COMMENT_RANGE(BASE, FIRST, LAST) \
57 First##BASE##Constant = FIRST, Last##BASE##Constant = LAST,
58#define LAST_COMMENT_RANGE(BASE, FIRST, LAST) \
59 First##BASE##Constant = FIRST, Last##BASE##Constant = LAST
60#define ABSTRACT_COMMENT(COMMENT)
61#include "clang/AST/CommentNodes.inc"
91 LLVM_PREFERRED_TYPE(
bool)
92 unsigned HasTrailingNewline : 1;
103 LLVM_PREFERRED_TYPE(
bool)
104 mutable unsigned IsWhitespaceValid : 1;
107 LLVM_PREFERRED_TYPE(
bool)
108 mutable unsigned IsWhitespace : 1;
119 unsigned RenderKind : 3;
127 unsigned CommandMarker : 1;
139 LLVM_PREFERRED_TYPE(
bool)
140 unsigned IsMalformed : 1;
152 LLVM_PREFERRED_TYPE(
bool)
153 unsigned IsSelfClosing : 1;
164 LLVM_PREFERRED_TYPE(
bool)
165 mutable unsigned IsWhitespaceValid : 1;
168 LLVM_PREFERRED_TYPE(
bool)
169 mutable unsigned IsWhitespace : 1;
185 unsigned CommandMarker : 1;
198 unsigned Direction : 2;
201 LLVM_PREFERRED_TYPE(
bool)
202 unsigned IsDirectionExplicit : 1;
282 return C->getCommentKind() >=
283 CommentKind::FirstInlineContentCommentConstant &&
284 C->getCommentKind() <= CommentKind::LastInlineContentCommentConstant;
308 return C->getCommentKind() == CommentKind::TextComment;
327 bool isWhitespaceNoCache()
const;
368 return C->getCommentKind() == CommentKind::InlineCommandComment;
397 return Args[Idx].Text;
401 return Args[Idx].Range;
432 return C->getCommentKind() >= CommentKind::FirstHTMLTagCommentConstant &&
433 C->getCommentKind() <= CommentKind::LastHTMLTagCommentConstant;
492 LocBegin.getLocWithOffset(1),
493 LocBegin.getLocWithOffset(1 +
TagName.size())) {
498 return C->getCommentKind() == CommentKind::HTMLStartTagComment;
506 return Attributes.size();
510 return Attributes[Idx];
515 if (!Attrs.empty()) {
545 TagName, LocBegin.getLocWithOffset(2),
546 LocBegin.getLocWithOffset(2 +
TagName.size())) {}
549 return C->getCommentKind() == CommentKind::HTMLEndTagComment;
569 return C->getCommentKind() >=
570 CommentKind::FirstBlockContentCommentConstant &&
571 C->getCommentKind() <= CommentKind::LastBlockContentCommentConstant;
584 if (Content.empty()) {
593 Content.back()->getEndLoc()));
598 return C->getCommentKind() == CommentKind::ParagraphComment;
619 bool isWhitespaceNoCache()
const;
656 return C->getCommentKind() >=
657 CommentKind::FirstBlockCommandCommentConstant &&
658 C->getCommentKind() <= CommentKind::LastBlockCommandCommentConstant;
692 return Args[Idx].Text;
696 return Args[Idx].Range;
701 if (
Args.size() > 0) {
746 CommandID, CommandMarker),
754 return C->getCommentKind() == CommentKind::ParamCommandComment;
784 return Args[0].Range;
834 CommandID, CommandMarker) {}
837 return C->getCommentKind() == CommentKind::TParamCommandComment;
851 return Args[0].Range;
855 return !Position.empty();
860 return Position.size();
865 return Position[Depth];
869 Position = NewPosition;
881 LocBegin.getLocWithOffset(
Text.size())),
885 return C->getCommentKind() == CommentKind::VerbatimBlockLineComment;
915 return C->getCommentKind() == CommentKind::VerbatimBlockComment;
944 return Lines[LineIdx]->getText();
966 return C->getCommentKind() == CommentKind::VerbatimLineComment;
1059 LLVM_PREFERRED_TYPE(
bool)
1071 LLVM_PREFERRED_TYPE(
bool)
1077 LLVM_PREFERRED_TYPE(
bool)
1083 LLVM_PREFERRED_TYPE(
bool)
1087 LLVM_PREFERRED_TYPE(
bool)
1111 Blocks(Blocks), ThisDeclInfo(
D) {
1116 SourceRange(Blocks.front()->getBeginLoc(), Blocks.back()->getEndLoc()));
1121 return C->getCommentKind() == CommentKind::FullComment;
1138 ThisDeclInfo->
fill();
1139 return ThisDeclInfo;
enum clang::sema::@1840::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.
std::variant< struct RequiresDecl, struct HeaderDecl, struct UmbrellaDirDecl, struct ModuleDecl, struct ExcludeDecl, struct ExportDecl, struct ExportAsDecl, struct ExternModuleDecl, struct UseDecl, struct LinkDecl, struct ConfigMacrosDecl, struct ConflictDecl > Decl
All declarations that can appear in a module declaration.
The JSON file list parser is used to communicate input to InstallAPI.