clang 10.0.0git

TextNodeDumper.h
Go to the documentation of this file.
1 //===--- TextNodeDumper.h - Printing of AST nodes -------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file implements AST dumping of components of individual AST nodes.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #ifndef LLVM_CLANG_AST_TEXTNODEDUMPER_H
14 #define LLVM_CLANG_AST_TEXTNODEDUMPER_H
15
16 #include "clang/AST/ASTContext.h"
17 #include "clang/AST/ASTDumperUtils.h"
18 #include "clang/AST/AttrVisitor.h"
19 #include "clang/AST/CommentCommandTraits.h"
20 #include "clang/AST/CommentVisitor.h"
21 #include "clang/AST/DeclVisitor.h"
22 #include "clang/AST/ExprCXX.h"
23 #include "clang/AST/StmtVisitor.h"
24 #include "clang/AST/TemplateArgumentVisitor.h"
25 #include "clang/AST/TypeVisitor.h"
26
27 namespace clang {
28
29 class TextTreeStructure {
30 raw_ostream &OS;
31 const bool ShowColors;
32
33 /// Pending[i] is an action to dump an entity at level i.
34 llvm::SmallVector<std::function<void(bool IsLastChild)>, 32> Pending;
35
36 /// Indicates whether we're at the top level.
37 bool TopLevel = true;
38
39 /// Indicates if we're handling the first child after entering a new depth.
40 bool FirstChild = true;
41
42 /// Prefix for currently-being-dumped entity.
43 std::string Prefix;
44
45 public:
46 /// Add a child of the current node. Calls DoAddChild without arguments
47 template <typename Fn> void AddChild(Fn DoAddChild) {
48 return AddChild("", DoAddChild);
49 }
50
51 /// Add a child of the current node with an optional label.
52 /// Calls DoAddChild without arguments.
53 template <typename Fn> void AddChild(StringRef Label, Fn DoAddChild) {
54 // If we're at the top level, there's nothing interesting to do; just
55 // run the dumper.
56 if (TopLevel) {
57 TopLevel = false;
58 DoAddChild();
59 while (!Pending.empty()) {
60 Pending.back()(true);
61 Pending.pop_back();
62 }
63 Prefix.clear();
64 OS << "\n";
65 TopLevel = true;
66 return;
67 }
68
69 // We need to capture an owning-string in the lambda because the lambda
70 // is invoked in a deferred manner.
71 std::string LabelStr = Label;
72 auto DumpWithIndent = [this, DoAddChild, LabelStr](bool IsLastChild) {
73 // Print out the appropriate tree structure and work out the prefix for
74 // children of this node. For instance:
75 //
76 // A Prefix = ""
77 // |-B Prefix = "| "
78 // | `-C Prefix = "| "
79 // `-D Prefix = " "
80 // |-E Prefix = " | "
81 // `-F Prefix = " "
82 // G Prefix = ""
83 //
84 // Note that the first level gets no prefix.
85 {
86 OS << '\n';
87 ColorScope Color(OS, ShowColors, IndentColor);
88 OS << Prefix << (IsLastChild ? '`' : '|') << '-';
89 if (!LabelStr.empty())
90 OS << LabelStr << ": ";
91
92 this->Prefix.push_back(IsLastChild ? ' ' : '|');
93 this->Prefix.push_back(' ');
94 }
95
96 FirstChild = true;
97 unsigned Depth = Pending.size();
98
99 DoAddChild();
100
101 // If any children are left, they're the last at their nesting level.
102 // Dump those ones out now.
103 while (Depth < Pending.size()) {
104 Pending.back()(true);
105 this->Pending.pop_back();
106 }
107
108 // Restore the old prefix.
109 this->Prefix.resize(Prefix.size() - 2);
110 };
111
112 if (FirstChild) {
113 Pending.push_back(std::move(DumpWithIndent));
114 } else {
115 Pending.back()(false);
116 Pending.back() = std::move(DumpWithIndent);
117 }
118 FirstChild = false;
119 }
120
121 TextTreeStructure(raw_ostream &OS, bool ShowColors)
122 : OS(OS), ShowColors(ShowColors) {}
123 };
124
125 class TextNodeDumper
126 : public TextTreeStructure,
127 public comments::ConstCommentVisitor<TextNodeDumper, void,
128 const comments::FullComment *>,
129 public ConstAttrVisitor<TextNodeDumper>,
130 public ConstTemplateArgumentVisitor<TextNodeDumper>,
131 public ConstStmtVisitor<TextNodeDumper>,
132 public TypeVisitor<TextNodeDumper>,
133 public ConstDeclVisitor<TextNodeDumper> {
134 raw_ostream &OS;
135 const bool ShowColors;
136
137 /// Keep track of the last location we print out so that we can
138 /// print out deltas from then on out.
139 const char *LastLocFilename = "";
140 unsigned LastLocLine = ~0U;
141
142 const SourceManager *SM;
143
144 /// The policy to use for printing; can be defaulted.
145 PrintingPolicy PrintPolicy;
146
147 const comments::CommandTraits *Traits;
148
149 const char *getCommandName(unsigned CommandID);
150
151 public:
152 TextNodeDumper(raw_ostream &OS, bool ShowColors, const SourceManager *SM,
153 const PrintingPolicy &PrintPolicy,
154 const comments::CommandTraits *Traits);
155
156 void Visit(const comments::Comment *C, const comments::FullComment *FC);
157
158 void Visit(const Attr *A);
159
160 void Visit(const TemplateArgument &TA, SourceRange R,
161 const Decl *From = nullptr, StringRef Label = {});
162
163 void Visit(const Stmt *Node);
164
165 void Visit(const Type *T);
166
167 void Visit(QualType T);
168
169 void Visit(const Decl *D);
170
171 void Visit(const CXXCtorInitializer *Init);
172
173 void Visit(const OMPClause *C);
174
175 void Visit(const BlockDecl::Capture &C);
176
177 void Visit(const GenericSelectionExpr::ConstAssociation &A);
178
179 void dumpPointer(const void *Ptr);
180 void dumpLocation(SourceLocation Loc);
181 void dumpSourceRange(SourceRange R);
182 void dumpBareType(QualType T, bool Desugar = true);
183 void dumpType(QualType T);
184 void dumpBareDeclRef(const Decl *D);
185 void dumpName(const NamedDecl *ND);
186 void dumpAccessSpecifier(AccessSpecifier AS);
187
188 void dumpDeclRef(const Decl *D, StringRef Label = {});
189
190 void visitTextComment(const comments::TextComment *C,
191 const comments::FullComment *);
192 void visitInlineCommandComment(const comments::InlineCommandComment *C,
193 const comments::FullComment *);
194 void visitHTMLStartTagComment(const comments::HTMLStartTagComment *C,
195 const comments::FullComment *);
196 void visitHTMLEndTagComment(const comments::HTMLEndTagComment *C,
197 const comments::FullComment *);
198 void visitBlockCommandComment(const comments::BlockCommandComment *C,
199 const comments::FullComment *);
200 void visitParamCommandComment(const comments::ParamCommandComment *C,
201 const comments::FullComment *FC);
202 void visitTParamCommandComment(const comments::TParamCommandComment *C,
203 const comments::FullComment *FC);
204 void visitVerbatimBlockComment(const comments::VerbatimBlockComment *C,
205 const comments::FullComment *);
206 void
207 visitVerbatimBlockLineComment(const comments::VerbatimBlockLineComment *C,
208 const comments::FullComment *);
209 void visitVerbatimLineComment(const comments::VerbatimLineComment *C,
210 const comments::FullComment *);
211
212 // Implements Visit methods for Attrs.
213 #include "clang/AST/AttrTextNodeDump.inc"
214
215 void VisitNullTemplateArgument(const TemplateArgument &TA);
216 void VisitTypeTemplateArgument(const TemplateArgument &TA);
217 void VisitDeclarationTemplateArgument(const TemplateArgument &TA);
218 void VisitNullPtrTemplateArgument(const TemplateArgument &TA);
219 void VisitIntegralTemplateArgument(const TemplateArgument &TA);
220 void VisitTemplateTemplateArgument(const TemplateArgument &TA);
221 void VisitTemplateExpansionTemplateArgument(const TemplateArgument &TA);
222 void VisitExpressionTemplateArgument(const TemplateArgument &TA);
223 void VisitPackTemplateArgument(const TemplateArgument &TA);
224
225 void VisitIfStmt(const IfStmt *Node);
226 void VisitSwitchStmt(const SwitchStmt *Node);
227 void VisitWhileStmt(const WhileStmt *Node);
228 void VisitLabelStmt(const LabelStmt *Node);
229 void VisitGotoStmt(const GotoStmt *Node);
230 void VisitCaseStmt(const CaseStmt *Node);
231 void VisitConstantExpr(const ConstantExpr *Node);
232 void VisitCallExpr(const CallExpr *Node);
233 void VisitCastExpr(const CastExpr *Node);
234 void VisitImplicitCastExpr(const ImplicitCastExpr *Node);
235 void VisitDeclRefExpr(const DeclRefExpr *Node);
236 void VisitPredefinedExpr(const PredefinedExpr *Node);
237 void VisitCharacterLiteral(const CharacterLiteral *Node);
238 void VisitIntegerLiteral(const IntegerLiteral *Node);
239 void VisitFixedPointLiteral(const FixedPointLiteral *Node);
240 void VisitFloatingLiteral(const FloatingLiteral *Node);
241 void VisitStringLiteral(const StringLiteral *Str);
242 void VisitInitListExpr(const InitListExpr *ILE);
243 void VisitGenericSelectionExpr(const GenericSelectionExpr *E);
244 void VisitUnaryOperator(const UnaryOperator *Node);
245 void VisitUnaryExprOrTypeTraitExpr(const UnaryExprOrTypeTraitExpr *Node);
246 void VisitMemberExpr(const MemberExpr *Node);
247 void VisitExtVectorElementExpr(const ExtVectorElementExpr *Node);
248 void VisitBinaryOperator(const BinaryOperator *Node);
249 void VisitCompoundAssignOperator(const CompoundAssignOperator *Node);
250 void VisitAddrLabelExpr(const AddrLabelExpr *Node);
251 void VisitCXXNamedCastExpr(const CXXNamedCastExpr *Node);
252 void VisitCXXBoolLiteralExpr(const CXXBoolLiteralExpr *Node);
253 void VisitCXXThisExpr(const CXXThisExpr *Node);
254 void VisitCXXFunctionalCastExpr(const CXXFunctionalCastExpr *Node);
255 void VisitCXXUnresolvedConstructExpr(const CXXUnresolvedConstructExpr *Node);
256 void VisitCXXConstructExpr(const CXXConstructExpr *Node);
257 void VisitCXXBindTemporaryExpr(const CXXBindTemporaryExpr *Node);
258 void VisitCXXNewExpr(const CXXNewExpr *Node);
259 void VisitCXXDeleteExpr(const CXXDeleteExpr *Node);
260 void VisitMaterializeTemporaryExpr(const MaterializeTemporaryExpr *Node);
261 void VisitExprWithCleanups(const ExprWithCleanups *Node);
262 void VisitUnresolvedLookupExpr(const UnresolvedLookupExpr *Node);
263 void VisitSizeOfPackExpr(const SizeOfPackExpr *Node);
264 void
265 VisitCXXDependentScopeMemberExpr(const CXXDependentScopeMemberExpr *Node);
266 void VisitObjCAtCatchStmt(const ObjCAtCatchStmt *Node);
267 void VisitObjCEncodeExpr(const ObjCEncodeExpr *Node);
268 void VisitObjCMessageExpr(const ObjCMessageExpr *Node);
269 void VisitObjCBoxedExpr(const ObjCBoxedExpr *Node);
270 void VisitObjCSelectorExpr(const ObjCSelectorExpr *Node);
271 void VisitObjCProtocolExpr(const ObjCProtocolExpr *Node);
272 void VisitObjCPropertyRefExpr(const ObjCPropertyRefExpr *Node);
273 void VisitObjCSubscriptRefExpr(const ObjCSubscriptRefExpr *Node);
274 void VisitObjCIvarRefExpr(const ObjCIvarRefExpr *Node);
275 void VisitObjCBoolLiteralExpr(const ObjCBoolLiteralExpr *Node);
276
277 void VisitRValueReferenceType(const ReferenceType *T);
278 void VisitArrayType(const ArrayType *T);
279 void VisitConstantArrayType(const ConstantArrayType *T);
280 void VisitVariableArrayType(const VariableArrayType *T);
281 void VisitDependentSizedArrayType(const DependentSizedArrayType *T);
282 void VisitDependentSizedExtVectorType(const DependentSizedExtVectorType *T);
283 void VisitVectorType(const VectorType *T);
284 void VisitFunctionType(const FunctionType *T);
285 void VisitFunctionProtoType(const FunctionProtoType *T);
286 void VisitUnresolvedUsingType(const UnresolvedUsingType *T);
287 void VisitTypedefType(const TypedefType *T);
288 void VisitUnaryTransformType(const UnaryTransformType *T);
289 void VisitTagType(const TagType *T);
290 void VisitTemplateTypeParmType(const TemplateTypeParmType *T);
291 void VisitAutoType(const AutoType *T);
292 void VisitTemplateSpecializationType(const TemplateSpecializationType *T);
293 void VisitInjectedClassNameType(const InjectedClassNameType *T);
294 void VisitObjCInterfaceType(const ObjCInterfaceType *T);
295 void VisitPackExpansionType(const PackExpansionType *T);
296
297 void VisitLabelDecl(const LabelDecl *D);
298 void VisitTypedefDecl(const TypedefDecl *D);
299 void VisitEnumDecl(const EnumDecl *D);
300 void VisitRecordDecl(const RecordDecl *D);
301 void VisitEnumConstantDecl(const EnumConstantDecl *D);
302 void VisitIndirectFieldDecl(const IndirectFieldDecl *D);
303 void VisitFunctionDecl(const FunctionDecl *D);
304 void VisitFieldDecl(const FieldDecl *D);
305 void VisitVarDecl(const VarDecl *D);
306 void VisitBindingDecl(const BindingDecl *D);
307 void VisitCapturedDecl(const CapturedDecl *D);
308 void VisitImportDecl(const ImportDecl *D);
309 void VisitPragmaCommentDecl(const PragmaCommentDecl *D);
310 void VisitPragmaDetectMismatchDecl(const PragmaDetectMismatchDecl *D);
311 void VisitOMPExecutableDirective(const OMPExecutableDirective *D);
312 void VisitOMPDeclareReductionDecl(const OMPDeclareReductionDecl *D);
313 void VisitOMPRequiresDecl(const OMPRequiresDecl *D);
314 void VisitOMPCapturedExprDecl(const OMPCapturedExprDecl *D);
315 void VisitNamespaceDecl(const NamespaceDecl *D);
316 void VisitUsingDirectiveDecl(const UsingDirectiveDecl *D);
317 void VisitNamespaceAliasDecl(const NamespaceAliasDecl *D);
318 void VisitTypeAliasDecl(const TypeAliasDecl *D);
319 void VisitTypeAliasTemplateDecl(const TypeAliasTemplateDecl *D);
320 void VisitCXXRecordDecl(const CXXRecordDecl *D);
321 void VisitFunctionTemplateDecl(const FunctionTemplateDecl *D);
322 void VisitClassTemplateDecl(const ClassTemplateDecl *D);
323 void VisitBuiltinTemplateDecl(const BuiltinTemplateDecl *D);
324 void VisitVarTemplateDecl(const VarTemplateDecl *D);
325 void VisitTemplateTypeParmDecl(const TemplateTypeParmDecl *D);
326 void VisitNonTypeTemplateParmDecl(const NonTypeTemplateParmDecl *D);
327 void VisitTemplateTemplateParmDecl(const TemplateTemplateParmDecl *D);
328 void VisitUsingDecl(const UsingDecl *D);
329 void VisitUnresolvedUsingTypenameDecl(const UnresolvedUsingTypenameDecl *D);
330 void VisitUnresolvedUsingValueDecl(const UnresolvedUsingValueDecl *D);
331 void VisitUsingShadowDecl(const UsingShadowDecl *D);
332 void VisitConstructorUsingShadowDecl(const ConstructorUsingShadowDecl *D);
333 void VisitLinkageSpecDecl(const LinkageSpecDecl *D);
334 void VisitAccessSpecDecl(const AccessSpecDecl *D);
335 void VisitFriendDecl(const FriendDecl *D);
336 void VisitObjCIvarDecl(const ObjCIvarDecl *D);
337 void VisitObjCMethodDecl(const ObjCMethodDecl *D);
338 void VisitObjCTypeParamDecl(const ObjCTypeParamDecl *D);
339 void VisitObjCCategoryDecl(const ObjCCategoryDecl *D);
340 void VisitObjCCategoryImplDecl(const ObjCCategoryImplDecl *D);
341 void VisitObjCProtocolDecl(const ObjCProtocolDecl *D);
342 void VisitObjCInterfaceDecl(const ObjCInterfaceDecl *D);
343 void VisitObjCImplementationDecl(const ObjCImplementationDecl *D);
344 void VisitObjCCompatibleAliasDecl(const ObjCCompatibleAliasDecl *D);
345 void VisitObjCPropertyDecl(const ObjCPropertyDecl *D);
346 void VisitObjCPropertyImplDecl(const ObjCPropertyImplDecl *D);
347 void VisitBlockDecl(const BlockDecl *D);
348 void VisitConceptDecl(const ConceptDecl *D);
349 void
350 VisitLifetimeExtendedTemporaryDecl(const LifetimeExtendedTemporaryDecl *D);
351 };
352
353 } // namespace clang
354
355 #endif // LLVM_CLANG_AST_TEXTNODEDUMPER_H
clang::ObjCPropertyRefExpr
ObjCPropertyRefExpr - A dot-syntax expression to access an ObjC property.
Definition: ExprObjC.h:614
ASTContext.h
Defines the clang::ASTContext interface.
clang::FunctionDecl
Represents a function declaration or definition.
Definition: Decl.h:1783
clang::BlockDecl::Capture
A class which contains all the information about a particular captured value.
Definition: Decl.h:4043
clang::UnresolvedUsingType
Represents the dependent type named by a dependently-scoped typename using declaration, e.g.
Definition: Type.h:4210
clang::QualType
A (possibly-)qualified type.
Definition: Type.h:654
TypeVisitor.h
clang::ConstStmtVisitor
ConstStmtVisitor - This class implements a simple visitor for Stmt subclasses.
Definition: StmtVisitor.h:193
clang::Stmt
Stmt - This represents one statement.
Definition: Stmt.h:66
clang::FunctionType
FunctionType - C99 6.7.5.3 - Function Declarators.
Definition: Type.h:3422
clang::IfStmt
IfStmt - This represents an if/then/else.
Definition: Stmt.h:1834
clang::TextTreeStructure
Definition: TextNodeDumper.h:29
clang::EnumConstantDecl
An instance of this object exists for each enum constant that is defined.
Definition: Decl.h:2941
clang::TypedefDecl
Represents the declaration of a typedef-name via the &#39;typedef&#39; type specifier.
Definition: Decl.h:3173
clang::Decl
Decl - This represents one declaration (or definition), e.g.
Definition: DeclBase.h:88
clang::UnresolvedLookupExpr
A reference to a name which we were able to look up during parsing but could not resolve to a specifi...
Definition: ExprCXX.h:3037
clang::AutoType
Represents a C++11 auto or C++14 decltype(auto) type, possibly constrained by a type-constraint.
Definition: Type.h:4874
clang::IntegerLiteral
Definition: Expr.h:1446
clang::Type
The base class of the type hierarchy.
Definition: Type.h:1450
clang::VarTemplateDecl
Declaration of a variable template.
Definition: DeclTemplate.h:3070
clang::ArrayType
Represents an array type, per C99 6.7.5.2 - Array Declarators.
Definition: Type.h:2889
clang::NamespaceDecl
Represent a C++ namespace.
Definition: Decl.h:497
clang::CXXConstructExpr
Represents a call to a C++ constructor.
Definition: ExprCXX.h:1422
clang::ObjCSubscriptRefExpr
ObjCSubscriptRefExpr - used for array and dictionary subscripting.
Definition: ExprObjC.h:845
clang::AccessSpecifier
AccessSpecifier
A C++ access specifier (public, private, protected), plus the special value "none" which means differ...
Definition: Specifiers.h:113
clang::MaterializeTemporaryExpr
Represents a prvalue temporary that is written into memory so that a reference can bind to it...
Definition: ExprCXX.h:4419
clang::PragmaCommentDecl
Represents a #pragma comment line.
Definition: Decl.h:114
TemplateArgumentVisitor.h
clang::FriendDecl
FriendDecl - Represents the declaration of a friend entity, which can be a function, a type, or a templated function or type.
Definition: DeclFriend.h:53
clang::VarDecl
Represents a variable declaration or definition.
Definition: Decl.h:820
clang::ObjCMethodDecl
ObjCMethodDecl - Represents an instance or class method declaration.
Definition: DeclObjC.h:138
clang::PrintingPolicy
Describes how types, statements, expressions, and declarations should be printed. ...
Definition: PrettyPrinter.h:47
clang::ExprWithCleanups
Represents an expression – generally a full-expression – that introduces cleanups to be run at the ...
Definition: ExprCXX.h:3306
ExprCXX.h
Defines the clang::Expr interface and subclasses for C++ expressions.
clang::BuiltinTemplateDecl
Represents the builtin template declaration which is used to implement __make_integer_seq and other b...
Definition: DeclTemplate.h:1763
clang::LabelStmt
LabelStmt - Represents a label, which has a substatement.
Definition: Stmt.h:1732
clang::RecordDecl
Represents a struct/union/class.
Definition: Decl.h:3748
clang::FieldDecl
Represents a member of a struct/union/class.
Definition: Decl.h:2729
clang::ConstAttrVisitor
A simple visitor class that helps create attribute visitors.
Definition: AttrVisitor.h:69
clang::TypeVisitor
An operation on a type.
Definition: TypeVisitor.h:64
clang::FixedPointLiteral
Definition: Expr.h:1489
clang::ExtVectorElementExpr
ExtVectorElementExpr - This represents access to specific elements of a vector, and may occur on the ...
Definition: Expr.h:5518
clang::AccessSpecDecl
Represents an access specifier followed by colon &#39;:&#39;.
Definition: DeclCXX.h:85
clang::TextNodeDumper
Definition: TextNodeDumper.h:125
clang::ObjCAtCatchStmt
Represents Objective-C&#39;s @catch statement.
Definition: StmtObjC.h:77
clang::comments::InlineCommandComment
A command with word-like arguments that is considered inline content.
Definition: Comment.h:299
clang::InitListExpr
Describes an C or C++ initializer list.
Definition: Expr.h:4403
clang::UsingDecl
Represents a C++ using-declaration.
Definition: DeclCXX.h:3369
clang::GenericSelectionExpr::ConstAssociation
AssociationTy< true > ConstAssociation
Definition: Expr.h:5394
clang::comments::VerbatimBlockLineComment
A line of text contained in a verbatim block.
Definition: Comment.h:865
clang::comments::TextComment
Plain text.
Definition: Comment.h:263
clang::comments::VerbatimLineComment
A verbatim line command.
Definition: Comment.h:945
clang::ConstTemplateArgumentVisitor
A simple visitor class that helps create template argument visitors.
Definition: TemplateArgumentVisitor.h:92
CommentCommandTraits.h
clang::BinaryOperator
A builtin binary operation expression such as "x + y" or "x <= y".
Definition: Expr.h:3434
clang::comments::Comment
Any part of the comment.
Definition: Comment.h:52
clang::CaseStmt
CaseStmt - Represent a case statement.
Definition: Stmt.h:1500
clang::CastExpr
CastExpr - Base class for type casts, including both implicit casts (ImplicitCastExpr) and explicit c...
Definition: Expr.h:3150
clang::ObjCProtocolDecl
Represents an Objective-C protocol declaration.
Definition: DeclObjC.h:2078
clang::CXXBindTemporaryExpr
Represents binding an expression to a temporary.
Definition: ExprCXX.h:1373
clang::CXXDependentScopeMemberExpr
Represents a C++ member access expression where the actual member referenced could not be resolved be...
Definition: ExprCXX.h:3511
clang::FloatingLiteral
Definition: Expr.h:1583
clang::CapturedDecl
Represents the body of a CapturedStmt, and serves as its DeclContext.
Definition: Decl.h:4226
clang::ObjCInterfaceDecl
Represents an ObjC class declaration.
Definition: DeclObjC.h:1186
clang::LinkageSpecDecl
Represents a linkage specification.
Definition: DeclCXX.h:2778
clang::BindingDecl
A binding in a decomposition declaration.
Definition: DeclCXX.h:3812
clang::DependentSizedExtVectorType
Represents an extended vector type where either the type or size is dependent.
Definition: Type.h:3195
clang::CXXThisExpr
Represents the this expression in C++.
Definition: ExprCXX.h:1097
clang::ObjCPropertyImplDecl
ObjCPropertyImplDecl - Represents implementation declaration of a property in a class or category imp...
Definition: DeclObjC.h:2773
clang::comments::VerbatimBlockComment
A verbatim block command (e.
Definition: Comment.h:893
clang::TypeAliasDecl
Represents the declaration of a typedef-name via a C++11 alias-declaration.
Definition: Decl.h:3193
clang::FunctionProtoType
Represents a prototype with parameter type info, e.g.
Definition: Type.h:3754
clang::UnaryExprOrTypeTraitExpr
UnaryExprOrTypeTraitExpr - expression with either a type or (unevaluated) expression operand...
Definition: Expr.h:2372
clang::ConstantExpr
ConstantExpr - An expression that occurs in a constant context and optionally the result of evaluatin...
Definition: Expr.h:978
clang::OMPRequiresDecl
This represents &#39;#pragma omp requires...&#39; directive.
Definition: DeclOpenMP.h:345
clang::DependentSizedArrayType
Represents an array type in C++ whose size is a value-dependent expression.
Definition: Type.h:3093
ASTDumperUtils.h
clang::ConstructorUsingShadowDecl
Represents a shadow constructor declaration introduced into a class by a C++11 using-declaration that...
Definition: DeclCXX.h:3263
clang::BlockDecl
Represents a block literal declaration, which is like an unnamed FunctionDecl.
Definition: Decl.h:4037
Label
std::string Label
Definition: UsingDeclarationsSorter.cpp:69
clang::TemplateTypeParmDecl
Declaration of a template type parameter.
Definition: DeclTemplate.h:1177
clang::TextTreeStructure::TextTreeStructure
TextTreeStructure(raw_ostream &OS, bool ShowColors)
Definition: TextNodeDumper.h:121
clang::comments::BlockCommandComment
A command that has zero or more word-like arguments (number of word-like arguments depends on command...
Definition: Comment.h:598
clang::ObjCSelectorExpr
ObjCSelectorExpr used for @selector in Objective-C.
Definition: ExprObjC.h:454
clang::SizeOfPackExpr
Represents an expression that computes the length of a parameter pack.
Definition: ExprCXX.h:4091
clang::NonTypeTemplateParmDecl
NonTypeTemplateParmDecl - Declares a non-type template parameter, e.g., "Size" in.
Definition: DeclTemplate.h:1383
DeclVisitor.h
Depth
int Depth
Definition: ASTDiff.cpp:190
clang::UnaryTransformType
A unary type transform, which is a type constructed from another.
Definition: Type.h:4413
StmtVisitor.h
clang::TypeAliasTemplateDecl
Declaration of an alias template.
Definition: DeclTemplate.h:2511
clang::ObjCMessageExpr
An expression that sends a message to the given Objective-C object or class.
Definition: ExprObjC.h:950
clang::UnaryOperator
UnaryOperator - This represents the unary-expression&#39;s (except sizeof and alignof), the postinc/postdec operators from postfix-expression, and various extensions.
Definition: Expr.h:2046
clang::VectorType
Represents a GCC generic vector type.
Definition: Type.h:3235
clang::comments::HTMLStartTagComment
An opening HTML tag with attributes.
Definition: Comment.h:415
clang::TemplateTemplateParmDecl
TemplateTemplateParmDecl - Declares a template template parameter, e.g., "T" in.
Definition: DeclTemplate.h:1600
Desugar
static QualType Desugar(ASTContext &Context, QualType QT, bool &ShouldAKA)
Definition: ASTDiagnostic.cpp:28
SM
const SourceManager & SM
Definition: Format.cpp:1685
CommentVisitor.h
clang::comments::CommandTraits
This class provides information about commands that can be used in comments.
Definition: CommentCommandTraits.h:127
clang::SourceLocation
Encodes a location in the source.
Definition: SourceLocation.h:86
clang::OMPDeclareReductionDecl
This represents &#39;#pragma omp declare reduction ...&#39; directive.
Definition: DeclOpenMP.h:102
clang::OMPCapturedExprDecl
Pseudo declaration for capturing expressions.
Definition: DeclOpenMP.h:312
clang::ObjCInterfaceType
Interfaces are the core concept in Objective-C for object oriented design.
Definition: Type.h:5894
clang::OMPExecutableDirective
This is a basic class for representing single OpenMP executable directive.
Definition: StmtOpenMP.h:33
clang::CXXNewExpr
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)"...
Definition: ExprCXX.h:2100
clang::LabelDecl
Represents the declaration of a label.
Definition: Decl.h:451
clang::UnresolvedUsingValueDecl
Represents a dependent using declaration which was not marked with typename.
Definition: DeclCXX.h:3588
clang::TextTreeStructure::AddChild
void AddChild(StringRef Label, Fn DoAddChild)
Add a child of the current node with an optional label.
Definition: TextNodeDumper.h:53
clang::ObjCCategoryDecl
ObjCCategoryDecl - Represents a category declaration.
Definition: DeclObjC.h:2294
clang::OMPClause
This is a basic class for representing single OpenMP clause.
Definition: OpenMPClause.h:51
clang::ObjCProtocolExpr
ObjCProtocolExpr used for protocol expression in Objective-C.
Definition: ExprObjC.h:503
llvm::SmallVector
Definition: LLVM.h:35
clang::ObjCPropertyDecl
Represents one property declaration in an Objective-C interface.
Definition: DeclObjC.h:741
clang::ImplicitCastExpr
ImplicitCastExpr - Allows us to explicitly represent implicit type conversions, which have no direct ...
Definition: Expr.h:3274
clang::CharacterLiteral
Definition: Expr.h:1530
clang::comments::HTMLEndTagComment
A closing HTML tag.
Definition: Comment.h:509
clang::ObjCBoxedExpr
ObjCBoxedExpr - used for generalized expression boxing.
Definition: ExprObjC.h:124
clang::ImportDecl
Describes a module import declaration, which makes the contents of the named module visible in the cu...
Definition: Decl.h:4331
clang::comments::TParamCommandComment
Doxygen \tparam command, describes a template parameter.
Definition: Comment.h:801
AttrVisitor.h
clang::InjectedClassNameType
The injected class name of a C++ class template or class template partial specialization.
Definition: Type.h:5133
clang::PackExpansionType
Represents a pack expansion of types.
Definition: Type.h:5511
clang::CompoundAssignOperator
CompoundAssignOperator - For compound assignments (e.g.
Definition: Expr.h:3654
clang::GenericSelectionExpr
Represents a C11 generic selection.
Definition: Expr.h:5234
clang::AddrLabelExpr
AddrLabelExpr - The GNU address of label extension, representing &&label.
Definition: Expr.h:3910
Node
ast_type_traits::DynTypedNode Node
Definition: ASTMatchFinder.cpp:60
clang::TemplateArgument
Represents a template argument.
Definition: TemplateBase.h:50
clang
Dataflow Directional Tag Classes.
Definition: CFGReachabilityAnalysis.h:21
clang::ConceptDecl
Definition: DeclTemplate.h:3226
clang::PredefinedExpr
[C99 6.4.2.2] - A predefined identifier such as func.
Definition: Expr.h:1903
clang::CXXDeleteExpr
Represents a delete expression for memory deallocation and destructor calls, e.g. ...
Definition: ExprCXX.h:2359
clang::IndentColor
static const TerminalColor IndentColor
Definition: ASTDumperUtils.h:82
clang::IndirectFieldDecl
Represents a field injected from an anonymous union/struct into the parent scope. ...
Definition: Decl.h:2980
clang::UnresolvedUsingTypenameDecl
Represents a dependent using declaration which was marked with typename.
Definition: DeclCXX.h:3684
clang::ObjCTypeParamDecl
Represents the declaration of an Objective-C type parameter.
Definition: DeclObjC.h:571
clang::EnumDecl
Represents an enum.
Definition: Decl.h:3481
clang::SwitchStmt
SwitchStmt - This represents a &#39;switch&#39; stmt.
Definition: Stmt.h:2043
clang::ObjCImplementationDecl
ObjCImplementationDecl - Represents a class definition - this is where method definitions are specifi...
Definition: DeclObjC.h:2566
clang::CXXCtorInitializer
Represents a C++ base or member initializer.
Definition: DeclCXX.h:2155
clang::ObjCEncodeExpr
ObjCEncodeExpr, used for @encode in Objective-C.
Definition: ExprObjC.h:407
clang::ReferenceType
Base for LValueReferenceType and RValueReferenceType.
Definition: Type.h:2750
clang::ObjCIvarRefExpr
ObjCIvarRefExpr - A reference to an ObjC instance variable.
Definition: ExprObjC.h:546
clang::CXXUnresolvedConstructExpr
Describes an explicit type conversion that uses functional notion but could not be resolved because o...
Definition: ExprCXX.h:3390
clang::GotoStmt
GotoStmt - This represents a direct goto.
Definition: Stmt.h:2481
clang::ColorScope
Definition: ASTDumperUtils.h:84
clang::MemberExpr
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
Definition: Expr.h:2836
clang::CXXRecordDecl
Represents a C++ struct/union/class.
Definition: DeclCXX.h:253
clang::CXXFunctionalCastExpr
Represents an explicit C++ type conversion that uses "functional" notation (C++ [expr.type.conv]).
Definition: ExprCXX.h:1688
clang::ObjCIvarDecl
ObjCIvarDecl - Represents an ObjC instance variable.
Definition: DeclObjC.h:1959
clang::WhileStmt
WhileStmt - This represents a &#39;while&#39; stmt.
Definition: Stmt.h:2226
clang::AttrSyntax::C
clang::ClassTemplateDecl
Declaration of a class template.
Definition: DeclTemplate.h:2238
clang::StringLiteral
StringLiteral - This represents a string literal expression, e.g.
Definition: Expr.h:1711
clang::LifetimeExtendedTemporaryDecl
Implicit declaration of a temporary that was materialized by a MaterializeTemporaryExpr and lifetime-...
Definition: DeclCXX.h:3075
clang::CallExpr
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
Definition: Expr.h:2546
clang::CXXNamedCastExpr
Abstract class common to all of the C++ "named"/"keyword" casts.
Definition: ExprCXX.h:353
clang::ObjCBoolLiteralExpr
ObjCBoolLiteralExpr - Objective-C Boolean Literal.
Definition: ExprObjC.h:85
clang::DeclRefExpr
A reference to a declared variable, function, enum, etc.
Definition: Expr.h:1171
clang::TemplateSpecializationType
Represents a type template specialization; the template must be a class template, a type alias templa...
Definition: Type.h:4996
clang::comments::ParamCommandComment
Doxygen \param command.
Definition: Comment.h:713
clang::TypedefType
Definition: Type.h:4240
clang::SourceRange
A trivial tuple used to represent a source range.
Definition: SourceLocation.h:207
clang::NamedDecl
This represents a decl that may have a name.
Definition: Decl.h:223
clang::TagType
Definition: Type.h:4471
clang::CXXBoolLiteralExpr
A boolean literal, per ([C++ lex.bool] Boolean literals).
Definition: ExprCXX.h:645
clang::TemplateTypeParmType
Definition: Type.h:4647
clang::VariableArrayType
Represents a C array with a specified size that is not an integer-constant-expression.
Definition: Type.h:3039
clang::NamespaceAliasDecl
Represents a C++ namespace alias.
Definition: DeclCXX.h:2967
clang::UsingDirectiveDecl
Represents C++ using-directive.
Definition: DeclCXX.h:2863
clang::comments::ConstCommentVisitor
Definition: CommentVisitor.h:62
clang::PragmaDetectMismatchDecl
Represents a #pragma detect_mismatch line.
Definition: Decl.h:148
clang::ConstDeclVisitor
A simple visitor class that helps create declaration visitors.
Definition: DeclVisitor.h:73
clang::ObjCCategoryImplDecl
ObjCCategoryImplDecl - An object of this class encapsulates a category @implementation declaration...
Definition: DeclObjC.h:2513
clang::ConstantArrayType
Represents the canonical version of C arrays with a specified constant size.
Definition: Type.h:2935
clang::SourceManager
This class handles loading and caching of source files into memory.
Definition: SourceManager.h:596
clang::FunctionTemplateDecl
Declaration of a template function.
Definition: DeclTemplate.h:977
clang::TextTreeStructure::AddChild
void AddChild(Fn DoAddChild)
Add a child of the current node. Calls DoAddChild without arguments.
Definition: TextNodeDumper.h:47
clang::Attr
Attr - This represents one attribute.
Definition: Attr.h:45
clang::UsingShadowDecl
Represents a shadow declaration introduced into a scope by a (resolved) using declaration.
Definition: DeclCXX.h:3162
clang::comments::FullComment
A full comment attached to a declaration, contains block content.
Definition: Comment.h:1093
clang::ObjCCompatibleAliasDecl
ObjCCompatibleAliasDecl - Represents alias of a class.
Definition: DeclObjC.h:2743