clang 10.0.0git

JSONNodeDumper.cpp
Go to the documentation of this file.
1 #include "clang/AST/JSONNodeDumper.h"
2 #include "clang/Lex/Lexer.h"
3 #include "llvm/ADT/StringSwitch.h"
4
5 using namespace clang;
6
7 void JSONNodeDumper::addPreviousDeclaration(const Decl *D) {
8 switch (D->getKind()) {
9 #define DECL(DERIVED, BASE) \
10 case Decl::DERIVED: \
11 return writePreviousDeclImpl(cast<DERIVED##Decl>(D));
12 #define ABSTRACT_DECL(DECL)
13 #include "clang/AST/DeclNodes.inc"
14 #undef ABSTRACT_DECL
15 #undef DECL
16 }
17 llvm_unreachable("Decl that isn't part of DeclNodes.inc!");
18 }
19
20 void JSONNodeDumper::Visit(const Attr *A) {
21 const char *AttrName = nullptr;
22 switch (A->getKind()) {
23 #define ATTR(X) \
24 case attr::X: \
25 AttrName = #X"Attr"; \
26 break;
27 #include "clang/Basic/AttrList.inc"
28 #undef ATTR
29 }
30 JOS.attribute("id", createPointerRepresentation(A));
31 JOS.attribute("kind", AttrName);
32 JOS.attributeObject("range", [A, this] { writeSourceRange(A->getRange()); });
33 attributeOnlyIfTrue("inherited", A->isInherited());
34 attributeOnlyIfTrue("implicit", A->isImplicit());
35
36 // FIXME: it would be useful for us to output the spelling kind as well as
37 // the actual spelling. This would allow us to distinguish between the
38 // various attribute syntaxes, but we don't currently track that information
39 // within the AST.
40 //JOS.attribute("spelling", A->getSpelling());
41
42 InnerAttrVisitor::Visit(A);
43 }
44
45 void JSONNodeDumper::Visit(const Stmt *S) {
46 if (!S)
47 return;
48
49 JOS.attribute("id", createPointerRepresentation(S));
50 JOS.attribute("kind", S->getStmtClassName());
51 JOS.attributeObject("range",
52 [S, this] { writeSourceRange(S->getSourceRange()); });
53
54 if (const auto *E = dyn_cast<Expr>(S)) {
55 JOS.attribute("type", createQualType(E->getType()));
56 const char *Category = nullptr;
57 switch (E->getValueKind()) {
58 case VK_LValue: Category = "lvalue"; break;
59 case VK_XValue: Category = "xvalue"; break;
60 case VK_RValue: Category = "rvalue"; break;
61 }
62 JOS.attribute("valueCategory", Category);
63 }
64 InnerStmtVisitor::Visit(S);
65 }
66
67 void JSONNodeDumper::Visit(const Type *T) {
68 JOS.attribute("id", createPointerRepresentation(T));
69
70 if (!T)
71 return;
72
73 JOS.attribute("kind", (llvm::Twine(T->getTypeClassName()) + "Type").str());
74 JOS.attribute("type", createQualType(QualType(T, 0), /*Desugar*/ false));
75 attributeOnlyIfTrue("isDependent", T->isDependentType());
76 attributeOnlyIfTrue("isInstantiationDependent",
77 T->isInstantiationDependentType());
78 attributeOnlyIfTrue("isVariablyModified", T->isVariablyModifiedType());
79 attributeOnlyIfTrue("containsUnexpandedPack",
80 T->containsUnexpandedParameterPack());
81 attributeOnlyIfTrue("isImported", T->isFromAST());
82 InnerTypeVisitor::Visit(T);
83 }
84
85 void JSONNodeDumper::Visit(QualType T) {
86 JOS.attribute("id", createPointerRepresentation(T.getAsOpaquePtr()));
87 JOS.attribute("kind", "QualType");
88 JOS.attribute("type", createQualType(T));
89 JOS.attribute("qualifiers", T.split().Quals.getAsString());
90 }
91
92 void JSONNodeDumper::Visit(const Decl *D) {
93 JOS.attribute("id", createPointerRepresentation(D));
94
95 if (!D)
96 return;
97
98 JOS.attribute("kind", (llvm::Twine(D->getDeclKindName()) + "Decl").str());
99 JOS.attributeObject("loc",
100 [D, this] { writeSourceLocation(D->getLocation()); });
101 JOS.attributeObject("range",
102 [D, this] { writeSourceRange(D->getSourceRange()); });
103 attributeOnlyIfTrue("isImplicit", D->isImplicit());
104 attributeOnlyIfTrue("isInvalid", D->isInvalidDecl());
105
106 if (D->isUsed())
107 JOS.attribute("isUsed", true);
108 else if (D->isThisDeclarationReferenced())
109 JOS.attribute("isReferenced", true);
110
111 if (const auto *ND = dyn_cast<NamedDecl>(D))
112 attributeOnlyIfTrue("isHidden", ND->isHidden());
113
114 if (D->getLexicalDeclContext() != D->getDeclContext()) {
115 // Because of multiple inheritance, a DeclContext pointer does not produce
116 // the same pointer representation as a Decl pointer that references the
117 // same AST Node.
118 const auto *ParentDeclContextDecl = dyn_cast<Decl>(D->getDeclContext());
119 JOS.attribute("parentDeclContextId",
120 createPointerRepresentation(ParentDeclContextDecl));
121 }
122
123 addPreviousDeclaration(D);
124 InnerDeclVisitor::Visit(D);
125 }
126
127 void JSONNodeDumper::Visit(const comments::Comment *C,
128 const comments::FullComment *FC) {
129 if (!C)
130 return;
131
132 JOS.attribute("id", createPointerRepresentation(C));
133 JOS.attribute("kind", C->getCommentKindName());
134 JOS.attributeObject("loc",
135 [C, this] { writeSourceLocation(C->getLocation()); });
136 JOS.attributeObject("range",
137 [C, this] { writeSourceRange(C->getSourceRange()); });
138
139 InnerCommentVisitor::visit(C, FC);
140 }
141
142 void JSONNodeDumper::Visit(const TemplateArgument &TA, SourceRange R,
143 const Decl *From, StringRef Label) {
144 JOS.attribute("kind", "TemplateArgument");
145 if (R.isValid())
146 JOS.attributeObject("range", [R, this] { writeSourceRange(R); });
147
148 if (From)
149 JOS.attribute(Label.empty() ? "fromDecl" : Label, createBareDeclRef(From));
150
151 InnerTemplateArgVisitor::Visit(TA);
152 }
153
154 void JSONNodeDumper::Visit(const CXXCtorInitializer *Init) {
155 JOS.attribute("kind", "CXXCtorInitializer");
156 if (Init->isAnyMemberInitializer())
157 JOS.attribute("anyInit", createBareDeclRef(Init->getAnyMember()));
158 else if (Init->isBaseInitializer())
159 JOS.attribute("baseInit",
160 createQualType(QualType(Init->getBaseClass(), 0)));
161 else if (Init->isDelegatingInitializer())
162 JOS.attribute("delegatingInit",
163 createQualType(Init->getTypeSourceInfo()->getType()));
164 else
165 llvm_unreachable("Unknown initializer type");
166 }
167
168 void JSONNodeDumper::Visit(const OMPClause *C) {}
169
170 void JSONNodeDumper::Visit(const BlockDecl::Capture &C) {
171 JOS.attribute("kind", "Capture");
172 attributeOnlyIfTrue("byref", C.isByRef());
173 attributeOnlyIfTrue("nested", C.isNested());
174 if (C.getVariable())
175 JOS.attribute("var", createBareDeclRef(C.getVariable()));
176 }
177
178 void JSONNodeDumper::Visit(const GenericSelectionExpr::ConstAssociation &A) {
179 JOS.attribute("associationKind", A.getTypeSourceInfo() ? "case" : "default");
180 attributeOnlyIfTrue("selected", A.isSelected());
181 }
182
183 void JSONNodeDumper::writeIncludeStack(PresumedLoc Loc, bool JustFirst) {
184 if (Loc.isInvalid())
185 return;
186
187 JOS.attributeBegin("includedFrom");
188 JOS.objectBegin();
189
190 if (!JustFirst) {
191 // Walk the stack recursively, then print out the presumed location.
192 writeIncludeStack(SM.getPresumedLoc(Loc.getIncludeLoc()));
193 }
194
195 JOS.attribute("file", Loc.getFilename());
196 JOS.objectEnd();
197 JOS.attributeEnd();
198 }
199
200 void JSONNodeDumper::writeBareSourceLocation(SourceLocation Loc,
201 bool IsSpelling) {
202 PresumedLoc Presumed = SM.getPresumedLoc(Loc);
203 unsigned ActualLine = IsSpelling ? SM.getSpellingLineNumber(Loc)
204 : SM.getExpansionLineNumber(Loc);
205 StringRef ActualFile = SM.getBufferName(Loc);
206
207 if (Presumed.isValid()) {
208 JOS.attribute("offset", SM.getDecomposedLoc(Loc).second);
209 if (LastLocFilename != ActualFile) {
210 JOS.attribute("file", ActualFile);
211 JOS.attribute("line", ActualLine);
212 } else if (LastLocLine != ActualLine)
213 JOS.attribute("line", ActualLine);
214
215 StringRef PresumedFile = Presumed.getFilename();
216 if (PresumedFile != ActualFile && LastLocPresumedFilename != PresumedFile)
217 JOS.attribute("presumedFile", PresumedFile);
218
219 unsigned PresumedLine = Presumed.getLine();
220 if (ActualLine != PresumedLine && LastLocPresumedLine != PresumedLine)
221 JOS.attribute("presumedLine", PresumedLine);
222
223 JOS.attribute("col", Presumed.getColumn());
224 JOS.attribute("tokLen",
225 Lexer::MeasureTokenLength(Loc, SM, Ctx.getLangOpts()));
226 LastLocFilename = ActualFile;
227 LastLocPresumedFilename = PresumedFile;
228 LastLocPresumedLine = PresumedLine;
229 LastLocLine = ActualLine;
230
231 // Orthogonal to the file, line, and column de-duplication is whether the
232 // given location was a result of an include. If so, print where the
233 // include location came from.
234 writeIncludeStack(SM.getPresumedLoc(Presumed.getIncludeLoc()),
235 /*JustFirst*/ true);
236 }
237 }
238
239 void JSONNodeDumper::writeSourceLocation(SourceLocation Loc) {
240 SourceLocation Spelling = SM.getSpellingLoc(Loc);
241 SourceLocation Expansion = SM.getExpansionLoc(Loc);
242
243 if (Expansion != Spelling) {
244 // If the expansion and the spelling are different, output subobjects
245 // describing both locations.
246 JOS.attributeObject("spellingLoc", [Spelling, this] {
247 writeBareSourceLocation(Spelling, /*IsSpelling*/ true);
248 });
249 JOS.attributeObject("expansionLoc", [Expansion, Loc, this] {
250 writeBareSourceLocation(Expansion, /*IsSpelling*/ false);
251 // If there is a macro expansion, add extra information if the interesting
252 // bit is the macro arg expansion.
253 if (SM.isMacroArgExpansion(Loc))
254 JOS.attribute("isMacroArgExpansion", true);
255 });
256 } else
257 writeBareSourceLocation(Spelling, /*IsSpelling*/ true);
258 }
259
260 void JSONNodeDumper::writeSourceRange(SourceRange R) {
261 JOS.attributeObject("begin",
262 [R, this] { writeSourceLocation(R.getBegin()); });
263 JOS.attributeObject("end", [R, this] { writeSourceLocation(R.getEnd()); });
264 }
265
266 std::string JSONNodeDumper::createPointerRepresentation(const void *Ptr) {
267 // Because JSON stores integer values as signed 64-bit integers, trying to
268 // represent them as such makes for very ugly pointer values in the resulting
269 // output. Instead, we convert the value to hex and treat it as a string.
270 return "0x" + llvm::utohexstr(reinterpret_cast<uint64_t>(Ptr), true);
271 }
272
273 llvm::json::Object JSONNodeDumper::createQualType(QualType QT, bool Desugar) {
274 SplitQualType SQT = QT.split();
275 llvm::json::Object Ret{{"qualType", QualType::getAsString(SQT, PrintPolicy)}};
276
277 if (Desugar && !QT.isNull()) {
278 SplitQualType DSQT = QT.getSplitDesugaredType();
279 if (DSQT != SQT)
280 Ret["desugaredQualType"] = QualType::getAsString(DSQT, PrintPolicy);
281 if (const auto *TT = QT->getAs<TypedefType>())
282 Ret["typeAliasDeclId"] = createPointerRepresentation(TT->getDecl());
283 }
284 return Ret;
285 }
286
287 void JSONNodeDumper::writeBareDeclRef(const Decl *D) {
288 JOS.attribute("id", createPointerRepresentation(D));
289 if (!D)
290 return;
291
292 JOS.attribute("kind", (llvm::Twine(D->getDeclKindName()) + "Decl").str());
293 if (const auto *ND = dyn_cast<NamedDecl>(D))
294 JOS.attribute("name", ND->getDeclName().getAsString());
295 if (const auto *VD = dyn_cast<ValueDecl>(D))
296 JOS.attribute("type", createQualType(VD->getType()));
297 }
298
299 llvm::json::Object JSONNodeDumper::createBareDeclRef(const Decl *D) {
300 llvm::json::Object Ret{{"id", createPointerRepresentation(D)}};
301 if (!D)
302 return Ret;
303
304 Ret["kind"] = (llvm::Twine(D->getDeclKindName()) + "Decl").str();
305 if (const auto *ND = dyn_cast<NamedDecl>(D))
306 Ret["name"] = ND->getDeclName().getAsString();
307 if (const auto *VD = dyn_cast<ValueDecl>(D))
308 Ret["type"] = createQualType(VD->getType());
309 return Ret;
310 }
311
312 llvm::json::Array JSONNodeDumper::createCastPath(const CastExpr *C) {
313 llvm::json::Array Ret;
314 if (C->path_empty())
315 return Ret;
316
317 for (auto I = C->path_begin(), E = C->path_end(); I != E; ++I) {
318 const CXXBaseSpecifier *Base = *I;
319 const auto *RD =
320 cast<CXXRecordDecl>(Base->getType()->castAs<RecordType>()->getDecl());
321
322 llvm::json::Object Val{{"name", RD->getName()}};
323 if (Base->isVirtual())
324 Val["isVirtual"] = true;
325 Ret.push_back(std::move(Val));
326 }
327 return Ret;
328 }
329
330 #define FIELD2(Name, Flag) if (RD->Flag()) Ret[Name] = true
331 #define FIELD1(Flag) FIELD2(#Flag, Flag)
332
333 static llvm::json::Object
334 createDefaultConstructorDefinitionData(const CXXRecordDecl *RD) {
335 llvm::json::Object Ret;
336
337 FIELD2("exists", hasDefaultConstructor);
338 FIELD2("trivial", hasTrivialDefaultConstructor);
339 FIELD2("nonTrivial", hasNonTrivialDefaultConstructor);
340 FIELD2("userProvided", hasUserProvidedDefaultConstructor);
341 FIELD2("isConstexpr", hasConstexprDefaultConstructor);
342 FIELD2("needsImplicit", needsImplicitDefaultConstructor);
343 FIELD2("defaultedIsConstexpr", defaultedDefaultConstructorIsConstexpr);
344
345 return Ret;
346 }
347
348 static llvm::json::Object
349 createCopyConstructorDefinitionData(const CXXRecordDecl *RD) {
350 llvm::json::Object Ret;
351
352 FIELD2("simple", hasSimpleCopyConstructor);
353 FIELD2("trivial", hasTrivialCopyConstructor);
354 FIELD2("nonTrivial", hasNonTrivialCopyConstructor);
355 FIELD2("userDeclared", hasUserDeclaredCopyConstructor);
356 FIELD2("hasConstParam", hasCopyConstructorWithConstParam);
357 FIELD2("implicitHasConstParam", implicitCopyConstructorHasConstParam);
358 FIELD2("needsImplicit", needsImplicitCopyConstructor);
359 FIELD2("needsOverloadResolution", needsOverloadResolutionForCopyConstructor);
360 if (!RD->needsOverloadResolutionForCopyConstructor())
361 FIELD2("defaultedIsDeleted", defaultedCopyConstructorIsDeleted);
362
363 return Ret;
364 }
365
366 static llvm::json::Object
367 createMoveConstructorDefinitionData(const CXXRecordDecl *RD) {
368 llvm::json::Object Ret;
369
370 FIELD2("exists", hasMoveConstructor);
371 FIELD2("simple", hasSimpleMoveConstructor);
372 FIELD2("trivial", hasTrivialMoveConstructor);
373 FIELD2("nonTrivial", hasNonTrivialMoveConstructor);
374 FIELD2("userDeclared", hasUserDeclaredMoveConstructor);
375 FIELD2("needsImplicit", needsImplicitMoveConstructor);
376 FIELD2("needsOverloadResolution", needsOverloadResolutionForMoveConstructor);
377 if (!RD->needsOverloadResolutionForMoveConstructor())
378 FIELD2("defaultedIsDeleted", defaultedMoveConstructorIsDeleted);
379
380 return Ret;
381 }
382
383 static llvm::json::Object
384 createCopyAssignmentDefinitionData(const CXXRecordDecl *RD) {
385 llvm::json::Object Ret;
386
387 FIELD2("trivial", hasTrivialCopyAssignment);
388 FIELD2("nonTrivial", hasNonTrivialCopyAssignment);
389 FIELD2("hasConstParam", hasCopyAssignmentWithConstParam);
390 FIELD2("implicitHasConstParam", implicitCopyAssignmentHasConstParam);
391 FIELD2("userDeclared", hasUserDeclaredCopyAssignment);
392 FIELD2("needsImplicit", needsImplicitCopyAssignment);
393 FIELD2("needsOverloadResolution", needsOverloadResolutionForCopyAssignment);
394
395 return Ret;
396 }
397
398 static llvm::json::Object
399 createMoveAssignmentDefinitionData(const CXXRecordDecl *RD) {
400 llvm::json::Object Ret;
401
402 FIELD2("exists", hasMoveAssignment);
403 FIELD2("simple", hasSimpleMoveAssignment);
404 FIELD2("trivial", hasTrivialMoveAssignment);
405 FIELD2("nonTrivial", hasNonTrivialMoveAssignment);
406 FIELD2("userDeclared", hasUserDeclaredMoveAssignment);
407 FIELD2("needsImplicit", needsImplicitMoveAssignment);
408 FIELD2("needsOverloadResolution", needsOverloadResolutionForMoveAssignment);
409
410 return Ret;
411 }
412
413 static llvm::json::Object
414 createDestructorDefinitionData(const CXXRecordDecl *RD) {
415 llvm::json::Object Ret;
416
417 FIELD2("simple", hasSimpleDestructor);
418 FIELD2("irrelevant", hasIrrelevantDestructor);
419 FIELD2("trivial", hasTrivialDestructor);
420 FIELD2("nonTrivial", hasNonTrivialDestructor);
421 FIELD2("userDeclared", hasUserDeclaredDestructor);
422 FIELD2("needsImplicit", needsImplicitDestructor);
423 FIELD2("needsOverloadResolution", needsOverloadResolutionForDestructor);
424 if (!RD->needsOverloadResolutionForDestructor())
425 FIELD2("defaultedIsDeleted", defaultedDestructorIsDeleted);
426
427 return Ret;
428 }
429
430 llvm::json::Object
431 JSONNodeDumper::createCXXRecordDefinitionData(const CXXRecordDecl *RD) {
432 llvm::json::Object Ret;
433
434 // This data is common to all C++ classes.
435 FIELD1(isGenericLambda);
436 FIELD1(isLambda);
437 FIELD1(isEmpty);
438 FIELD1(isAggregate);
439 FIELD1(isStandardLayout);
440 FIELD1(isTriviallyCopyable);
441 FIELD1(isPOD);
442 FIELD1(isTrivial);
443 FIELD1(isPolymorphic);
444 FIELD1(isAbstract);
445 FIELD1(isLiteral);
446 FIELD1(canPassInRegisters);
447 FIELD1(hasUserDeclaredConstructor);
448 FIELD1(hasConstexprNonCopyMoveConstructor);
449 FIELD1(hasMutableFields);
450 FIELD1(hasVariantMembers);
451 FIELD2("canConstDefaultInit", allowConstDefaultInit);
452
453 Ret["defaultCtor"] = createDefaultConstructorDefinitionData(RD);
454 Ret["copyCtor"] = createCopyConstructorDefinitionData(RD);
455 Ret["moveCtor"] = createMoveConstructorDefinitionData(RD);
456 Ret["copyAssign"] = createCopyAssignmentDefinitionData(RD);
457 Ret["moveAssign"] = createMoveAssignmentDefinitionData(RD);
458 Ret["dtor"] = createDestructorDefinitionData(RD);
459
460 return Ret;
461 }
462
463 #undef FIELD1
464 #undef FIELD2
465
466 std::string JSONNodeDumper::createAccessSpecifier(AccessSpecifier AS) {
467 switch (AS) {
468 case AS_none: return "none";
469 case AS_private: return "private";
470 case AS_protected: return "protected";
471 case AS_public: return "public";
472 }
473 llvm_unreachable("Unknown access specifier");
474 }
475
476 llvm::json::Object
477 JSONNodeDumper::createCXXBaseSpecifier(const CXXBaseSpecifier &BS) {
478 llvm::json::Object Ret;
479
480 Ret["type"] = createQualType(BS.getType());
481 Ret["access"] = createAccessSpecifier(BS.getAccessSpecifier());
482 Ret["writtenAccess"] =
483 createAccessSpecifier(BS.getAccessSpecifierAsWritten());
484 if (BS.isVirtual())
485 Ret["isVirtual"] = true;
486 if (BS.isPackExpansion())
487 Ret["isPackExpansion"] = true;
488
489 return Ret;
490 }
491
492 void JSONNodeDumper::VisitTypedefType(const TypedefType *TT) {
493 JOS.attribute("decl", createBareDeclRef(TT->getDecl()));
494 }
495
496 void JSONNodeDumper::VisitFunctionType(const FunctionType *T) {
497 FunctionType::ExtInfo E = T->getExtInfo();
498 attributeOnlyIfTrue("noreturn", E.getNoReturn());
499 attributeOnlyIfTrue("producesResult", E.getProducesResult());
500 if (E.getHasRegParm())
501 JOS.attribute("regParm", E.getRegParm());
502 JOS.attribute("cc", FunctionType::getNameForCallConv(E.getCC()));
503 }
504
505 void JSONNodeDumper::VisitFunctionProtoType(const FunctionProtoType *T) {
506 FunctionProtoType::ExtProtoInfo E = T->getExtProtoInfo();
507 attributeOnlyIfTrue("trailingReturn", E.HasTrailingReturn);
508 attributeOnlyIfTrue("const", T->isConst());
509 attributeOnlyIfTrue("volatile", T->isVolatile());
510 attributeOnlyIfTrue("restrict", T->isRestrict());
511 attributeOnlyIfTrue("variadic", E.Variadic);
512 switch (E.RefQualifier) {
513 case RQ_LValue: JOS.attribute("refQualifier", "&"); break;
514 case RQ_RValue: JOS.attribute("refQualifier", "&&"); break;
515 case RQ_None: break;
516 }
517 switch (E.ExceptionSpec.Type) {
518 case EST_DynamicNone:
519 case EST_Dynamic: {
520 JOS.attribute("exceptionSpec", "throw");
521 llvm::json::Array Types;
522 for (QualType QT : E.ExceptionSpec.Exceptions)
523 Types.push_back(createQualType(QT));
524 JOS.attribute("exceptionTypes", std::move(Types));
525 } break;
526 case EST_MSAny:
527 JOS.attribute("exceptionSpec", "throw");
528 JOS.attribute("throwsAny", true);
529 break;
530 case EST_BasicNoexcept:
531 JOS.attribute("exceptionSpec", "noexcept");
532 break;
533 case EST_NoexceptTrue:
534 case EST_NoexceptFalse:
535 JOS.attribute("exceptionSpec", "noexcept");
536 JOS.attribute("conditionEvaluatesTo",
537 E.ExceptionSpec.Type == EST_NoexceptTrue);
538 //JOS.attributeWithCall("exceptionSpecExpr",
539 // [this, E]() { Visit(E.ExceptionSpec.NoexceptExpr); });
540 break;
541 case EST_NoThrow:
542 JOS.attribute("exceptionSpec", "nothrow");
543 break;
544 // FIXME: I cannot find a way to trigger these cases while dumping the AST. I
545 // suspect you can only run into them when executing an AST dump from within
546 // the debugger, which is not a use case we worry about for the JSON dumping
547 // feature.
548 case EST_DependentNoexcept:
549 case EST_Unevaluated:
550 case EST_Uninstantiated:
551 case EST_Unparsed:
552 case EST_None: break;
553 }
554 VisitFunctionType(T);
555 }
556
557 void JSONNodeDumper::VisitRValueReferenceType(const ReferenceType *RT) {
558 attributeOnlyIfTrue("spelledAsLValue", RT->isSpelledAsLValue());
559 }
560
561 void JSONNodeDumper::VisitArrayType(const ArrayType *AT) {
562 switch (AT->getSizeModifier()) {
563 case ArrayType::Star:
564 JOS.attribute("sizeModifier", "*");
565 break;
566 case ArrayType::Static:
567 JOS.attribute("sizeModifier", "static");
568 break;
569 case ArrayType::Normal:
570 break;
571 }
572
573 std::string Str = AT->getIndexTypeQualifiers().getAsString();
574 if (!Str.empty())
575 JOS.attribute("indexTypeQualifiers", Str);
576 }
577
578 void JSONNodeDumper::VisitConstantArrayType(const ConstantArrayType *CAT) {
579 // FIXME: this should use ZExt instead of SExt, but JSON doesn't allow a
580 // narrowing conversion to int64_t so it cannot be expressed.
581 JOS.attribute("size", CAT->getSize().getSExtValue());
582 VisitArrayType(CAT);
583 }
584
585 void JSONNodeDumper::VisitDependentSizedExtVectorType(
586 const DependentSizedExtVectorType *VT) {
587 JOS.attributeObject(
588 "attrLoc", [VT, this] { writeSourceLocation(VT->getAttributeLoc()); });
589 }
590
591 void JSONNodeDumper::VisitVectorType(const VectorType *VT) {
592 JOS.attribute("numElements", VT->getNumElements());
593 switch (VT->getVectorKind()) {
594 case VectorType::GenericVector:
595 break;
596 case VectorType::AltiVecVector:
597 JOS.attribute("vectorKind", "altivec");
598 break;
599 case VectorType::AltiVecPixel:
600 JOS.attribute("vectorKind", "altivec pixel");
601 break;
602 case VectorType::AltiVecBool:
603 JOS.attribute("vectorKind", "altivec bool");
604 break;
605 case VectorType::NeonVector:
606 JOS.attribute("vectorKind", "neon");
607 break;
608 case VectorType::NeonPolyVector:
609 JOS.attribute("vectorKind", "neon poly");
610 break;
611 }
612 }
613
614 void JSONNodeDumper::VisitUnresolvedUsingType(const UnresolvedUsingType *UUT) {
615 JOS.attribute("decl", createBareDeclRef(UUT->getDecl()));
616 }
617
618 void JSONNodeDumper::VisitUnaryTransformType(const UnaryTransformType *UTT) {
619 switch (UTT->getUTTKind()) {
620 case UnaryTransformType::EnumUnderlyingType:
621 JOS.attribute("transformKind", "underlying_type");
622 break;
623 }
624 }
625
626 void JSONNodeDumper::VisitTagType(const TagType *TT) {
627 JOS.attribute("decl", createBareDeclRef(TT->getDecl()));
628 }
629
630 void JSONNodeDumper::VisitTemplateTypeParmType(
631 const TemplateTypeParmType *TTPT) {
632 JOS.attribute("depth", TTPT->getDepth());
633 JOS.attribute("index", TTPT->getIndex());
634 attributeOnlyIfTrue("isPack", TTPT->isParameterPack());
635 JOS.attribute("decl", createBareDeclRef(TTPT->getDecl()));
636 }
637
638 void JSONNodeDumper::VisitAutoType(const AutoType *AT) {
639 JOS.attribute("undeduced", !AT->isDeduced());
640 switch (AT->getKeyword()) {
641 case AutoTypeKeyword::Auto:
642 JOS.attribute("typeKeyword", "auto");
643 break;
644 case AutoTypeKeyword::DecltypeAuto:
645 JOS.attribute("typeKeyword", "decltype(auto)");
646 break;
647 case AutoTypeKeyword::GNUAutoType:
648 JOS.attribute("typeKeyword", "__auto_type");
649 break;
650 }
651 }
652
653 void JSONNodeDumper::VisitTemplateSpecializationType(
654 const TemplateSpecializationType *TST) {
655 attributeOnlyIfTrue("isAlias", TST->isTypeAlias());
656
657 std::string Str;
658 llvm::raw_string_ostream OS(Str);
659 TST->getTemplateName().print(OS, PrintPolicy);
660 JOS.attribute("templateName", OS.str());
661 }
662
663 void JSONNodeDumper::VisitInjectedClassNameType(
664 const InjectedClassNameType *ICNT) {
665 JOS.attribute("decl", createBareDeclRef(ICNT->getDecl()));
666 }
667
668 void JSONNodeDumper::VisitObjCInterfaceType(const ObjCInterfaceType *OIT) {
669 JOS.attribute("decl", createBareDeclRef(OIT->getDecl()));
670 }
671
672 void JSONNodeDumper::VisitPackExpansionType(const PackExpansionType *PET) {
673 if (llvm::Optional<unsigned> N = PET->getNumExpansions())
674 JOS.attribute("numExpansions", *N);
675 }
676
677 void JSONNodeDumper::VisitElaboratedType(const ElaboratedType *ET) {
678 if (const NestedNameSpecifier *NNS = ET->getQualifier()) {
679 std::string Str;
680 llvm::raw_string_ostream OS(Str);
681 NNS->print(OS, PrintPolicy, /*ResolveTemplateArgs*/ true);
682 JOS.attribute("qualifier", OS.str());
683 }
684 if (const TagDecl *TD = ET->getOwnedTagDecl())
685 JOS.attribute("ownedTagDecl", createBareDeclRef(TD));
686 }
687
688 void JSONNodeDumper::VisitMacroQualifiedType(const MacroQualifiedType *MQT) {
689 JOS.attribute("macroName", MQT->getMacroIdentifier()->getName());
690 }
691
692 void JSONNodeDumper::VisitMemberPointerType(const MemberPointerType *MPT) {
693 attributeOnlyIfTrue("isData", MPT->isMemberDataPointer());
694 attributeOnlyIfTrue("isFunction", MPT->isMemberFunctionPointer());
695 }
696
697 void JSONNodeDumper::VisitNamedDecl(const NamedDecl *ND) {
698 if (ND && ND->getDeclName()) {
699 JOS.attribute("name", ND->getNameAsString());
700 std::string MangledName = ASTNameGen.getName(ND);
701 if (!MangledName.empty())
702 JOS.attribute("mangledName", MangledName);
703 }
704 }
705
706 void JSONNodeDumper::VisitTypedefDecl(const TypedefDecl *TD) {
707 VisitNamedDecl(TD);
708 JOS.attribute("type", createQualType(TD->getUnderlyingType()));
709 }
710
711 void JSONNodeDumper::VisitTypeAliasDecl(const TypeAliasDecl *TAD) {
712 VisitNamedDecl(TAD);
713 JOS.attribute("type", createQualType(TAD->getUnderlyingType()));
714 }
715
716 void JSONNodeDumper::VisitNamespaceDecl(const NamespaceDecl *ND) {
717 VisitNamedDecl(ND);
718 attributeOnlyIfTrue("isInline", ND->isInline());
719 if (!ND->isOriginalNamespace())
720 JOS.attribute("originalNamespace",
721 createBareDeclRef(ND->getOriginalNamespace()));
722 }
723
724 void JSONNodeDumper::VisitUsingDirectiveDecl(const UsingDirectiveDecl *UDD) {
725 JOS.attribute("nominatedNamespace",
726 createBareDeclRef(UDD->getNominatedNamespace()));
727 }
728
729 void JSONNodeDumper::VisitNamespaceAliasDecl(const NamespaceAliasDecl *NAD) {
730 VisitNamedDecl(NAD);
731 JOS.attribute("aliasedNamespace",
732 createBareDeclRef(NAD->getAliasedNamespace()));
733 }
734
735 void JSONNodeDumper::VisitUsingDecl(const UsingDecl *UD) {
736 std::string Name;
737 if (const NestedNameSpecifier *NNS = UD->getQualifier()) {
738 llvm::raw_string_ostream SOS(Name);
739 NNS->print(SOS, UD->getASTContext().getPrintingPolicy());
740 }
741 Name += UD->getNameAsString();
742 JOS.attribute("name", Name);
743 }
744
745 void JSONNodeDumper::VisitUsingShadowDecl(const UsingShadowDecl *USD) {
746 JOS.attribute("target", createBareDeclRef(USD->getTargetDecl()));
747 }
748
749 void JSONNodeDumper::VisitVarDecl(const VarDecl *VD) {
750 VisitNamedDecl(VD);
751 JOS.attribute("type", createQualType(VD->getType()));
752
753 StorageClass SC = VD->getStorageClass();
754 if (SC != SC_None)
755 JOS.attribute("storageClass", VarDecl::getStorageClassSpecifierString(SC));
756 switch (VD->getTLSKind()) {
757 case VarDecl::TLS_Dynamic: JOS.attribute("tls", "dynamic"); break;
758 case VarDecl::TLS_Static: JOS.attribute("tls", "static"); break;
759 case VarDecl::TLS_None: break;
760 }
761 attributeOnlyIfTrue("nrvo", VD->isNRVOVariable());
762 attributeOnlyIfTrue("inline", VD->isInline());
763 attributeOnlyIfTrue("constexpr", VD->isConstexpr());
764 attributeOnlyIfTrue("modulePrivate", VD->isModulePrivate());
765 if (VD->hasInit()) {
766 switch (VD->getInitStyle()) {
767 case VarDecl::CInit: JOS.attribute("init", "c"); break;
768 case VarDecl::CallInit: JOS.attribute("init", "call"); break;
769 case VarDecl::ListInit: JOS.attribute("init", "list"); break;
770 }
771 }
772 attributeOnlyIfTrue("isParameterPack", VD->isParameterPack());
773 }
774
775 void JSONNodeDumper::VisitFieldDecl(const FieldDecl *FD) {
776 VisitNamedDecl(FD);
777 JOS.attribute("type", createQualType(FD->getType()));
778 attributeOnlyIfTrue("mutable", FD->isMutable());
779 attributeOnlyIfTrue("modulePrivate", FD->isModulePrivate());
780 attributeOnlyIfTrue("isBitfield", FD->isBitField());
781 attributeOnlyIfTrue("hasInClassInitializer", FD->hasInClassInitializer());
782 }
783
784 void JSONNodeDumper::VisitFunctionDecl(const FunctionDecl *FD) {
785 VisitNamedDecl(FD);
786 JOS.attribute("type", createQualType(FD->getType()));
787 StorageClass SC = FD->getStorageClass();
788 if (SC != SC_None)
789 JOS.attribute("storageClass", VarDecl::getStorageClassSpecifierString(SC));
790 attributeOnlyIfTrue("inline", FD->isInlineSpecified());
791 attributeOnlyIfTrue("virtual", FD->isVirtualAsWritten());
792 attributeOnlyIfTrue("pure", FD->isPure());
793 attributeOnlyIfTrue("explicitlyDeleted", FD->isDeletedAsWritten());
794 attributeOnlyIfTrue("constexpr", FD->isConstexpr());
795 attributeOnlyIfTrue("variadic", FD->isVariadic());
796
797 if (FD->isDefaulted())
798 JOS.attribute("explicitlyDefaulted",
799 FD->isDeleted() ? "deleted" : "default");
800 }
801
802 void JSONNodeDumper::VisitEnumDecl(const EnumDecl *ED) {
803 VisitNamedDecl(ED);
804 if (ED->isFixed())
805 JOS.attribute("fixedUnderlyingType", createQualType(ED->getIntegerType()));
806 if (ED->isScoped())
807 JOS.attribute("scopedEnumTag",
808 ED->isScopedUsingClassTag() ? "class" : "struct");
809 }
810 void JSONNodeDumper::VisitEnumConstantDecl(const EnumConstantDecl *ECD) {
811 VisitNamedDecl(ECD);
812 JOS.attribute("type", createQualType(ECD->getType()));
813 }
814
815 void JSONNodeDumper::VisitRecordDecl(const RecordDecl *RD) {
816 VisitNamedDecl(RD);
817 JOS.attribute("tagUsed", RD->getKindName());
818 attributeOnlyIfTrue("completeDefinition", RD->isCompleteDefinition());
819 }
820 void JSONNodeDumper::VisitCXXRecordDecl(const CXXRecordDecl *RD) {
821 VisitRecordDecl(RD);
822
823 // All other information requires a complete definition.
824 if (!RD->isCompleteDefinition())
825 return;
826
827 JOS.attribute("definitionData", createCXXRecordDefinitionData(RD));
828 if (RD->getNumBases()) {
829 JOS.attributeArray("bases", [this, RD] {
830 for (const auto &Spec : RD->bases())
831 JOS.value(createCXXBaseSpecifier(Spec));
832 });
833 }
834 }
835
836 void JSONNodeDumper::VisitTemplateTypeParmDecl(const TemplateTypeParmDecl *D) {
837 VisitNamedDecl(D);
838 JOS.attribute("tagUsed", D->wasDeclaredWithTypename() ? "typename" : "class");
839 JOS.attribute("depth", D->getDepth());
840 JOS.attribute("index", D->getIndex());
841 attributeOnlyIfTrue("isParameterPack", D->isParameterPack());
842
843 if (D->hasDefaultArgument())
844 JOS.attributeObject("defaultArg", [=] {
845 Visit(D->getDefaultArgument(), SourceRange(),
846 D->getDefaultArgStorage().getInheritedFrom(),
847 D->defaultArgumentWasInherited() ? "inherited from" : "previous");
848 });
849 }
850
851 void JSONNodeDumper::VisitNonTypeTemplateParmDecl(
852 const NonTypeTemplateParmDecl *D) {
853 VisitNamedDecl(D);
854 JOS.attribute("type", createQualType(D->getType()));
855 JOS.attribute("depth", D->getDepth());
856 JOS.attribute("index", D->getIndex());
857 attributeOnlyIfTrue("isParameterPack", D->isParameterPack());
858
859 if (D->hasDefaultArgument())
860 JOS.attributeObject("defaultArg", [=] {
861 Visit(D->getDefaultArgument(), SourceRange(),
862 D->getDefaultArgStorage().getInheritedFrom(),
863 D->defaultArgumentWasInherited() ? "inherited from" : "previous");
864 });
865 }
866
867 void JSONNodeDumper::VisitTemplateTemplateParmDecl(
868 const TemplateTemplateParmDecl *D) {
869 VisitNamedDecl(D);
870 JOS.attribute("depth", D->getDepth());
871 JOS.attribute("index", D->getIndex());
872 attributeOnlyIfTrue("isParameterPack", D->isParameterPack());
873
874 if (D->hasDefaultArgument())
875 JOS.attributeObject("defaultArg", [=] {
876 Visit(D->getDefaultArgument().getArgument(),
877 D->getDefaultArgStorage().getInheritedFrom()->getSourceRange(),
878 D->getDefaultArgStorage().getInheritedFrom(),
879 D->defaultArgumentWasInherited() ? "inherited from" : "previous");
880 });
881 }
882
883 void JSONNodeDumper::VisitLinkageSpecDecl(const LinkageSpecDecl *LSD) {
884 StringRef Lang;
885 switch (LSD->getLanguage()) {
886 case LinkageSpecDecl::lang_c: Lang = "C"; break;
887 case LinkageSpecDecl::lang_cxx: Lang = "C++"; break;
888 }
889 JOS.attribute("language", Lang);
890 attributeOnlyIfTrue("hasBraces", LSD->hasBraces());
891 }
892
893 void JSONNodeDumper::VisitAccessSpecDecl(const AccessSpecDecl *ASD) {
894 JOS.attribute("access", createAccessSpecifier(ASD->getAccess()));
895 }
896
897 void JSONNodeDumper::VisitFriendDecl(const FriendDecl *FD) {
898 if (const TypeSourceInfo *T = FD->getFriendType())
899 JOS.attribute("type", createQualType(T->getType()));
900 }
901
902 void JSONNodeDumper::VisitObjCIvarDecl(const ObjCIvarDecl *D) {
903 VisitNamedDecl(D);
904 JOS.attribute("type", createQualType(D->getType()));
905 attributeOnlyIfTrue("synthesized", D->getSynthesize());
906 switch (D->getAccessControl()) {
907 case ObjCIvarDecl::None: JOS.attribute("access", "none"); break;
908 case ObjCIvarDecl::Private: JOS.attribute("access", "private"); break;
909 case ObjCIvarDecl::Protected: JOS.attribute("access", "protected"); break;
910 case ObjCIvarDecl::Public: JOS.attribute("access", "public"); break;
911 case ObjCIvarDecl::Package: JOS.attribute("access", "package"); break;
912 }
913 }
914
915 void JSONNodeDumper::VisitObjCMethodDecl(const ObjCMethodDecl *D) {
916 VisitNamedDecl(D);
917 JOS.attribute("returnType", createQualType(D->getReturnType()));
918 JOS.attribute("instance", D->isInstanceMethod());
919 attributeOnlyIfTrue("variadic", D->isVariadic());
920 }
921
922 void JSONNodeDumper::VisitObjCTypeParamDecl(const ObjCTypeParamDecl *D) {
923 VisitNamedDecl(D);
924 JOS.attribute("type", createQualType(D->getUnderlyingType()));
925 attributeOnlyIfTrue("bounded", D->hasExplicitBound());
926 switch (D->getVariance()) {
927 case ObjCTypeParamVariance::Invariant:
928 break;
929 case ObjCTypeParamVariance::Covariant:
930 JOS.attribute("variance", "covariant");
931 break;
932 case ObjCTypeParamVariance::Contravariant:
933 JOS.attribute("variance", "contravariant");
934 break;
935 }
936 }
937
938 void JSONNodeDumper::VisitObjCCategoryDecl(const ObjCCategoryDecl *D) {
939 VisitNamedDecl(D);
940 JOS.attribute("interface", createBareDeclRef(D->getClassInterface()));
941 JOS.attribute("implementation", createBareDeclRef(D->getImplementation()));
942
943 llvm::json::Array Protocols;
944 for (const auto* P : D->protocols())
945 Protocols.push_back(createBareDeclRef(P));
946 if (!Protocols.empty())
947 JOS.attribute("protocols", std::move(Protocols));
948 }
949
950 void JSONNodeDumper::VisitObjCCategoryImplDecl(const ObjCCategoryImplDecl *D) {
951 VisitNamedDecl(D);
952 JOS.attribute("interface", createBareDeclRef(D->getClassInterface()));
953 JOS.attribute("categoryDecl", createBareDeclRef(D->getCategoryDecl()));
954 }
955
956 void JSONNodeDumper::VisitObjCProtocolDecl(const ObjCProtocolDecl *D) {
957 VisitNamedDecl(D);
958
959 llvm::json::Array Protocols;
960 for (const auto *P : D->protocols())
961 Protocols.push_back(createBareDeclRef(P));
962 if (!Protocols.empty())
963 JOS.attribute("protocols", std::move(Protocols));
964 }
965
966 void JSONNodeDumper::VisitObjCInterfaceDecl(const ObjCInterfaceDecl *D) {
967 VisitNamedDecl(D);
968 JOS.attribute("super", createBareDeclRef(D->getSuperClass()));
969 JOS.attribute("implementation", createBareDeclRef(D->getImplementation()));
970
971 llvm::json::Array Protocols;
972 for (const auto* P : D->protocols())
973 Protocols.push_back(createBareDeclRef(P));
974 if (!Protocols.empty())
975 JOS.attribute("protocols", std::move(Protocols));
976 }
977
978 void JSONNodeDumper::VisitObjCImplementationDecl(
979 const ObjCImplementationDecl *D) {
980 VisitNamedDecl(D);
981 JOS.attribute("super", createBareDeclRef(D->getSuperClass()));
982 JOS.attribute("interface", createBareDeclRef(D->getClassInterface()));
983 }
984
985 void JSONNodeDumper::VisitObjCCompatibleAliasDecl(
986 const ObjCCompatibleAliasDecl *D) {
987 VisitNamedDecl(D);
988 JOS.attribute("interface", createBareDeclRef(D->getClassInterface()));
989 }
990
991 void JSONNodeDumper::VisitObjCPropertyDecl(const ObjCPropertyDecl *D) {
992 VisitNamedDecl(D);
993 JOS.attribute("type", createQualType(D->getType()));
994
995 switch (D->getPropertyImplementation()) {
996 case ObjCPropertyDecl::None: break;
997 case ObjCPropertyDecl::Required: JOS.attribute("control", "required"); break;
998 case ObjCPropertyDecl::Optional: JOS.attribute("control", "optional"); break;
999 }
1000
1001 ObjCPropertyDecl::PropertyAttributeKind Attrs = D->getPropertyAttributes();
1002 if (Attrs != ObjCPropertyDecl::OBJC_PR_noattr) {
1003 if (Attrs & ObjCPropertyDecl::OBJC_PR_getter)
1004 JOS.attribute("getter", createBareDeclRef(D->getGetterMethodDecl()));
1005 if (Attrs & ObjCPropertyDecl::OBJC_PR_setter)
1006 JOS.attribute("setter", createBareDeclRef(D->getSetterMethodDecl()));
1007 attributeOnlyIfTrue("readonly", Attrs & ObjCPropertyDecl::OBJC_PR_readonly);
1008 attributeOnlyIfTrue("assign", Attrs & ObjCPropertyDecl::OBJC_PR_assign);
1009 attributeOnlyIfTrue("readwrite",
1010 Attrs & ObjCPropertyDecl::OBJC_PR_readwrite);
1011 attributeOnlyIfTrue("retain", Attrs & ObjCPropertyDecl::OBJC_PR_retain);
1012 attributeOnlyIfTrue("copy", Attrs & ObjCPropertyDecl::OBJC_PR_copy);
1013 attributeOnlyIfTrue("nonatomic",
1014 Attrs & ObjCPropertyDecl::OBJC_PR_nonatomic);
1015 attributeOnlyIfTrue("atomic", Attrs & ObjCPropertyDecl::OBJC_PR_atomic);
1016 attributeOnlyIfTrue("weak", Attrs & ObjCPropertyDecl::OBJC_PR_weak);
1017 attributeOnlyIfTrue("strong", Attrs & ObjCPropertyDecl::OBJC_PR_strong);
1018 attributeOnlyIfTrue("unsafe_unretained",
1019 Attrs & ObjCPropertyDecl::OBJC_PR_unsafe_unretained);
1020 attributeOnlyIfTrue("class", Attrs & ObjCPropertyDecl::OBJC_PR_class);
1021 attributeOnlyIfTrue("direct", Attrs & ObjCPropertyDecl::OBJC_PR_direct);
1022 attributeOnlyIfTrue("nullability",
1023 Attrs & ObjCPropertyDecl::OBJC_PR_nullability);
1024 attributeOnlyIfTrue("null_resettable",
1025 Attrs & ObjCPropertyDecl::OBJC_PR_null_resettable);
1026 }
1027 }
1028
1029 void JSONNodeDumper::VisitObjCPropertyImplDecl(const ObjCPropertyImplDecl *D) {
1030 VisitNamedDecl(D->getPropertyDecl());
1031 JOS.attribute("implKind", D->getPropertyImplementation() ==
1032 ObjCPropertyImplDecl::Synthesize
1033 ? "synthesize"
1034 : "dynamic");
1035 JOS.attribute("propertyDecl", createBareDeclRef(D->getPropertyDecl()));
1036 JOS.attribute("ivarDecl", createBareDeclRef(D->getPropertyIvarDecl()));
1037 }
1038
1039 void JSONNodeDumper::VisitBlockDecl(const BlockDecl *D) {
1040 attributeOnlyIfTrue("variadic", D->isVariadic());
1041 attributeOnlyIfTrue("capturesThis", D->capturesCXXThis());
1042 }
1043
1044 void JSONNodeDumper::VisitObjCEncodeExpr(const ObjCEncodeExpr *OEE) {
1045 JOS.attribute("encodedType", createQualType(OEE->getEncodedType()));
1046 }
1047
1048 void JSONNodeDumper::VisitObjCMessageExpr(const ObjCMessageExpr *OME) {
1049 std::string Str;
1050 llvm::raw_string_ostream OS(Str);
1051
1052 OME->getSelector().print(OS);
1053 JOS.attribute("selector", OS.str());
1054
1055 switch (OME->getReceiverKind()) {
1056 case ObjCMessageExpr::Instance:
1057 JOS.attribute("receiverKind", "instance");
1058 break;
1059 case ObjCMessageExpr::Class:
1060 JOS.attribute("receiverKind", "class");
1061 JOS.attribute("classType", createQualType(OME->getClassReceiver()));
1062 break;
1063 case ObjCMessageExpr::SuperInstance:
1064 JOS.attribute("receiverKind", "super (instance)");
1065 JOS.attribute("superType", createQualType(OME->getSuperType()));
1066 break;
1067 case ObjCMessageExpr::SuperClass:
1068 JOS.attribute("receiverKind", "super (class)");
1069 JOS.attribute("superType", createQualType(OME->getSuperType()));
1070 break;
1071 }
1072
1073 QualType CallReturnTy = OME->getCallReturnType(Ctx);
1074 if (OME->getType() != CallReturnTy)
1075 JOS.attribute("callReturnType", createQualType(CallReturnTy));
1076 }
1077
1078 void JSONNodeDumper::VisitObjCBoxedExpr(const ObjCBoxedExpr *OBE) {
1079 if (const ObjCMethodDecl *MD = OBE->getBoxingMethod()) {
1080 std::string Str;
1081 llvm::raw_string_ostream OS(Str);
1082
1083 MD->getSelector().print(OS);
1084 JOS.attribute("selector", OS.str());
1085 }
1086 }
1087
1088 void JSONNodeDumper::VisitObjCSelectorExpr(const ObjCSelectorExpr *OSE) {
1089 std::string Str;
1090 llvm::raw_string_ostream OS(Str);
1091
1092 OSE->getSelector().print(OS);
1093 JOS.attribute("selector", OS.str());
1094 }
1095
1096 void JSONNodeDumper::VisitObjCProtocolExpr(const ObjCProtocolExpr *OPE) {
1097 JOS.attribute("protocol", createBareDeclRef(OPE->getProtocol()));
1098 }
1099
1100 void JSONNodeDumper::VisitObjCPropertyRefExpr(const ObjCPropertyRefExpr *OPRE) {
1101 if (OPRE->isImplicitProperty()) {
1102 JOS.attribute("propertyKind", "implicit");
1103 if (const ObjCMethodDecl *MD = OPRE->getImplicitPropertyGetter())
1104 JOS.attribute("getter", createBareDeclRef(MD));
1105 if (const ObjCMethodDecl *MD = OPRE->getImplicitPropertySetter())
1106 JOS.attribute("setter", createBareDeclRef(MD));
1107 } else {
1108 JOS.attribute("propertyKind", "explicit");
1109 JOS.attribute("property", createBareDeclRef(OPRE->getExplicitProperty()));
1110 }
1111
1112 attributeOnlyIfTrue("isSuperReceiver", OPRE->isSuperReceiver());
1113 attributeOnlyIfTrue("isMessagingGetter", OPRE->isMessagingGetter());
1114 attributeOnlyIfTrue("isMessagingSetter", OPRE->isMessagingSetter());
1115 }
1116
1117 void JSONNodeDumper::VisitObjCSubscriptRefExpr(
1118 const ObjCSubscriptRefExpr *OSRE) {
1119 JOS.attribute("subscriptKind",
1120 OSRE->isArraySubscriptRefExpr() ? "array" : "dictionary");
1121
1122 if (const ObjCMethodDecl *MD = OSRE->getAtIndexMethodDecl())
1123 JOS.attribute("getter", createBareDeclRef(MD));
1124 if (const ObjCMethodDecl *MD = OSRE->setAtIndexMethodDecl())
1125 JOS.attribute("setter", createBareDeclRef(MD));
1126 }
1127
1128 void JSONNodeDumper::VisitObjCIvarRefExpr(const ObjCIvarRefExpr *OIRE) {
1129 JOS.attribute("decl", createBareDeclRef(OIRE->getDecl()));
1130 attributeOnlyIfTrue("isFreeIvar", OIRE->isFreeIvar());
1131 JOS.attribute("isArrow", OIRE->isArrow());
1132 }
1133
1134 void JSONNodeDumper::VisitObjCBoolLiteralExpr(const ObjCBoolLiteralExpr *OBLE) {
1135 JOS.attribute("value", OBLE->getValue() ? "__objc_yes" : "__objc_no");
1136 }
1137
1138 void JSONNodeDumper::VisitDeclRefExpr(const DeclRefExpr *DRE) {
1139 JOS.attribute("referencedDecl", createBareDeclRef(DRE->getDecl()));
1140 if (DRE->getDecl() != DRE->getFoundDecl())
1141 JOS.attribute("foundReferencedDecl",
1142 createBareDeclRef(DRE->getFoundDecl()));
1143 switch (DRE->isNonOdrUse()) {
1144 case NOUR_None: break;
1145 case NOUR_Unevaluated: JOS.attribute("nonOdrUseReason", "unevaluated"); break;
1146 case NOUR_Constant: JOS.attribute("nonOdrUseReason", "constant"); break;
1147 case NOUR_Discarded: JOS.attribute("nonOdrUseReason", "discarded"); break;
1148 }
1149 }
1150
1151 void JSONNodeDumper::VisitPredefinedExpr(const PredefinedExpr *PE) {
1152 JOS.attribute("name", PredefinedExpr::getIdentKindName(PE->getIdentKind()));
1153 }
1154
1155 void JSONNodeDumper::VisitUnaryOperator(const UnaryOperator *UO) {
1156 JOS.attribute("isPostfix", UO->isPostfix());
1157 JOS.attribute("opcode", UnaryOperator::getOpcodeStr(UO->getOpcode()));
1158 if (!UO->canOverflow())
1159 JOS.attribute("canOverflow", false);
1160 }
1161
1162 void JSONNodeDumper::VisitBinaryOperator(const BinaryOperator *BO) {
1163 JOS.attribute("opcode", BinaryOperator::getOpcodeStr(BO->getOpcode()));
1164 }
1165
1166 void JSONNodeDumper::VisitCompoundAssignOperator(
1167 const CompoundAssignOperator *CAO) {
1168 VisitBinaryOperator(CAO);
1169 JOS.attribute("computeLHSType", createQualType(CAO->getComputationLHSType()));
1170 JOS.attribute("computeResultType",
1171 createQualType(CAO->getComputationResultType()));
1172 }
1173
1174 void JSONNodeDumper::VisitMemberExpr(const MemberExpr *ME) {
1175 // Note, we always write this Boolean field because the information it conveys
1176 // is critical to understanding the AST node.
1177 ValueDecl *VD = ME->getMemberDecl();
1178 JOS.attribute("name", VD && VD->getDeclName() ? VD->getNameAsString() : "");
1179 JOS.attribute("isArrow", ME->isArrow());
1180 JOS.attribute("referencedMemberDecl", createPointerRepresentation(VD));
1181 switch (ME->isNonOdrUse()) {
1182 case NOUR_None: break;
1183 case NOUR_Unevaluated: JOS.attribute("nonOdrUseReason", "unevaluated"); break;
1184 case NOUR_Constant: JOS.attribute("nonOdrUseReason", "constant"); break;
1185 case NOUR_Discarded: JOS.attribute("nonOdrUseReason", "discarded"); break;
1186 }
1187 }
1188
1189 void JSONNodeDumper::VisitCXXNewExpr(const CXXNewExpr *NE) {
1190 attributeOnlyIfTrue("isGlobal", NE->isGlobalNew());
1191 attributeOnlyIfTrue("isArray", NE->isArray());
1192 attributeOnlyIfTrue("isPlacement", NE->getNumPlacementArgs() != 0);
1193 switch (NE->getInitializationStyle()) {
1194 case CXXNewExpr::NoInit: break;
1195 case CXXNewExpr::CallInit: JOS.attribute("initStyle", "call"); break;
1196 case CXXNewExpr::ListInit: JOS.attribute("initStyle", "list"); break;
1197 }
1198 if (const FunctionDecl *FD = NE->getOperatorNew())
1199 JOS.attribute("operatorNewDecl", createBareDeclRef(FD));
1200 if (const FunctionDecl *FD = NE->getOperatorDelete())
1201 JOS.attribute("operatorDeleteDecl", createBareDeclRef(FD));
1202 }
1203 void JSONNodeDumper::VisitCXXDeleteExpr(const CXXDeleteExpr *DE) {
1204 attributeOnlyIfTrue("isGlobal", DE->isGlobalDelete());
1205 attributeOnlyIfTrue("isArray", DE->isArrayForm());
1206 attributeOnlyIfTrue("isArrayAsWritten", DE->isArrayFormAsWritten());
1207 if (const FunctionDecl *FD = DE->getOperatorDelete())
1208 JOS.attribute("operatorDeleteDecl", createBareDeclRef(FD));
1209 }
1210
1211 void JSONNodeDumper::VisitCXXThisExpr(const CXXThisExpr *TE) {
1212 attributeOnlyIfTrue("implicit", TE->isImplicit());
1213 }
1214
1215 void JSONNodeDumper::VisitCastExpr(const CastExpr *CE) {
1216 JOS.attribute("castKind", CE->getCastKindName());
1217 llvm::json::Array Path = createCastPath(CE);
1218 if (!Path.empty())
1219 JOS.attribute("path", std::move(Path));
1220 // FIXME: This may not be useful information as it can be obtusely gleaned
1221 // from the inner[] array.
1222 if (const NamedDecl *ND = CE->getConversionFunction())
1223 JOS.attribute("conversionFunc", createBareDeclRef(ND));
1224 }
1225
1226 void JSONNodeDumper::VisitImplicitCastExpr(const ImplicitCastExpr *ICE) {
1227 VisitCastExpr(ICE);
1228 attributeOnlyIfTrue("isPartOfExplicitCast", ICE->isPartOfExplicitCast());
1229 }
1230
1231 void JSONNodeDumper::VisitCallExpr(const CallExpr *CE) {
1232 attributeOnlyIfTrue("adl", CE->usesADL());
1233 }
1234
1235 void JSONNodeDumper::VisitUnaryExprOrTypeTraitExpr(
1236 const UnaryExprOrTypeTraitExpr *TTE) {
1237 switch (TTE->getKind()) {
1238 case UETT_SizeOf: JOS.attribute("name", "sizeof"); break;
1239 case UETT_AlignOf: JOS.attribute("name", "alignof"); break;
1240 case UETT_VecStep: JOS.attribute("name", "vec_step"); break;
1241 case UETT_PreferredAlignOf: JOS.attribute("name", "__alignof"); break;
1242 case UETT_OpenMPRequiredSimdAlign:
1243 JOS.attribute("name", "__builtin_omp_required_simd_align"); break;
1244 }
1245 if (TTE->isArgumentType())
1246 JOS.attribute("argType", createQualType(TTE->getArgumentType()));
1247 }
1248
1249 void JSONNodeDumper::VisitSizeOfPackExpr(const SizeOfPackExpr *SOPE) {
1250 VisitNamedDecl(SOPE->getPack());
1251 }
1252
1253 void JSONNodeDumper::VisitUnresolvedLookupExpr(
1254 const UnresolvedLookupExpr *ULE) {
1255 JOS.attribute("usesADL", ULE->requiresADL());
1256 JOS.attribute("name", ULE->getName().getAsString());
1257
1258 JOS.attributeArray("lookups", [this, ULE] {
1259 for (const NamedDecl *D : ULE->decls())
1260 JOS.value(createBareDeclRef(D));
1261 });
1262 }
1263
1264 void JSONNodeDumper::VisitAddrLabelExpr(const AddrLabelExpr *ALE) {
1265 JOS.attribute("name", ALE->getLabel()->getName());
1266 JOS.attribute("labelDeclId", createPointerRepresentation(ALE->getLabel()));
1267 }
1268
1269 void JSONNodeDumper::VisitCXXTypeidExpr(const CXXTypeidExpr *CTE) {
1270 if (CTE->isTypeOperand()) {
1271 QualType Adjusted = CTE->getTypeOperand(Ctx);
1272 QualType Unadjusted = CTE->getTypeOperandSourceInfo()->getType();
1273 JOS.attribute("typeArg", createQualType(Unadjusted));
1274 if (Adjusted != Unadjusted)
1275 JOS.attribute("adjustedTypeArg", createQualType(Adjusted));
1276 }
1277 }
1278
1279 void JSONNodeDumper::VisitConstantExpr(const ConstantExpr *CE) {
1280 if (CE->getResultAPValueKind() != APValue::None) {
1281 std::string Str;
1282 llvm::raw_string_ostream OS(Str);
1283 CE->getAPValueResult().printPretty(OS, Ctx, CE->getType());
1284 JOS.attribute("value", OS.str());
1285 }
1286 }
1287
1288 void JSONNodeDumper::VisitInitListExpr(const InitListExpr *ILE) {
1289 if (const FieldDecl *FD = ILE->getInitializedFieldInUnion())
1290 JOS.attribute("field", createBareDeclRef(FD));
1291 }
1292
1293 void JSONNodeDumper::VisitGenericSelectionExpr(
1294 const GenericSelectionExpr *GSE) {
1295 attributeOnlyIfTrue("resultDependent", GSE->isResultDependent());
1296 }
1297
1298 void JSONNodeDumper::VisitCXXUnresolvedConstructExpr(
1299 const CXXUnresolvedConstructExpr *UCE) {
1300 if (UCE->getType() != UCE->getTypeAsWritten())
1301 JOS.attribute("typeAsWritten", createQualType(UCE->getTypeAsWritten()));
1302 attributeOnlyIfTrue("list", UCE->isListInitialization());
1303 }
1304
1305 void JSONNodeDumper::VisitCXXConstructExpr(const CXXConstructExpr *CE) {
1306 CXXConstructorDecl *Ctor = CE->getConstructor();
1307 JOS.attribute("ctorType", createQualType(Ctor->getType()));
1308 attributeOnlyIfTrue("elidable", CE->isElidable());
1309 attributeOnlyIfTrue("list", CE->isListInitialization());
1310 attributeOnlyIfTrue("initializer_list", CE->isStdInitListInitialization());
1311 attributeOnlyIfTrue("zeroing", CE->requiresZeroInitialization());
1312 attributeOnlyIfTrue("hadMultipleCandidates", CE->hadMultipleCandidates());
1313
1314 switch (CE->getConstructionKind()) {
1315 case CXXConstructExpr::CK_Complete:
1316 JOS.attribute("constructionKind", "complete");
1317 break;
1318 case CXXConstructExpr::CK_Delegating:
1319 JOS.attribute("constructionKind", "delegating");
1320 break;
1321 case CXXConstructExpr::CK_NonVirtualBase:
1322 JOS.attribute("constructionKind", "non-virtual base");
1323 break;
1324 case CXXConstructExpr::CK_VirtualBase:
1325 JOS.attribute("constructionKind", "virtual base");
1326 break;
1327 }
1328 }
1329
1330 void JSONNodeDumper::VisitExprWithCleanups(const ExprWithCleanups *EWC) {
1331 attributeOnlyIfTrue("cleanupsHaveSideEffects",
1332 EWC->cleanupsHaveSideEffects());
1333 if (EWC->getNumObjects()) {
1334 JOS.attributeArray("cleanups", [this, EWC] {
1335 for (const ExprWithCleanups::CleanupObject &CO : EWC->getObjects())
1336 JOS.value(createBareDeclRef(CO));
1337 });
1338 }
1339 }
1340
1341 void JSONNodeDumper::VisitCXXBindTemporaryExpr(
1342 const CXXBindTemporaryExpr *BTE) {
1343 const CXXTemporary *Temp = BTE->getTemporary();
1344 JOS.attribute("temp", createPointerRepresentation(Temp));
1345 if (const CXXDestructorDecl *Dtor = Temp->getDestructor())
1346 JOS.attribute("dtor", createBareDeclRef(Dtor));
1347 }
1348
1349 void JSONNodeDumper::VisitMaterializeTemporaryExpr(
1350 const MaterializeTemporaryExpr *MTE) {
1351 if (const ValueDecl *VD = MTE->getExtendingDecl())
1352 JOS.attribute("extendingDecl", createBareDeclRef(VD));
1353
1354 switch (MTE->getStorageDuration()) {
1355 case SD_Automatic:
1356 JOS.attribute("storageDuration", "automatic");
1357 break;
1358 case SD_Dynamic:
1359 JOS.attribute("storageDuration", "dynamic");
1360 break;
1361 case SD_FullExpression:
1362 JOS.attribute("storageDuration", "full expression");
1363 break;
1364 case SD_Static:
1365 JOS.attribute("storageDuration", "static");
1366 break;
1367 case SD_Thread:
1368 JOS.attribute("storageDuration", "thread");
1369 break;
1370 }
1371
1372 attributeOnlyIfTrue("boundToLValueRef", MTE->isBoundToLvalueReference());
1373 }
1374
1375 void JSONNodeDumper::VisitCXXDependentScopeMemberExpr(
1376 const CXXDependentScopeMemberExpr *DSME) {
1377 JOS.attribute("isArrow", DSME->isArrow());
1378 JOS.attribute("member", DSME->getMember().getAsString());
1379 attributeOnlyIfTrue("hasTemplateKeyword", DSME->hasTemplateKeyword());
1380 attributeOnlyIfTrue("hasExplicitTemplateArgs",
1381 DSME->hasExplicitTemplateArgs());
1382
1383 if (DSME->getNumTemplateArgs()) {
1384 JOS.attributeArray("explicitTemplateArgs", [DSME, this] {
1385 for (const TemplateArgumentLoc &TAL : DSME->template_arguments())
1386 JOS.object(
1387 [&TAL, this] { Visit(TAL.getArgument(), TAL.getSourceRange()); });
1388 });
1389 }
1390 }
1391
1392 void JSONNodeDumper::VisitIntegerLiteral(const IntegerLiteral *IL) {
1393 JOS.attribute("value",
1394 IL->getValue().toString(
1395 /*Radix=*/10, IL->getType()->isSignedIntegerType()));
1396 }
1397 void JSONNodeDumper::VisitCharacterLiteral(const CharacterLiteral *CL) {
1398 // FIXME: This should probably print the character literal as a string,
1399 // rather than as a numerical value. It would be nice if the behavior matched
1400 // what we do to print a string literal; right now, it is impossible to tell
1401 // the difference between 'a' and L'a' in C from the JSON output.
1402 JOS.attribute("value", CL->getValue());
1403 }
1404 void JSONNodeDumper::VisitFixedPointLiteral(const FixedPointLiteral *FPL) {
1405 JOS.attribute("value", FPL->getValueAsString(/*Radix=*/10));
1406 }
1407 void JSONNodeDumper::VisitFloatingLiteral(const FloatingLiteral *FL) {
1408 llvm::SmallVector<char, 16> Buffer;
1409 FL->getValue().toString(Buffer);
1410 JOS.attribute("value", Buffer);
1411 }
1412 void JSONNodeDumper::VisitStringLiteral(const StringLiteral *SL) {
1413 std::string Buffer;
1414 llvm::raw_string_ostream SS(Buffer);
1415 SL->outputString(SS);
1416 JOS.attribute("value", SS.str());
1417 }
1418 void JSONNodeDumper::VisitCXXBoolLiteralExpr(const CXXBoolLiteralExpr *BLE) {
1419 JOS.attribute("value", BLE->getValue());
1420 }
1421
1422 void JSONNodeDumper::VisitIfStmt(const IfStmt *IS) {
1423 attributeOnlyIfTrue("hasInit", IS->hasInitStorage());
1424 attributeOnlyIfTrue("hasVar", IS->hasVarStorage());
1425 attributeOnlyIfTrue("hasElse", IS->hasElseStorage());
1426 attributeOnlyIfTrue("isConstexpr", IS->isConstexpr());
1427 }
1428
1429 void JSONNodeDumper::VisitSwitchStmt(const SwitchStmt *SS) {
1430 attributeOnlyIfTrue("hasInit", SS->hasInitStorage());
1431 attributeOnlyIfTrue("hasVar", SS->hasVarStorage());
1432 }
1433 void JSONNodeDumper::VisitCaseStmt(const CaseStmt *CS) {
1434 attributeOnlyIfTrue("isGNURange", CS->caseStmtIsGNURange());
1435 }
1436
1437 void JSONNodeDumper::VisitLabelStmt(const LabelStmt *LS) {
1438 JOS.attribute("name", LS->getName());
1439 JOS.attribute("declId", createPointerRepresentation(LS->getDecl()));
1440 }
1441 void JSONNodeDumper::VisitGotoStmt(const GotoStmt *GS) {
1442 JOS.attribute("targetLabelDeclId",
1443 createPointerRepresentation(GS->getLabel()));
1444 }
1445
1446 void JSONNodeDumper::VisitWhileStmt(const WhileStmt *WS) {
1447 attributeOnlyIfTrue("hasVar", WS->hasVarStorage());
1448 }
1449
1450 void JSONNodeDumper::VisitObjCAtCatchStmt(const ObjCAtCatchStmt* OACS) {
1451 // FIXME: it would be nice for the ASTNodeTraverser would handle the catch
1452 // parameter the same way for C++ and ObjC rather. In this case, C++ gets a
1453 // null child node and ObjC gets no child node.
1454 attributeOnlyIfTrue("isCatchAll", OACS->getCatchParamDecl() == nullptr);
1455 }
1456
1457 void JSONNodeDumper::VisitNullTemplateArgument(const TemplateArgument &TA) {
1458 JOS.attribute("isNull", true);
1459 }
1460 void JSONNodeDumper::VisitTypeTemplateArgument(const TemplateArgument &TA) {
1461 JOS.attribute("type", createQualType(TA.getAsType()));
1462 }
1463 void JSONNodeDumper::VisitDeclarationTemplateArgument(
1464 const TemplateArgument &TA) {
1465 JOS.attribute("decl", createBareDeclRef(TA.getAsDecl()));
1466 }
1467 void JSONNodeDumper::VisitNullPtrTemplateArgument(const TemplateArgument &TA) {
1468 JOS.attribute("isNullptr", true);
1469 }
1470 void JSONNodeDumper::VisitIntegralTemplateArgument(const TemplateArgument &TA) {
1471 JOS.attribute("value", TA.getAsIntegral().getSExtValue());
1472 }
1473 void JSONNodeDumper::VisitTemplateTemplateArgument(const TemplateArgument &TA) {
1474 // FIXME: cannot just call dump() on the argument, as that doesn't specify
1475 // the output format.
1476 }
1477 void JSONNodeDumper::VisitTemplateExpansionTemplateArgument(
1478 const TemplateArgument &TA) {
1479 // FIXME: cannot just call dump() on the argument, as that doesn't specify
1480 // the output format.
1481 }
1482 void JSONNodeDumper::VisitExpressionTemplateArgument(
1483 const TemplateArgument &TA) {
1484 JOS.attribute("isExpr", true);
1485 }
1486 void JSONNodeDumper::VisitPackTemplateArgument(const TemplateArgument &TA) {
1487 JOS.attribute("isPack", true);
1488 }
1489
1490 StringRef JSONNodeDumper::getCommentCommandName(unsigned CommandID) const {
1491 if (Traits)
1492 return Traits->getCommandInfo(CommandID)->Name;
1493 if (const comments::CommandInfo *Info =
1494 comments::CommandTraits::getBuiltinCommandInfo(CommandID))
1495 return Info->Name;
1496 return "<invalid>";
1497 }
1498
1499 void JSONNodeDumper::visitTextComment(const comments::TextComment *C,
1500 const comments::FullComment *) {
1501 JOS.attribute("text", C->getText());
1502 }
1503
1504 void JSONNodeDumper::visitInlineCommandComment(
1505 const comments::InlineCommandComment *C, const comments::FullComment *) {
1506 JOS.attribute("name", getCommentCommandName(C->getCommandID()));
1507
1508 switch (C->getRenderKind()) {
1509 case comments::InlineCommandComment::RenderNormal:
1510 JOS.attribute("renderKind", "normal");
1511 break;
1512 case comments::InlineCommandComment::RenderBold:
1513 JOS.attribute("renderKind", "bold");
1514 break;
1515 case comments::InlineCommandComment::RenderEmphasized:
1516 JOS.attribute("renderKind", "emphasized");
1517 break;
1518 case comments::InlineCommandComment::RenderMonospaced:
1519 JOS.attribute("renderKind", "monospaced");
1520 break;
1521 case comments::InlineCommandComment::RenderAnchor:
1522 JOS.attribute("renderKind", "anchor");
1523 break;
1524 }
1525
1526 llvm::json::Array Args;
1527 for (unsigned I = 0, E = C->getNumArgs(); I < E; ++I)
1528 Args.push_back(C->getArgText(I));
1529
1530 if (!Args.empty())
1531 JOS.attribute("args", std::move(Args));
1532 }
1533
1534 void JSONNodeDumper::visitHTMLStartTagComment(
1535 const comments::HTMLStartTagComment *C, const comments::FullComment *) {
1536 JOS.attribute("name", C->getTagName());
1537 attributeOnlyIfTrue("selfClosing", C->isSelfClosing());
1538 attributeOnlyIfTrue("malformed", C->isMalformed());
1539
1540 llvm::json::Array Attrs;
1541 for (unsigned I = 0, E = C->getNumAttrs(); I < E; ++I)
1542 Attrs.push_back(
1543 {{"name", C->getAttr(I).Name}, {"value", C->getAttr(I).Value}});
1544
1545 if (!Attrs.empty())
1546 JOS.attribute("attrs", std::move(Attrs));
1547 }
1548
1549 void JSONNodeDumper::visitHTMLEndTagComment(
1550 const comments::HTMLEndTagComment *C, const comments::FullComment *) {
1551 JOS.attribute("name", C->getTagName());
1552 }
1553
1554 void JSONNodeDumper::visitBlockCommandComment(
1555 const comments::BlockCommandComment *C, const comments::FullComment *) {
1556 JOS.attribute("name", getCommentCommandName(C->getCommandID()));
1557
1558 llvm::json::Array Args;
1559 for (unsigned I = 0, E = C->getNumArgs(); I < E; ++I)
1560 Args.push_back(C->getArgText(I));
1561
1562 if (!Args.empty())
1563 JOS.attribute("args", std::move(Args));
1564 }
1565
1566 void JSONNodeDumper::visitParamCommandComment(
1567 const comments::ParamCommandComment *C, const comments::FullComment *FC) {
1568 switch (C->getDirection()) {
1569 case comments::ParamCommandComment::In:
1570 JOS.attribute("direction", "in");
1571 break;
1572 case comments::ParamCommandComment::Out:
1573 JOS.attribute("direction", "out");
1574 break;
1575 case comments::ParamCommandComment::InOut:
1576 JOS.attribute("direction", "in,out");
1577 break;
1578 }
1579 attributeOnlyIfTrue("explicit", C->isDirectionExplicit());
1580
1581 if (C->hasParamName())
1582 JOS.attribute("param", C->isParamIndexValid() ? C->getParamName(FC)
1583 : C->getParamNameAsWritten());
1584
1585 if (C->isParamIndexValid() && !C->isVarArgParam())
1586 JOS.attribute("paramIdx", C->getParamIndex());
1587 }
1588
1589 void JSONNodeDumper::visitTParamCommandComment(
1590 const comments::TParamCommandComment *C, const comments::FullComment *FC) {
1591 if (C->hasParamName())
1592 JOS.attribute("param", C->isPositionValid() ? C->getParamName(FC)
1593 : C->getParamNameAsWritten());
1594 if (C->isPositionValid()) {
1595 llvm::json::Array Positions;
1596 for (unsigned I = 0, E = C->getDepth(); I < E; ++I)
1597 Positions.push_back(C->getIndex(I));
1598
1599 if (!Positions.empty())
1600 JOS.attribute("positions", std::move(Positions));
1601 }
1602 }
1603
1604 void JSONNodeDumper::visitVerbatimBlockComment(
1605 const comments::VerbatimBlockComment *C, const comments::FullComment *) {
1606 JOS.attribute("name", getCommentCommandName(C->getCommandID()));
1607 JOS.attribute("closeName", C->getCloseName());
1608 }
1609
1610 void JSONNodeDumper::visitVerbatimBlockLineComment(
1611 const comments::VerbatimBlockLineComment *C,
1612 const comments::FullComment *) {
1613 JOS.attribute("text", C->getText());
1614 }
1615
1616 void JSONNodeDumper::visitVerbatimLineComment(
1617 const comments::VerbatimLineComment *C, const comments::FullComment *) {
1618 JOS.attribute("text", C->getText());
1619 }
clang::JSONNodeDumper::VisitFieldDecl
void VisitFieldDecl(const FieldDecl *FD)
Definition: JSONNodeDumper.cpp:775
clang::JSONNodeDumper::VisitObjCProtocolDecl
void VisitObjCProtocolDecl(const ObjCProtocolDecl *D)
Definition: JSONNodeDumper.cpp:956
clang::ObjCPropertyRefExpr
ObjCPropertyRefExpr - A dot-syntax expression to access an ObjC property.
Definition: ExprObjC.h:614
clang::CXXCtorInitializer::isBaseInitializer
bool isBaseInitializer() const
Determine whether this initializer is initializing a base class.
Definition: DeclCXX.h:2224
clang::ObjCMessageExpr::SuperInstance
The receiver is the instance of the superclass object.
Definition: ExprObjC.h:1107
clang::ElaboratedType
Represents a type that was referred to using an elaborated type keyword, e.g., struct S...
Definition: Type.h:5285
clang::CastExpr::path_empty
bool path_empty() const
Definition: Expr.h:3220
clang::comments::ParamCommandComment::hasParamName
bool hasParamName() const
Definition: Comment.h:760
clang::UsingShadowDecl::getTargetDecl
NamedDecl * getTargetDecl() const
Gets the underlying declaration which has been brought into the local scope.
Definition: DeclCXX.h:3224
clang::CXXTemporary::getDestructor
const CXXDestructorDecl * getDestructor() const
Definition: ExprCXX.h:1352
clang::FunctionDecl
Represents a function declaration or definition.
Definition: Decl.h:1783
clang::DeclRefExpr::getFoundDecl
NamedDecl * getFoundDecl()
Get the NamedDecl through which this reference occurred.
Definition: Expr.h:1284
clang::comments::ParamCommandComment::isVarArgParam
bool isVarArgParam() const LLVM_READONLY
Definition: Comment.h:778
clang::ObjCBoolLiteralExpr::getValue
bool getValue() const
Definition: ExprObjC.h:97
clang::ObjCMessageExpr::Instance
The receiver is an object instance.
Definition: ExprObjC.h:1101
clang::ObjCInterfaceDecl::protocols
protocol_range protocols() const
Definition: DeclObjC.h:1380
clang::EST_None
no exception specification
Definition: ExceptionSpecificationType.h:21
clang::comments::InlineCommandComment::RenderAnchor
Definition: Comment.h:315
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::comments::BlockCommandComment::getArgText
StringRef getArgText(unsigned Idx) const
Definition: Comment.h:674
clang::QualType
A (possibly-)qualified type.
Definition: Type.h:654
clang::SD_Static
Static storage duration.
Definition: Specifiers.h:310
clang::Decl::getDeclKindName
const char * getDeclKindName() const
Definition: DeclBase.cpp:123
clang::CXXRecordDecl::bases
base_class_range bases()
Definition: DeclCXX.h:587
clang::JSONNodeDumper::visitParamCommandComment
void visitParamCommandComment(const comments::ParamCommandComment *C, const comments::FullComment *FC)
Definition: JSONNodeDumper.cpp:1566
clang::MemberExpr::getMemberDecl
ValueDecl * getMemberDecl() const
Retrieve the member declaration to which this expression refers.
Definition: Expr.h:2919
clang::comments::BlockCommandComment::getCommandID
unsigned getCommandID() const
Definition: Comment.h:652
clang::JSONNodeDumper::VisitObjCBoxedExpr
void VisitObjCBoxedExpr(const ObjCBoxedExpr *OBE)
Definition: JSONNodeDumper.cpp:1078
clang::JSONNodeDumper::VisitFloatingLiteral
void VisitFloatingLiteral(const FloatingLiteral *FL)
Definition: JSONNodeDumper.cpp:1407
clang::ObjCSubscriptRefExpr::getAtIndexMethodDecl
ObjCMethodDecl * getAtIndexMethodDecl() const
Definition: ExprObjC.h:896
clang::comments::InlineCommandComment::RenderEmphasized
Definition: Comment.h:314
clang::JSONNodeDumper::VisitObjCSelectorExpr
void VisitObjCSelectorExpr(const ObjCSelectorExpr *OSE)
Definition: JSONNodeDumper.cpp:1088
clang::ObjCCategoryDecl::getClassInterface
ObjCInterfaceDecl * getClassInterface()
Definition: DeclObjC.h:2339
clang::ObjCMessageExpr::getSelector
Selector getSelector() const
Definition: ExprObjC.cpp:337
clang::CXXRecordDecl::getNumBases
unsigned getNumBases() const
Retrieves the number of base classes of this class.
Definition: DeclCXX.h:581
clang::EST_Unparsed
not parsed yet
Definition: ExceptionSpecificationType.h:32
clang::AutoTypeKeyword::GNUAutoType
__auto_type (GNU extension)
clang::ObjCPropertyImplDecl::getPropertyIvarDecl
ObjCIvarDecl * getPropertyIvarDecl() const
Definition: DeclObjC.h:2846
clang::ObjCPropertyRefExpr::isSuperReceiver
bool isSuperReceiver() const
Definition: ExprObjC.h:776
clang::JSONNodeDumper::VisitCXXDependentScopeMemberExpr
void VisitCXXDependentScopeMemberExpr(const CXXDependentScopeMemberExpr *ME)
Definition: JSONNodeDumper.cpp:1375
clang::IfStmt::hasVarStorage
bool hasVarStorage() const
True if this IfStmt has storage for a variable declaration.
Definition: Stmt.h:1904
clang::CXXUnresolvedConstructExpr::isListInitialization
bool isListInitialization() const
Determine whether this expression models list-initialization.
Definition: ExprCXX.h:3444
clang::JSONNodeDumper::VisitCXXNewExpr
void VisitCXXNewExpr(const CXXNewExpr *NE)
Definition: JSONNodeDumper.cpp:1189
clang::comments::TParamCommandComment::isPositionValid
bool isPositionValid() const LLVM_READONLY
Definition: Comment.h:844
clang::templateargumentvisitor::Base< llvm::make_const_ref, JSONNodeDumper, void, ParamTys... >::Visit
void Visit(REF(TemplateArgument) TA, ParamTys... P)
Definition: TemplateArgumentVisitor.h:33
clang::JSONNodeDumper::VisitInjectedClassNameType
void VisitInjectedClassNameType(const InjectedClassNameType *ICNT)
Definition: JSONNodeDumper.cpp:663
clang::ObjCProtocolExpr::getProtocol
ObjCProtocolDecl * getProtocol() const
Definition: ExprObjC.h:519
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::CXXDeleteExpr::isArrayFormAsWritten
bool isArrayFormAsWritten() const
Definition: ExprCXX.h:2387
clang::IfStmt
IfStmt - This represents an if/then/else.
Definition: Stmt.h:1834
clang::JSONNodeDumper::VisitUsingDecl
void VisitUsingDecl(const UsingDecl *UD)
Definition: JSONNodeDumper.cpp:735
clang::SourceManager::getBufferName
StringRef getBufferName(SourceLocation Loc, bool *Invalid=nullptr) const
Return the filename or buffer identifier of the buffer the location is in.
Definition: SourceManager.cpp:1429
clang::ObjCSubscriptRefExpr::setAtIndexMethodDecl
ObjCMethodDecl * setAtIndexMethodDecl() const
Definition: ExprObjC.h:900
clang::EnumConstantDecl
An instance of this object exists for each enum constant that is defined.
Definition: Decl.h:2941
clang::JSONNodeDumper::VisitObjCIvarRefExpr
void VisitObjCIvarRefExpr(const ObjCIvarRefExpr *OIRE)
Definition: JSONNodeDumper.cpp:1128
clang::VarDecl::getStorageClass
StorageClass getStorageClass() const
Returns the storage class as written in the source.
Definition: Decl.h:1029
Base
clang::TypedefDecl
Represents the declaration of a typedef-name via the &#39;typedef&#39; type specifier.
Definition: Decl.h:3173
clang::FunctionDecl::isConstexpr
bool isConstexpr() const
Whether this is a (C++11) constexpr function or constexpr constructor.
Definition: Decl.h:2200
clang::comments::VerbatimBlockComment::getCloseName
StringRef getCloseName() const
Definition: Comment.h:929
clang::ExprWithCleanups::getObjects
ArrayRef< CleanupObject > getObjects() const
Definition: ExprCXX.h:3332
createCopyConstructorDefinitionData
static llvm::json::Object createCopyConstructorDefinitionData(const CXXRecordDecl *RD)
Definition: JSONNodeDumper.cpp:349
clang::JSONNodeDumper::VisitNamedDecl
void VisitNamedDecl(const NamedDecl *ND)
Definition: JSONNodeDumper.cpp:697
clang::Decl
Decl - This represents one declaration (or definition), e.g.
Definition: DeclBase.h:88
clang::CXXRecordDecl::needsOverloadResolutionForDestructor
bool needsOverloadResolutionForDestructor() const
Determine whether we need to eagerly declare a destructor for this class.
Definition: DeclCXX.h:955
clang::TagType::getDecl
TagDecl * getDecl() const
Definition: Type.cpp:3296
clang::FloatingLiteral::getValue
llvm::APFloat getValue() const
Definition: Expr.h:1597
clang::ObjCPropertyRefExpr::getImplicitPropertySetter
ObjCMethodDecl * getImplicitPropertySetter() const
Definition: ExprObjC.h:717
clang::JSONNodeDumper::VisitUnaryTransformType
void VisitUnaryTransformType(const UnaryTransformType *UTT)
Definition: JSONNodeDumper.cpp:618
clang::CXXNewExpr::getOperatorNew
FunctionDecl * getOperatorNew() const
Definition: ExprCXX.h:2218
clang::CXXBaseSpecifier::isVirtual
bool isVirtual() const
Determines whether the base class is a virtual base class (or not).
Definition: DeclCXX.h:198
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::BinaryOperator::getOpcode
Opcode getOpcode() const
Definition: Expr.h:3469
clang::comments::Comment::getLocation
SourceLocation getLocation() const LLVM_READONLY
Definition: Comment.h:222
clang::AutoType
Represents a C++11 auto or C++14 decltype(auto) type, possibly constrained by a type-constraint.
Definition: Type.h:4874
clang::JSONNodeDumper::VisitObjCPropertyRefExpr
void VisitObjCPropertyRefExpr(const ObjCPropertyRefExpr *OPRE)
Definition: JSONNodeDumper.cpp:1100
clang::IntegerLiteral
Definition: Expr.h:1446
clang::Type
The base class of the type hierarchy.
Definition: Type.h:1450
clang::CXXConstructExpr::requiresZeroInitialization
bool requiresZeroInitialization() const
Whether this construction first requires zero-initialization before the initializer is called...
Definition: ExprCXX.h:1533
clang::ObjCTypeParamVariance::Covariant
The parameter is covariant, e.g., X<T> is a subtype of X<U> when the type parameter is covariant and ...
clang::JSONNodeDumper::VisitTypedefType
void VisitTypedefType(const TypedefType *TT)
Definition: JSONNodeDumper.cpp:492
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::TypeVisitor< JSONNodeDumper >::Visit
void Visit(const Type *T)
Performs the operation associated with this visitor object.
Definition: TypeVisitor.h:68
clang::JSONNodeDumper::VisitObjCMessageExpr
void VisitObjCMessageExpr(const ObjCMessageExpr *OME)
Definition: JSONNodeDumper.cpp:1048
clang::AccessSpecifier
AccessSpecifier
A C++ access specifier (public, private, protected), plus the special value "none" which means differ...
Definition: Specifiers.h:113
clang::comments::ParamCommandComment::getParamName
StringRef getParamName(const FullComment *FC) const
Definition: Comment.cpp:371
clang::TypeSourceInfo
A container of type source information.
Definition: Type.h:6227
clang::FunctionProtoType::ExtProtoInfo::RefQualifier
RefQualifierKind RefQualifier
Definition: Type.h:3842
clang::AutoTypeKeyword::Auto
auto
clang::JSONNodeDumper::VisitDependentSizedExtVectorType
void VisitDependentSizedExtVectorType(const DependentSizedExtVectorType *VT)
Definition: JSONNodeDumper.cpp:585
clang::SwitchStmt::hasVarStorage
bool hasVarStorage() const
True if this SwitchStmt has storage for a condition variable.
Definition: Stmt.h:2101
clang::PredefinedExpr::getIdentKind
IdentKind getIdentKind() const
Definition: Expr.h:1951
clang::JSONNodeDumper::VisitMemberPointerType
void VisitMemberPointerType(const MemberPointerType *MPT)
Definition: JSONNodeDumper.cpp:692
clang::JSONNodeDumper::visitTextComment
void visitTextComment(const comments::TextComment *C, const comments::FullComment *)
Definition: JSONNodeDumper.cpp:1499
clang::TemplateTypeParmType::getDecl
TemplateTypeParmDecl * getDecl() const
Definition: Type.h:4694
clang::CXXConstructorDecl
Represents a C++ constructor within a class.
Definition: DeclCXX.h:2383
clang::JSONNodeDumper::VisitWhileStmt
void VisitWhileStmt(const WhileStmt *WS)
Definition: JSONNodeDumper.cpp:1446
clang::MaterializeTemporaryExpr
Represents a prvalue temporary that is written into memory so that a reference can bind to it...
Definition: ExprCXX.h:4419
clang::JSONNodeDumper::VisitTemplateTypeParmType
void VisitTemplateTypeParmType(const TemplateTypeParmType *TTPT)
Definition: JSONNodeDumper.cpp:630
clang::FunctionDecl::isVirtualAsWritten
bool isVirtualAsWritten() const
Whether this function is marked as virtual explicitly.
Definition: Decl.h:2096
clang::CXXRecordDecl::needsOverloadResolutionForCopyConstructor
bool needsOverloadResolutionForCopyConstructor() const
Determine whether we need to eagerly declare a defaulted copy constructor for this class...
Definition: DeclCXX.h:772
clang::FieldDecl::hasInClassInitializer
bool hasInClassInitializer() const
Determine whether this member has a C++11 default member initializer.
Definition: Decl.h:2869
clang::NOUR_Unevaluated
This name appears in an unevaluated operand.
Definition: Specifiers.h:164
clang::TagDecl::isCompleteDefinition
bool isCompleteDefinition() const
Return true if this decl has its body fully specified.
Definition: Decl.h:3324
clang::JSONNodeDumper::VisitUnaryExprOrTypeTraitExpr
void VisitUnaryExprOrTypeTraitExpr(const UnaryExprOrTypeTraitExpr *TTE)
Definition: JSONNodeDumper.cpp:1235
clang::JSONNodeDumper::VisitDeclRefExpr
void VisitDeclRefExpr(const DeclRefExpr *DRE)
Definition: JSONNodeDumper.cpp:1138
clang::TemplateParmPosition::getDepth
unsigned getDepth() const
Get the nesting depth of the template parameter.
Definition: DeclTemplate.h:1160
clang::JSONNodeDumper::VisitTypeTemplateArgument
void VisitTypeTemplateArgument(const TemplateArgument &TA)
Definition: JSONNodeDumper.cpp:1460
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::JSONNodeDumper::VisitIntegralTemplateArgument
void VisitIntegralTemplateArgument(const TemplateArgument &TA)
Definition: JSONNodeDumper.cpp:1470
clang::VarDecl
Represents a variable declaration or definition.
Definition: Decl.h:820
clang::comments::InlineCommandComment::getArgText
StringRef getArgText(unsigned Idx) const
Definition: Comment.h:362
clang::SC_None
Definition: Specifiers.h:237
clang::ObjCPropertyDecl::PropertyAttributeKind
PropertyAttributeKind
Definition: DeclObjC.h:745
clang::EnumDecl::isFixed
bool isFixed() const
Returns true if this is an Objective-C, C++11, or Microsoft-style enumeration with a fixed underlying...
Definition: Decl.h:3684
clang::Type::getAs
const T * getAs() const
Member-template getAs<specific type>&#39;.
Definition: Type.h:7002
clang::ObjCCategoryDecl::getImplementation
ObjCCategoryImplDecl * getImplementation() const
Definition: DeclObjC.cpp:2045
clang::CXXConstructExpr::CK_VirtualBase
Definition: ExprCXX.h:1429
clang::NonTypeTemplateParmDecl::hasDefaultArgument
bool hasDefaultArgument() const
Determine whether this template parameter has a default argument.
Definition: DeclTemplate.h:1462
clang::EST_Dynamic
throw(T1, T2)
Definition: ExceptionSpecificationType.h:23
clang::FunctionProtoType::ExtProtoInfo
Extra information about a function prototype.
Definition: Type.h:3837
clang::ObjCMethodDecl
ObjCMethodDecl - Represents an instance or class method declaration.
Definition: DeclObjC.h:138
createMoveConstructorDefinitionData
static llvm::json::Object createMoveConstructorDefinitionData(const CXXRecordDecl *RD)
Definition: JSONNodeDumper.cpp:367
clang::SwitchStmt::hasInitStorage
bool hasInitStorage() const
True if this SwitchStmt has storage for an init statement.
Definition: Stmt.h:2098
clang::OverloadExpr::getName
DeclarationName getName() const
Gets the name looked up.
Definition: ExprCXX.h:2953
clang::FunctionType::isConst
bool isConst() const
Definition: Type.h:3697
clang::LabelStmt::getName
const char * getName() const
Definition: Stmt.cpp:352
clang::Decl::isInvalidDecl
bool isInvalidDecl() const
Definition: DeclBase.h:553
clang::CXXNewExpr::getNumPlacementArgs
unsigned getNumPlacementArgs() const
Definition: ExprCXX.h:2236
clang::UnresolvedLookupExpr::requiresADL
bool requiresADL() const
True if this declaration should be extended by argument-dependent lookup.
Definition: ExprCXX.h:3105
clang::VarDecl::TLS_None
Not a TLS variable.
Definition: Decl.h:837
clang::comments::TParamCommandComment::getIndex
unsigned getIndex(unsigned Depth) const
Definition: Comment.h:853
clang::ObjCProtocolDecl::protocols
protocol_range protocols() const
Definition: DeclObjC.h:2143
clang::ExprWithCleanups
Represents an expression – generally a full-expression – that introduces cleanups to be run at the ...
Definition: ExprCXX.h:3306
clang::EST_DependentNoexcept
noexcept(expression), value-dependent
Definition: ExceptionSpecificationType.h:27
clang::JSONNodeDumper::VisitObjCIvarDecl
void VisitObjCIvarDecl(const ObjCIvarDecl *D)
Definition: JSONNodeDumper.cpp:902
clang::ObjCImplementationDecl::getSuperClass
const ObjCInterfaceDecl * getSuperClass() const
Definition: DeclObjC.h:2703
clang::ObjCPropertyRefExpr::getExplicitProperty
ObjCPropertyDecl * getExplicitProperty() const
Definition: ExprObjC.h:707
clang::JSONNodeDumper::VisitCXXConstructExpr
void VisitCXXConstructExpr(const CXXConstructExpr *CE)
Definition: JSONNodeDumper.cpp:1305
clang::comments::TParamCommandComment::getDepth
unsigned getDepth() const
Definition: Comment.h:848
clang::ObjCPropertyDecl::None
Definition: DeclObjC.h:774
clang::comments::CommandInfo
Information about a single command.
Definition: CommentCommandTraits.h:32
clang::Stmt::getStmtClassName
const char * getStmtClassName() const
Definition: Stmt.cpp:76
clang::DependentSizedExtVectorType::getAttributeLoc
SourceLocation getAttributeLoc() const
Definition: Type.h:3212
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::LinkageSpecDecl::getLanguage
LanguageIDs getLanguage() const
Return the language specified by this linkage specification.
Definition: DeclCXX.h:2807
clang::NamedDecl::getDeclName
DeclarationName getDeclName() const
Get the actual, stored name of the declaration, which may be a special name.
Definition: Decl.h:272
clang::FriendDecl::getFriendType
TypeSourceInfo * getFriendType() const
If this friend declaration names an (untemplated but possibly dependent) type, return the type; other...
Definition: DeclFriend.h:123
clang::TemplateTypeParmDecl::getDepth
unsigned getDepth() const
Retrieve the depth of the template parameter.
Definition: DeclTemplate.cpp:642
clang::comments::VerbatimLineComment::getText
StringRef getText() const
Definition: Comment.h:972
clang::TemplateName::print
void print(raw_ostream &OS, const PrintingPolicy &Policy, bool SuppressNNS=false) const
Print the template name.
Definition: TemplateName.cpp:220
clang::ExprWithCleanups::cleanupsHaveSideEffects
bool cleanupsHaveSideEffects() const
Definition: ExprCXX.h:3344
clang::CompoundAssignOperator::getComputationResultType
QualType getComputationResultType() const
Definition: Expr.h:3680
clang::FunctionType::ExtInfo::getRegParm
unsigned getRegParm() const
Definition: Type.h:3585
clang::Attr::isImplicit
bool isImplicit() const
Returns true if the attribute has been implicitly created instead of explicitly written by the user...
Definition: Attr.h:98
clang::NamespaceDecl::isInline
bool isInline() const
Returns true if this is an inline namespace declaration.
Definition: Decl.h:558
clang::VectorType::NeonVector
is ARM Neon vector
Definition: Type.h:3251
llvm::Optional< unsigned >
clang::comments::InlineCommandComment::getRenderKind
RenderKind getRenderKind() const
Definition: Comment.h:354
clang::JSONNodeDumper::VisitNamespaceDecl
void VisitNamespaceDecl(const NamespaceDecl *ND)
Definition: JSONNodeDumper.cpp:716
clang::ObjCPropertyDecl::Required
Definition: DeclObjC.h:774
clang::UETT_PreferredAlignOf
Used for GCC&#39;s __alignof.
Definition: TypeTraits.h:106
clang::ObjCTypeParamVariance::Contravariant
The parameter is contravariant, e.g., X<T> is a subtype of X<U> when the type parameter is covariant ...
clang::ReferenceType::isSpelledAsLValue
bool isSpelledAsLValue() const
Definition: Type.h:2766
clang::comments::InlineCommandComment::RenderBold
Definition: Comment.h:312
clang::FieldDecl
Represents a member of a struct/union/class.
Definition: Decl.h:2729
clang::TemplateSpecializationType::getTemplateName
TemplateName getTemplateName() const
Retrieve the name of the template that we are specializing.
Definition: Type.h:5059
clang::CXXCtorInitializer::getTypeSourceInfo
TypeSourceInfo * getTypeSourceInfo() const
Returns the declarator information for a base class or delegating initializer.
Definition: DeclCXX.h:2285
clang::ArrayType::Static
Definition: Type.h:2896
clang::comments::VerbatimBlockLineComment::getText
StringRef getText() const LLVM_READONLY
Definition: Comment.h:885
clang::MacroQualifiedType::getMacroIdentifier
const IdentifierInfo * getMacroIdentifier() const
Definition: Type.h:4284
clang::JSONNodeDumper::VisitDeclarationTemplateArgument
void VisitDeclarationTemplateArgument(const TemplateArgument &TA)
Definition: JSONNodeDumper.cpp:1463
clang::ObjCPropertyDecl::getSetterMethodDecl
ObjCMethodDecl * getSetterMethodDecl() const
Definition: DeclObjC.h:939
clang::Decl::getSourceRange
virtual SourceRange getSourceRange() const LLVM_READONLY
Source range that this declaration covers.
Definition: DeclBase.h:417
clang::ASTNameGenerator::getName
std::string getName(const Decl *D)
Definition: Mangle.cpp:485
clang::JSONNodeDumper::VisitFriendDecl
void VisitFriendDecl(const FriendDecl *FD)
Definition: JSONNodeDumper.cpp:897
clang::ElaboratedType::getOwnedTagDecl
TagDecl * getOwnedTagDecl() const
Return the (re)declaration of this type owned by this occurrence of this type, or nullptr if there is...
Definition: Type.h:5335
clang::FixedPointLiteral
Definition: Expr.h:1489
Category
int Category
Definition: Format.cpp:1828
clang::AccessSpecDecl
Represents an access specifier followed by colon &#39;:&#39;.
Definition: DeclCXX.h:85
clang::JSONNodeDumper::VisitCXXUnresolvedConstructExpr
void VisitCXXUnresolvedConstructExpr(const CXXUnresolvedConstructExpr *UCE)
Definition: JSONNodeDumper.cpp:1298
clang::JSONNodeDumper::VisitObjCCompatibleAliasDecl
void VisitObjCCompatibleAliasDecl(const ObjCCompatibleAliasDecl *D)
Definition: JSONNodeDumper.cpp:985
clang::VK_RValue
An r-value expression (a pr-value in the C++11 taxonomy) produces a temporary value.
Definition: Specifiers.h:125
clang::ObjCSelectorExpr::getSelector
Selector getSelector() const
Definition: ExprObjC.h:467
clang::JSONNodeDumper::VisitUnaryOperator
void VisitUnaryOperator(const UnaryOperator *UO)
Definition: JSONNodeDumper.cpp:1155
clang::JSONNodeDumper::VisitExpressionTemplateArgument
void VisitExpressionTemplateArgument(const TemplateArgument &TA)
Definition: JSONNodeDumper.cpp:1482
clang::ObjCAtCatchStmt
Represents Objective-C&#39;s @catch statement.
Definition: StmtObjC.h:77
clang::JSONNodeDumper::VisitAccessSpecDecl
void VisitAccessSpecDecl(const AccessSpecDecl *ASD)
Definition: JSONNodeDumper.cpp:893
clang::FunctionType::ExtInfo::getProducesResult
bool getProducesResult() const
Definition: Type.h:3580
clang::BinaryOperator::getOpcodeStr
StringRef getOpcodeStr() const
Definition: Expr.h:3490
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::CXXTypeidExpr
A C++ typeid expression (C++ [expr.typeid]), which gets the type_info that corresponds to the supplie...
Definition: ExprCXX.h:764
clang::UsingDecl
Represents a C++ using-declaration.
Definition: DeclCXX.h:3369
clang::ObjCIvarRefExpr::isArrow
bool isArrow() const
Definition: ExprObjC.h:584
createMoveAssignmentDefinitionData
static llvm::json::Object createMoveAssignmentDefinitionData(const CXXRecordDecl *RD)
Definition: JSONNodeDumper.cpp:399
clang::UnresolvedUsingType::getDecl
UnresolvedUsingTypenameDecl * getDecl() const
Definition: Type.h:4221
clang::GenericSelectionExpr::ConstAssociation
AssociationTy< true > ConstAssociation
Definition: Expr.h:5394
clang::FieldDecl::isBitField
bool isBitField() const
Determines whether this field is a bitfield.
Definition: Decl.h:2807
clang::JSONNodeDumper::VisitSizeOfPackExpr
void VisitSizeOfPackExpr(const SizeOfPackExpr *SOPE)
Definition: JSONNodeDumper.cpp:1249
clang::RQ_LValue
An lvalue ref-qualifier was provided (&).
Definition: Type.h:1406
clang::comments::VerbatimBlockLineComment
A line of text contained in a verbatim block.
Definition: Comment.h:865
clang::ObjCPropertyRefExpr::isMessagingSetter
bool isMessagingSetter() const
True if the property reference will result in a message to the setter.
Definition: ExprObjC.h:744
clang::CXXDeleteExpr::getOperatorDelete
FunctionDecl * getOperatorDelete() const
Definition: ExprCXX.h:2399
clang::LinkageSpecDecl::lang_c
Definition: DeclCXX.h:2787
clang::JSONNodeDumper::VisitTemplateTypeParmDecl
void VisitTemplateTypeParmDecl(const TemplateTypeParmDecl *D)
Definition: JSONNodeDumper.cpp:836
clang::AS_private
Definition: Specifiers.h:116
clang::CXXConstructExpr::isElidable
bool isElidable() const
Whether this construction is elidable.
Definition: ExprCXX.h:1500
clang::JSONNodeDumper::VisitCharacterLiteral
void VisitCharacterLiteral(const CharacterLiteral *CL)
Definition: JSONNodeDumper.cpp:1397
clang::CXXNewExpr::isGlobalNew
bool isGlobalNew() const
Definition: ExprCXX.h:2259
clang::EST_MSAny
Microsoft throw(...) extension.
Definition: ExceptionSpecificationType.h:24
clang::comments::TextComment
Plain text.
Definition: Comment.h:263
clang::comments::VerbatimLineComment
A verbatim line command.
Definition: Comment.h:945
clang::CXXBaseSpecifier::getAccessSpecifier
AccessSpecifier getAccessSpecifier() const
Returns the access specifier for this base specifier.
Definition: DeclCXX.h:225
clang::LabelStmt::getDecl
LabelDecl * getDecl() const
Definition: Stmt.h:1749
clang::JSONNodeDumper::VisitObjCTypeParamDecl
void VisitObjCTypeParamDecl(const ObjCTypeParamDecl *D)
Definition: JSONNodeDumper.cpp:922
clang::VK_XValue
An x-value expression is a reference to an object with independent storage but which can be "moved"...
Definition: Specifiers.h:134
clang::TemplateSpecializationType::isTypeAlias
bool isTypeAlias() const
Determine if this template specialization type is for a type alias template that has been substituted...
Definition: Type.h:5044
clang::CastExpr::path_begin
path_iterator path_begin()
Definition: Expr.h:3222
clang::SourceManager::getExpansionLoc
SourceLocation getExpansionLoc(SourceLocation Loc) const
Given a SourceLocation object Loc, return the expansion location referenced by the ID...
Definition: SourceManager.h:1159
clang::ObjCPropertyDecl::getPropertyAttributes
PropertyAttributeKind getPropertyAttributes() const
Definition: DeclObjC.h:853
clang::MacroQualifiedType
Sugar type that represents a type that was qualified by a qualifier written as a macro invocation...
Definition: Type.h:4266
clang::ASTContext::getPrintingPolicy
const clang::PrintingPolicy & getPrintingPolicy() const
Definition: ASTContext.h:671
clang::BlockDecl::Capture::isByRef
bool isByRef() const
Whether this is a "by ref" capture, i.e.
Definition: Decl.h:4068
clang::Type::containsUnexpandedParameterPack
bool containsUnexpandedParameterPack() const
Whether this type is or contains an unexpanded parameter pack, used to support C++0x variadic templat...
Definition: Type.h:1896
clang::JSONNodeDumper::VisitObjCAtCatchStmt
void VisitObjCAtCatchStmt(const ObjCAtCatchStmt *OACS)
Definition: JSONNodeDumper.cpp:1450
clang::CXXDependentScopeMemberExpr::getNumTemplateArgs
unsigned getNumTemplateArgs() const
Retrieve the number of template arguments provided as part of this template-id.
Definition: ExprCXX.h:3713
clang::BinaryOperator
A builtin binary operation expression such as "x + y" or "x <= y".
Definition: Expr.h:3434
clang::ObjCPropertyDecl::OBJC_PR_nonatomic
Definition: DeclObjC.h:753
clang::UnaryOperator::isPostfix
static bool isPostfix(Opcode Op)
isPostfix - Return true if this is a postfix operation, like x++.
Definition: Expr.h:2093
clang::comments::Comment
Any part of the comment.
Definition: Comment.h:52
clang::SourceManager::getSpellingLineNumber
unsigned getSpellingLineNumber(SourceLocation Loc, bool *Invalid=nullptr) const
Definition: SourceManager.cpp:1371
clang::IfStmt::hasElseStorage
bool hasElseStorage() const
True if this IfStmt has storage for an else statement.
Definition: Stmt.h:1907
clang::InjectedClassNameType::getDecl
CXXRecordDecl * getDecl() const
Definition: Type.cpp:3386
clang::MemberExpr::isArrow
bool isArrow() const
Definition: Expr.h:3020
clang::VarDecl::isConstexpr
bool isConstexpr() const
Whether this variable is (C++11) constexpr.
Definition: Decl.h:1412
clang::JSONNodeDumper::VisitImplicitCastExpr
void VisitImplicitCastExpr(const ImplicitCastExpr *ICE)
Definition: JSONNodeDumper.cpp:1226
clang::CXXNewExpr::CallInit
New-expression has a C++98 paren-delimited initializer.
Definition: ExprCXX.h:2157
clang::JSONNodeDumper::VisitIntegerLiteral
void VisitIntegerLiteral(const IntegerLiteral *IL)
Definition: JSONNodeDumper.cpp:1392
clang::JSONNodeDumper::VisitObjCPropertyImplDecl
void VisitObjCPropertyImplDecl(const ObjCPropertyImplDecl *D)
Definition: JSONNodeDumper.cpp:1029
clang::JSONNodeDumper::VisitAutoType
void VisitAutoType(const AutoType *AT)
Definition: JSONNodeDumper.cpp:638
clang::CaseStmt
CaseStmt - Represent a case statement.
Definition: Stmt.h:1500
clang::JSONNodeDumper::VisitPredefinedExpr
void VisitPredefinedExpr(const PredefinedExpr *PE)
Definition: JSONNodeDumper.cpp:1151
clang::TemplateParmPosition::getIndex
unsigned getIndex() const
Get the index of the template parameter within its parameter list.
Definition: DeclTemplate.h:1168
clang::CXXCtorInitializer::isAnyMemberInitializer
bool isAnyMemberInitializer() const
Definition: DeclCXX.h:2232
clang::CastExpr
CastExpr - Base class for type casts, including both implicit casts (ImplicitCastExpr) and explicit c...
Definition: Expr.h:3150
clang::TemplateTypeParmDecl::hasDefaultArgument
bool hasDefaultArgument() const
Determine whether this template parameter has a default argument.
Definition: DeclTemplate.h:1248
clang::ObjCProtocolDecl
Represents an Objective-C protocol declaration.
Definition: DeclObjC.h:2078
clang::comments::ParamCommandComment::getParamIndex
unsigned getParamIndex() const LLVM_READONLY
Definition: Comment.h:787
clang::CXXBindTemporaryExpr
Represents binding an expression to a temporary.
Definition: ExprCXX.h:1373
clang::Decl::getLexicalDeclContext
DeclContext * getLexicalDeclContext()
getLexicalDeclContext - The declaration context where this Decl was lexically declared (LexicalDC)...
Definition: DeclBase.h:828
clang::SourceManager::getSpellingLoc
SourceLocation getSpellingLoc(SourceLocation Loc) const
Given a SourceLocation object, return the spelling location referenced by the ID. ...
Definition: SourceManager.h:1207
clang::CXXBindTemporaryExpr::getTemporary
CXXTemporary * getTemporary()
Definition: ExprCXX.h:1392
clang::CXXCtorInitializer::getAnyMember
FieldDecl * getAnyMember() const
Definition: DeclCXX.h:2297
clang::JSONNodeDumper::VisitTemplateExpansionTemplateArgument
void VisitTemplateExpansionTemplateArgument(const TemplateArgument &TA)
Definition: JSONNodeDumper.cpp:1477
clang::ObjCPropertyDecl::getPropertyImplementation
PropertyControl getPropertyImplementation() const
Definition: DeclObjC.h:947
clang::QualType::getAsOpaquePtr
void * getAsOpaquePtr() const
Definition: Type.h:699
clang::ObjCTypeParamDecl::hasExplicitBound
bool hasExplicitBound() const
Whether this type parameter has an explicitly-written type bound, e.g., "T : NSView".
Definition: DeclObjC.h:631
clang::CXXDependentScopeMemberExpr
Represents a C++ member access expression where the actual member referenced could not be resolved be...
Definition: ExprCXX.h:3511
clang::comments::ParamCommandComment::In
Definition: Comment.h:740
clang::FloatingLiteral
Definition: Expr.h:1583
clang::EST_BasicNoexcept
noexcept
Definition: ExceptionSpecificationType.h:26
clang::ObjCInterfaceDecl
Represents an ObjC class declaration.
Definition: DeclObjC.h:1186
clang::NOUR_None
This is an odr-use.
Definition: Specifiers.h:162
clang::LinkageSpecDecl
Represents a linkage specification.
Definition: DeclCXX.h:2778
clang::ObjCMethodDecl::getReturnType
QualType getReturnType() const
Definition: DeclObjC.h:324
clang::FunctionType::ExtInfo::getNoReturn
bool getNoReturn() const
Definition: Type.h:3579
clang::JSONNodeDumper::VisitIfStmt
void VisitIfStmt(const IfStmt *IS)
Definition: JSONNodeDumper.cpp:1422
clang::VectorType::NeonPolyVector
is ARM Neon polynomial vector
Definition: Type.h:3254
clang::TemplateTemplateParmDecl::isParameterPack
bool isParameterPack() const
Whether this template template parameter is a template parameter pack.
Definition: DeclTemplate.h:1669
clang::QualType::getSplitDesugaredType
SplitQualType getSplitDesugaredType() const
Definition: Type.h:958
clang::CXXConstructExpr::CK_Complete
Definition: ExprCXX.h:1427
clang::JSONNodeDumper::VisitTypeAliasDecl
void VisitTypeAliasDecl(const TypeAliasDecl *TAD)
Definition: JSONNodeDumper.cpp:711
clang::comments::HTMLStartTagComment::isSelfClosing
bool isSelfClosing() const
Definition: Comment.h:499
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::ObjCIvarRefExpr::getDecl
ObjCIvarDecl * getDecl()
Definition: ExprObjC.h:576
clang::CXXNewExpr::NoInit
New-expression has no initializer as written.
Definition: ExprCXX.h:2154
clang::AS_none
Definition: Specifiers.h:117
clang::CXXDeleteExpr::isArrayForm
bool isArrayForm() const
Definition: ExprCXX.h:2386
canPassInRegisters
static bool canPassInRegisters(Sema &S, CXXRecordDecl *D, TargetInfo::CallingConvKind CCK)
Determine whether a type is permitted to be passed or returned in registers, per C++ [class...
Definition: SemaDeclCXX.cpp:6204
clang::ObjCPropertyImplDecl
ObjCPropertyImplDecl - Represents implementation declaration of a property in a class or category imp...
Definition: DeclObjC.h:2773
clang::comments::CommandInfo::Name
const char * Name
Definition: CommentCommandTraits.h:37
clang::comments::VerbatimBlockComment
A verbatim block command (e.
Definition: Comment.h:893
clang::LinkageSpecDecl::hasBraces
bool hasBraces() const
Determines whether this linkage specification had braces in its syntactic form.
Definition: DeclCXX.h:2816
clang::JSONNodeDumper::VisitPackExpansionType
void VisitPackExpansionType(const PackExpansionType *PET)
Definition: JSONNodeDumper.cpp:672
clang::comments::TextComment::getText
StringRef getText() const LLVM_READONLY
Definition: Comment.h:283
clang::CXXConstructExpr::CK_NonVirtualBase
Definition: ExprCXX.h:1428
clang::CXXConstructExpr::isStdInitListInitialization
bool isStdInitListInitialization() const
Whether this constructor call was written as list-initialization, but was interpreted as forming a st...
Definition: ExprCXX.h:1524
clang::TypeAliasDecl
Represents the declaration of a typedef-name via a C++11 alias-declaration.
Definition: Decl.h:3193
clang::JSONNodeDumper::VisitArrayType
void VisitArrayType(const ArrayType *AT)
Definition: JSONNodeDumper.cpp:561
clang::FunctionProtoType
Represents a prototype with parameter type info, e.g.
Definition: Type.h:3754
clang::JSONNodeDumper::VisitRecordDecl
void VisitRecordDecl(const RecordDecl *RD)
Definition: JSONNodeDumper.cpp:815
clang::MaterializeTemporaryExpr::getExtendingDecl
ValueDecl * getExtendingDecl()
Get the declaration which triggered the lifetime-extension of this temporary, if any.
Definition: ExprCXX.h:4469
clang::CXXConstructExpr::getConstructor
CXXConstructorDecl * getConstructor() const
Get the constructor that this expression will (ultimately) call.
Definition: ExprCXX.h:1494
clang::comments::InlineCommandComment::getCommandID
unsigned getCommandID() const
Definition: Comment.h:342
clang::CompoundAssignOperator::getComputationLHSType
QualType getComputationLHSType() const
Definition: Expr.h:3677
clang::JSONNodeDumper::VisitCXXBindTemporaryExpr
void VisitCXXBindTemporaryExpr(const CXXBindTemporaryExpr *BTE)
Definition: JSONNodeDumper.cpp:1341
clang::CXXCtorInitializer::isDelegatingInitializer
bool isDelegatingInitializer() const
Determine whether this initializer is creating a delegating constructor.
Definition: DeclCXX.h:2252
clang::UnaryExprOrTypeTraitExpr
UnaryExprOrTypeTraitExpr - expression with either a type or (unevaluated) expression operand...
Definition: Expr.h:2372
clang::NonTypeTemplateParmDecl::isParameterPack
bool isParameterPack() const
Whether this parameter is a non-type template parameter pack.
Definition: DeclTemplate.h:1497
clang::IfStmt::isConstexpr
bool isConstexpr() const
Definition: Stmt.h:2007
clang::ConstantExpr
ConstantExpr - An expression that occurs in a constant context and optionally the result of evaluatin...
Definition: Expr.h:978
clang::TemplateArgument::getAsDecl
ValueDecl * getAsDecl() const
Retrieve the declaration for a declaration non-type template argument.
Definition: TemplateBase.h:263
clang::ObjCPropertyDecl::OBJC_PR_atomic
Definition: DeclObjC.h:755
clang::StringLiteral::outputString
void outputString(raw_ostream &OS) const
Definition: Expr.cpp:1106
clang::ArrayType::Normal
Definition: Type.h:2896
clang::JSONNodeDumper::VisitNullPtrTemplateArgument
void VisitNullPtrTemplateArgument(const TemplateArgument &TA)
Definition: JSONNodeDumper.cpp:1467
clang::JSONNodeDumper::VisitExprWithCleanups
void VisitExprWithCleanups(const ExprWithCleanups *EWC)
Definition: JSONNodeDumper.cpp:1330
clang::CharacterLiteral::getValue
unsigned getValue() const
Definition: Expr.h:1564
clang::ArrayType::Star
Definition: Type.h:2896
clang::ObjCBoxedExpr::getBoxingMethod
ObjCMethodDecl * getBoxingMethod() const
Definition: ExprObjC.h:145
clang::PresumedLoc::isValid
bool isValid() const
Definition: SourceLocation.h:316
clang::JSONNodeDumper::VisitCompoundAssignOperator
void VisitCompoundAssignOperator(const CompoundAssignOperator *CAO)
Definition: JSONNodeDumper.cpp:1166
clang::JSONNodeDumper::VisitObjCInterfaceDecl
void VisitObjCInterfaceDecl(const ObjCInterfaceDecl *D)
Definition: JSONNodeDumper.cpp:966
clang::FunctionDecl::isInlineSpecified
bool isInlineSpecified() const
Determine whether the "inline" keyword was specified for this function.
Definition: Decl.h:2499
clang::JSONNodeDumper::visitVerbatimBlockComment
void visitVerbatimBlockComment(const comments::VerbatimBlockComment *C, const comments::FullComment *)
Definition: JSONNodeDumper.cpp:1604
clang::BlockDecl
Represents a block literal declaration, which is like an unnamed FunctionDecl.
Definition: Decl.h:4037
clang::ValueDecl
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
Definition: Decl.h:619
clang::TagDecl::getKindName
StringRef getKindName() const
Definition: Decl.h:3394
clang::JSONNodeDumper::VisitCaseStmt
void VisitCaseStmt(const CaseStmt *CS)
Definition: JSONNodeDumper.cpp:1433
clang::FunctionDecl::isVariadic
bool isVariadic() const
Whether this function is variadic.
Definition: Decl.cpp:2827
clang::FunctionDecl::isDefaulted
bool isDefaulted() const
Whether this function is defaulted per C++0x.
Definition: Decl.h:2130
clang::PresumedLoc::isInvalid
bool isInvalid() const
Return true if this object is invalid or uninitialized.
Definition: SourceLocation.h:315
Label
std::string Label
Definition: UsingDeclarationsSorter.cpp:69
clang::EnumDecl::isScopedUsingClassTag
bool isScopedUsingClassTag() const
Returns true if this is a C++11 scoped enumeration.
Definition: Decl.h:3678
clang::AutoTypeKeyword::DecltypeAuto
decltype(auto)
clang::Lexer::MeasureTokenLength
static unsigned MeasureTokenLength(SourceLocation Loc, const SourceManager &SM, const LangOptions &LangOpts)
MeasureTokenLength - Relex the token at the specified location and return its length in bytes in the ...
Definition: Lexer.cpp:444
clang::TemplateTypeParmDecl
Declaration of a template type parameter.
Definition: DeclTemplate.h:1177
clang::TemplateTypeParmType::getIndex
unsigned getIndex() const
Definition: Type.h:4691
clang::FunctionType::ExtInfo::getHasRegParm
bool getHasRegParm() const
Definition: Type.h:3583
clang::Type::castAs
const T * castAs() const
Member-template castAs<specific type>.
Definition: Type.h:7067
clang::MemberExpr::isNonOdrUse
NonOdrUseReason isNonOdrUse() const
Is this expression a non-odr-use reference, and if so, why? This is only meaningful if the named memb...
Definition: Expr.h:3060
clang::PresumedLoc::getLine
unsigned getLine() const
Return the presumed line number of this location.
Definition: SourceLocation.h:334
clang::NOUR_Constant
This name appears as a potential result of an lvalue-to-rvalue conversion that is a constant expressi...
Definition: Specifiers.h:167
clang::CXXDestructorDecl
Represents a C++ destructor within a class.
Definition: DeclCXX.h:2649
clang::CXXNewExpr::ListInit
New-expression has a C++11 list-initializer.
Definition: ExprCXX.h:2160
clang::DeclarationName::getAsString
std::string getAsString() const
Retrieve the human-readable string for this name.
Definition: DeclarationName.cpp:223
clang::Decl::isImplicit
bool isImplicit() const
isImplicit - Indicates whether the declaration was implicitly generated by the implementation.
Definition: DeclBase.h:558
clang::Type::getTypeClassName
const char * getTypeClassName() const
Definition: Type.cpp:2751
clang::JSONNodeDumper::VisitFunctionProtoType
void VisitFunctionProtoType(const FunctionProtoType *T)
Definition: JSONNodeDumper.cpp:505
clang::UnaryExprOrTypeTraitExpr::getArgumentType
QualType getArgumentType() const
Definition: Expr.h:2409
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::Decl::getDeclContext
DeclContext * getDeclContext()
Definition: DeclBase.h:438
clang::ObjCPropertyDecl::OBJC_PR_weak
Definition: DeclObjC.h:756
clang::ObjCSelectorExpr
ObjCSelectorExpr used for @selector in Objective-C.
Definition: ExprObjC.h:454
clang::ObjCInterfaceDecl::getSuperClass
ObjCInterfaceDecl * getSuperClass() const
Definition: DeclObjC.cpp:337
clang::VarDecl::getTLSKind
TLSKind getTLSKind() const
Definition: Decl.cpp:1998
Lexer.h
clang::SizeOfPackExpr
Represents an expression that computes the length of a parameter pack.
Definition: ExprCXX.h:4091
clang::FunctionDecl::getStorageClass
StorageClass getStorageClass() const
Returns the storage class as written in the source.
Definition: Decl.h:2488
clang::NonTypeTemplateParmDecl
NonTypeTemplateParmDecl - Declares a non-type template parameter, e.g., "Size" in.
Definition: DeclTemplate.h:1383
createDestructorDefinitionData
static llvm::json::Object createDestructorDefinitionData(const CXXRecordDecl *RD)
Definition: JSONNodeDumper.cpp:414
clang::JSONNodeDumper::VisitElaboratedType
void VisitElaboratedType(const ElaboratedType *ET)
Definition: JSONNodeDumper.cpp:677
clang::SplitQualType
A std::pair-like structure for storing a qualified type split into its local qualifiers and its local...
Definition: Type.h:593
clang::Type::isSignedIntegerType
bool isSignedIntegerType() const
Return true if this is an integer type that is signed, according to C99 6.2.5p4 [char, signed char, short, int, long..], or an enum decl which has a signed representation.
Definition: Type.cpp:1928
clang::JSONNodeDumper::VisitObjCProtocolExpr
void VisitObjCProtocolExpr(const ObjCProtocolExpr *OPE)
Definition: JSONNodeDumper.cpp:1096
clang::Selector::print
void print(llvm::raw_ostream &OS) const
Prints the full selector name (e.g. "foo:bar:").
Definition: IdentifierTable.cpp:492
clang::ObjCIvarDecl::Public
Definition: DeclObjC.h:1964
clang::Expr::getType
QualType getType() const
Definition: Expr.h:137
clang::JSONNodeDumper::VisitTemplateSpecializationType
void VisitTemplateSpecializationType(const TemplateSpecializationType *TST)
Definition: JSONNodeDumper.cpp:653
clang::StorageClass
StorageClass
Storage classes.
Definition: Specifiers.h:235
clang::JSONNodeDumper::VisitMaterializeTemporaryExpr
void VisitMaterializeTemporaryExpr(const MaterializeTemporaryExpr *MTE)
Definition: JSONNodeDumper.cpp:1349
clang::UnaryTransformType
A unary type transform, which is a type constructed from another.
Definition: Type.h:4413
clang::JSONNodeDumper::VisitBinaryOperator
void VisitBinaryOperator(const BinaryOperator *BO)
Definition: JSONNodeDumper.cpp:1162
clang::VarDecl::ListInit
Direct list-initialization (C++11)
Definition: Decl.h:831
clang::SplitQualType::Quals
Qualifiers Quals
The local qualifiers.
Definition: Type.h:598
clang::comments::ParamCommandComment::isDirectionExplicit
bool isDirectionExplicit() const LLVM_READONLY
Definition: Comment.h:751
clang::GotoStmt::getLabel
LabelDecl * getLabel() const
Definition: Stmt.h:2494
clang::MaterializeTemporaryExpr::getStorageDuration
StorageDuration getStorageDuration() const
Retrieve the storage duration for the materialized temporary.
Definition: ExprCXX.h:4444
clang::ObjCEncodeExpr::getEncodedType
QualType getEncodedType() const
Definition: ExprObjC.h:428
clang::ObjCMessageExpr
An expression that sends a message to the given Objective-C object or class.
Definition: ExprObjC.h:950
clang::PresumedLoc
Represents an unpacked "presumed" location which can be presented to the user.
Definition: SourceLocation.h:299
clang::ObjCPropertyRefExpr::getImplicitPropertyGetter
ObjCMethodDecl * getImplicitPropertyGetter() const
Definition: ExprObjC.h:712
clang::comments::HTMLStartTagComment::getNumAttrs
unsigned getNumAttrs() const
Definition: Comment.h:474
clang::SourceRange::getEnd
SourceLocation getEnd() const
Definition: SourceLocation.h:217
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::ObjCMethodDecl::isInstanceMethod
bool isInstanceMethod() const
Definition: DeclObjC.h:423
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::ObjCMessageExpr::getReceiverKind
ReceiverKind getReceiverKind() const
Determine the kind of receiver that this message is being sent to.
Definition: ExprObjC.h:1234
clang::ArrayType::getSizeModifier
ArraySizeModifier getSizeModifier() const
Definition: Type.h:2912
clang::CXXTypeidExpr::getTypeOperand
QualType getTypeOperand(ASTContext &Context) const
Retrieves the type operand of this typeid() expression after various required adjustments (removing r...
Definition: ExprCXX.cpp:147
clang::ObjCMessageExpr::getCallReturnType
QualType getCallReturnType(ASTContext &Ctx) const
Definition: ExprObjC.cpp:296
clang::TemplateTemplateParmDecl
TemplateTemplateParmDecl - Declares a template template parameter, e.g., "T" in.
Definition: DeclTemplate.h:1600
clang::UnaryTransformType::getUTTKind
UTTKind getUTTKind() const
Definition: Type.h:4441
clang::comments::BlockCommandComment::getNumArgs
unsigned getNumArgs() const
Definition: Comment.h:670
clang::DeclRefExpr::getDecl
ValueDecl * getDecl()
Definition: Expr.h:1247
clang::JSONNodeDumper::VisitUnresolvedUsingType
void VisitUnresolvedUsingType(const UnresolvedUsingType *UUT)
Definition: JSONNodeDumper.cpp:614
clang::QualType::getAsString
std::string getAsString() const
Definition: TypePrinter.cpp:1877
Desugar
static QualType Desugar(ASTContext &Context, QualType QT, bool &ShouldAKA)
Definition: ASTDiagnostic.cpp:28
clang::SourceManager::getExpansionLineNumber
unsigned getExpansionLineNumber(SourceLocation Loc, bool *Invalid=nullptr) const
Definition: SourceManager.cpp:1377
clang::JSONNodeDumper::VisitObjCCategoryDecl
void VisitObjCCategoryDecl(const ObjCCategoryDecl *D)
Definition: JSONNodeDumper.cpp:938
clang::ObjCIvarDecl::Protected
Definition: DeclObjC.h:1964
clang::QualType::isNull
bool isNull() const
Return true if this QualType doesn&#39;t point to a type yet.
Definition: Type.h:719
clang::VarDecl::getInitStyle
InitializationStyle getInitStyle() const
The style of initialization for this declaration.
Definition: Decl.h:1309
clang::JSONNodeDumper::VisitNonTypeTemplateParmDecl
void VisitNonTypeTemplateParmDecl(const NonTypeTemplateParmDecl *D)
Definition: JSONNodeDumper.cpp:851
clang::ObjCPropertyDecl::getType
QualType getType() const
Definition: DeclObjC.h:842
clang::CXXBoolLiteralExpr::getValue
bool getValue() const
Definition: ExprCXX.h:657
clang::ObjCPropertyDecl::OBJC_PR_direct
Definition: DeclObjC.h:764
clang::JSONNodeDumper::VisitObjCEncodeExpr
void VisitObjCEncodeExpr(const ObjCEncodeExpr *OEE)
Definition: JSONNodeDumper.cpp:1044
clang::ConstantExpr::getAPValueResult
APValue getAPValueResult() const
Definition: Expr.cpp:354
clang::SD_Dynamic
Dynamic storage duration.
Definition: Specifiers.h:311
clang::comments::InlineCommandComment::getNumArgs
unsigned getNumArgs() const
Definition: Comment.h:358
clang::ObjCPropertyDecl::OBJC_PR_noattr
Definition: DeclObjC.h:746
clang::FunctionProtoType::ExtProtoInfo::HasTrailingReturn
bool HasTrailingReturn
Definition: Type.h:3840
clang::QualType::split
SplitQualType split() const
Divides a QualType into its unqualified type and a set of local qualifiers.
Definition: Type.h:6264
clang::PresumedLoc::getFilename
const char * getFilename() const
Return the presumed filename of this location.
Definition: SourceLocation.h:321
clang::EST_NoexceptFalse
noexcept(expression), evals to &#39;false&#39;
Definition: ExceptionSpecificationType.h:28
clang::SD_Thread
Thread storage duration.
Definition: Specifiers.h:309
clang::AS_protected
Definition: Specifiers.h:115
clang::ObjCIvarDecl::None
Definition: DeclObjC.h:1964
clang::ObjCIvarDecl::Private
Definition: DeclObjC.h:1964
clang::attrvisitor::Base< llvm::make_const_ptr, JSONNodeDumper, void, ParamTys... >::Visit
void Visit(PTR(Attr) A)
Definition: AttrVisitor.h:31
clang::JSONNodeDumper::visitInlineCommandComment
void visitInlineCommandComment(const comments::InlineCommandComment *C, const comments::FullComment *)
Definition: JSONNodeDumper.cpp:1504
clang::VectorType::AltiVecPixel
is AltiVec &#39;vector Pixel&#39;
Definition: Type.h:3245
clang::PredefinedExpr::getIdentKindName
static StringRef getIdentKindName(IdentKind IK)
Definition: Expr.cpp:649
clang::VectorType::GenericVector
not a target-specific vector type
Definition: Type.h:3239
clang::FunctionProtoType::ExceptionSpecInfo::Type
ExceptionSpecificationType Type
The kind of exception specification this is.
Definition: Type.h:3813
clang::ObjCPropertyRefExpr::isImplicitProperty
bool isImplicitProperty() const
Definition: ExprObjC.h:704
clang::FunctionProtoType::getExtProtoInfo
ExtProtoInfo getExtProtoInfo() const
Definition: Type.h:3975
clang::JSONNodeDumper::Visit
void Visit(const Attr *A)
Definition: JSONNodeDumper.cpp:20
clang::PresumedLoc::getColumn
unsigned getColumn() const
Return the presumed column number of this location.
Definition: SourceLocation.h:342
clang::LinkageSpecDecl::lang_cxx
Definition: DeclCXX.h:2787
clang::TemplateTypeParmDecl::isParameterPack
bool isParameterPack() const
Returns whether this is a parameter pack.
Definition: DeclTemplate.cpp:650
clang::SourceLocation
Encodes a location in the source.
Definition: SourceLocation.h:86
clang::ObjCIvarDecl::getSynthesize
bool getSynthesize() const
Definition: DeclObjC.h:2005
clang::ObjCInterfaceType::getDecl
ObjCInterfaceDecl * getDecl() const
Get the declaration of this interface.
Definition: Type.h:5908
clang::FunctionDecl::isPure
bool isPure() const
Whether this virtual function is pure, i.e.
Definition: Decl.h:2105
clang::WhileStmt::hasVarStorage
bool hasVarStorage() const
True if this WhileStmt has storage for a condition variable.
Definition: Stmt.h:2273
clang::MemberPointerType::isMemberDataPointer
bool isMemberDataPointer() const
Returns true if the member type (i.e.
Definition: Type.h:2863
clang::JSONNodeDumper::VisitUnresolvedLookupExpr
void VisitUnresolvedLookupExpr(const UnresolvedLookupExpr *ULE)
Definition: JSONNodeDumper.cpp:1253
clang::JSONNodeDumper::VisitVectorType
void VisitVectorType(const VectorType *VT)
Definition: JSONNodeDumper.cpp:591
clang::ObjCPropertyDecl::OBJC_PR_null_resettable
Definition: DeclObjC.h:762
clang::CXXTemporary
Represents a C++ temporary.
Definition: ExprCXX.h:1341
clang::CXXDependentScopeMemberExpr::hasExplicitTemplateArgs
bool hasExplicitTemplateArgs() const
Determines whether this member expression actually had a C++ template argument list explicitly specif...
Definition: ExprCXX.h:3692
clang::ObjCInterfaceType
Interfaces are the core concept in Objective-C for object oriented design.
Definition: Type.h:5894
clang::Type::isVariablyModifiedType
bool isVariablyModifiedType() const
Whether this type is a variably-modified type (C99 6.7.5).
Definition: Type.h:2166
createDefaultConstructorDefinitionData
static llvm::json::Object createDefaultConstructorDefinitionData(const CXXRecordDecl *RD)
Definition: JSONNodeDumper.cpp:334
Ret
static bool Ret(InterpState &S, CodePtr &PC, APValue &Result)
Definition: Interp.cpp:34
clang::NamedDecl::getNameAsString
std::string getNameAsString() const
Get a human-readable name for the declaration, even if it is one of the special kinds of names (C++ c...
Definition: Decl.h:266
clang::CXXNewExpr
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)"...
Definition: ExprCXX.h:2100
clang::JSONNodeDumper::VisitCXXDeleteExpr
void VisitCXXDeleteExpr(const CXXDeleteExpr *DE)
Definition: JSONNodeDumper.cpp:1203
clang::TemplateTypeParmDecl::wasDeclaredWithTypename
bool wasDeclaredWithTypename() const
Whether this template type parameter was declared with the &#39;typename&#39; keyword.
Definition: DeclTemplate.h:1240
clang::JSONNodeDumper::VisitCXXBoolLiteralExpr
void VisitCXXBoolLiteralExpr(const CXXBoolLiteralExpr *BLE)
Definition: JSONNodeDumper.cpp:1418
clang::TagDecl
Represents the declaration of a struct/union/class/enum.
Definition: Decl.h:3219
clang::comments::Comment::getSourceRange
SourceRange getSourceRange() const LLVM_READONLY
Definition: Comment.h:216
clang::Decl::getASTContext
ASTContext & getASTContext() const LLVM_READONLY
Definition: DeclBase.cpp:377
clang::FunctionType::ExtInfo::getCC
CallingConv getCC() const
Definition: Type.h:3592
clang::ObjCCategoryImplDecl::getCategoryDecl
ObjCCategoryDecl * getCategoryDecl() const
Definition: DeclObjC.cpp:2089
clang::comments::ParamCommandComment::isParamIndexValid
bool isParamIndexValid() const LLVM_READONLY
Definition: Comment.h:774
createCopyAssignmentDefinitionData
static llvm::json::Object createCopyAssignmentDefinitionData(const CXXRecordDecl *RD)
Definition: JSONNodeDumper.cpp:384
clang::comments::CommandTraits::getCommandInfo
const CommandInfo * getCommandInfo(StringRef Name) const
Definition: CommentCommandTraits.h:145
clang::FunctionType::isRestrict
bool isRestrict() const
Definition: Type.h:3699
clang::AS_public
Definition: Specifiers.h:114
clang::FixedPointLiteral::getValueAsString
std::string getValueAsString(unsigned Radix) const
Definition: Expr.cpp:958
clang::comments::ParamCommandComment::InOut
Definition: Comment.h:742
clang::JSONNodeDumper::VisitFixedPointLiteral
void VisitFixedPointLiteral(const FixedPointLiteral *FPL)
Definition: JSONNodeDumper.cpp:1404
clang::UnaryOperator::canOverflow
bool canOverflow() const
Returns true if the unary operator can cause an overflow.
Definition: Expr.h:2089
clang::EST_Uninstantiated
not instantiated yet
Definition: ExceptionSpecificationType.h:31
clang::JSONNodeDumper::VisitUsingDirectiveDecl
void VisitUsingDirectiveDecl(const UsingDirectiveDecl *UDD)
Definition: JSONNodeDumper.cpp:724
clang::NestedNameSpecifier
Represents a C++ nested name specifier, such as "\::std::vector<int>::".
Definition: NestedNameSpecifier.h:48
clang::RQ_None
No ref-qualifier was provided.
Definition: Type.h:1403
clang::VarDecl::CInit
C-style initialization with assignment.
Definition: Decl.h:825
clang::CXXBaseSpecifier::isPackExpansion
bool isPackExpansion() const
Determine whether this base specifier is a pack expansion.
Definition: DeclCXX.h:205
clang::MaterializeTemporaryExpr::isBoundToLvalueReference
bool isBoundToLvalueReference() const
Determine whether this materialized temporary is bound to an lvalue reference; otherwise, it&#39;s bound to an rvalue reference.
Definition: ExprCXX.h:4488
clang::TemplateTypeParmType::isParameterPack
bool isParameterPack() const
Definition: Type.h:4692
clang::tok::isLiteral
bool isLiteral(TokenKind K)
Return true if this is a "literal" kind, like a numeric constant, string, etc.
Definition: TokenKinds.h:85
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::JSONNodeDumper::VisitUsingShadowDecl
void VisitUsingShadowDecl(const UsingShadowDecl *USD)
Definition: JSONNodeDumper.cpp:745
clang::UnaryExprOrTypeTraitExpr::getKind
UnaryExprOrTypeTrait getKind() const
Definition: Expr.h:2403
clang::CXXNewExpr::isArray
bool isArray() const
Definition: ExprCXX.h:2223
clang::EnumDecl::isScoped
bool isScoped() const
Returns true if this is a C++11 scoped enumeration.
Definition: Decl.h:3675
clang::ObjCProtocolExpr
ObjCProtocolExpr used for protocol expression in Objective-C.
Definition: ExprObjC.h:503
clang::comments::TParamCommandComment::getParamNameAsWritten
StringRef getParamNameAsWritten() const
Definition: Comment.h:836
clang::comments::HTMLTagComment::isMalformed
bool isMalformed() const
Definition: Comment.h:405
clang::TemplateTemplateParmDecl::hasDefaultArgument
bool hasDefaultArgument() const
Determine whether this template parameter has a default argument.
Definition: DeclTemplate.h:1718
llvm::SmallVector
Definition: LLVM.h:35
clang::VectorType::AltiVecBool
is AltiVec &#39;vector bool ...&#39;
Definition: Type.h:3248
clang::AttributeCommonInfo::getRange
SourceRange getRange() const
Definition: AttributeCommonInfo.h:130
clang::comments::CommentVisitorBase< llvm::make_const_ptr, JSONNodeDumper, void, ParamTys... >::visit
void visit(PTR(Comment) C, ParamTys... P)
Definition: CommentVisitor.h:27
clang::ObjCPropertyDecl
Represents one property declaration in an Objective-C interface.
Definition: DeclObjC.h:741
clang::JSONNodeDumper::VisitObjCInterfaceType
void VisitObjCInterfaceType(const ObjCInterfaceType *OIT)
Definition: JSONNodeDumper.cpp:668
clang::ImplicitCastExpr
ImplicitCastExpr - Allows us to explicitly represent implicit type conversions, which have no direct ...
Definition: Expr.h:3274
clang::CXXDependentScopeMemberExpr::hasTemplateKeyword
bool hasTemplateKeyword() const
Determines whether the member name was preceded by the template keyword.
Definition: ExprCXX.h:3688
clang::ElaboratedType::getQualifier
NestedNameSpecifier * getQualifier() const
Retrieve the qualification on this type.
Definition: Type.h:5322
clang::ObjCPropertyRefExpr::isMessagingGetter
bool isMessagingGetter() const
True if the property reference will result in a message to the getter.
Definition: ExprObjC.h:737
clang::comments::ParamCommandComment::getDirection
PassDirection getDirection() const LLVM_READONLY
Definition: Comment.h:747
clang::VectorType::AltiVecVector
is AltiVec vector
Definition: Type.h:3242
clang::AutoType::getKeyword
AutoTypeKeyword getKeyword() const
Definition: Type.h:4920
clang::ArrayType::getIndexTypeQualifiers
Qualifiers getIndexTypeQualifiers() const
Definition: Type.h:2916
clang::UETT_AlignOf
Used for C&#39;s _Alignof and C++&#39;s alignof.
Definition: TypeTraits.h:100
clang::Decl::isUsed
bool isUsed(bool CheckUsedAttr=true) const
Whether any (re-)declaration of the entity was used, meaning that a definition is required...
Definition: DeclBase.cpp:398
clang::NamespaceDecl::isOriginalNamespace
bool isOriginalNamespace() const
Return true if this declaration is an original (first) declaration of the namespace.
Definition: DeclCXX.cpp:2774
clang::BlockDecl::Capture::getVariable
VarDecl * getVariable() const
The variable being captured.
Definition: Decl.h:4064
clang::TemplateArgument::getAsIntegral
llvm::APSInt getAsIntegral() const
Retrieve the template argument as an integral value.
Definition: TemplateBase.h:300
clang::JSONNodeDumper::VisitVarDecl
void VisitVarDecl(const VarDecl *VD)
Definition: JSONNodeDumper.cpp:749
clang::APValue::printPretty
void printPretty(raw_ostream &OS, const ASTContext &Ctx, QualType Ty) const
Definition: APValue.cpp:473
clang::CharacterLiteral
Definition: Expr.h:1530
clang::ObjCPropertyDecl::OBJC_PR_nullability
Indicates that the nullability of the type was spelled with a property attribute rather than a type q...
Definition: DeclObjC.h:761
clang::ObjCPropertyDecl::OBJC_PR_copy
Definition: DeclObjC.h:752
clang::comments::HTMLEndTagComment
A closing HTML tag.
Definition: Comment.h:509
clang::RQ_RValue
An rvalue ref-qualifier was provided (&&).
Definition: Type.h:1409
clang::ObjCBoxedExpr
ObjCBoxedExpr - used for generalized expression boxing.
Definition: ExprObjC.h:124
clang::JSONNodeDumper::VisitTemplateTemplateArgument
void VisitTemplateTemplateArgument(const TemplateArgument &TA)
Definition: JSONNodeDumper.cpp:1473
clang::UnaryExprOrTypeTraitExpr::isArgumentType
bool isArgumentType() const
Definition: Expr.h:2408
clang::CXXDependentScopeMemberExpr::template_arguments
ArrayRef< TemplateArgumentLoc > template_arguments() const
Definition: ExprCXX.h:3720
clang::ObjCInterfaceDecl::getImplementation
ObjCImplementationDecl * getImplementation() const
Definition: DeclObjC.cpp:1574
clang::PackExpansionType::getNumExpansions
Optional< unsigned > getNumExpansions() const
Retrieve the number of expansions that this pack expansion will generate, if known.
Definition: Type.h:5536
clang::ImplicitCastExpr::isPartOfExplicitCast
bool isPartOfExplicitCast() const
Definition: Expr.h:3293
clang::EST_DynamicNone
throw()
Definition: ExceptionSpecificationType.h:22
clang::Qualifiers::getAsString
std::string getAsString() const
Definition: TypePrinter.cpp:1751
clang::CXXNewExpr::getOperatorDelete
FunctionDecl * getOperatorDelete() const
Definition: ExprCXX.h:2220
clang::JSONNodeDumper::VisitConstantExpr
void VisitConstantExpr(const ConstantExpr *CE)
Definition: JSONNodeDumper.cpp:1279
clang::JSONNodeDumper::visitHTMLStartTagComment
void visitHTMLStartTagComment(const comments::HTMLStartTagComment *C, const comments::FullComment *)
Definition: JSONNodeDumper.cpp:1534
clang::Type::isInstantiationDependentType
bool isInstantiationDependentType() const
Determine whether this type is an instantiation-dependent type, meaning that the type involves a temp...
Definition: Type.h:2156
clang::JSONNodeDumper::VisitFunctionType
void VisitFunctionType(const FunctionType *T)
Definition: JSONNodeDumper.cpp:496
clang::comments::TParamCommandComment
Doxygen \tparam command, describes a template parameter.
Definition: Comment.h:801
clang::ObjCCategoryDecl::protocols
protocol_range protocols() const
Definition: DeclObjC.h:2370
clang::DeclRefExpr::isNonOdrUse
NonOdrUseReason isNonOdrUse() const
Is this expression a non-odr-use reference, and if so, why?
Definition: Expr.h:1371
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::CXXNewExpr::getInitializationStyle
InitializationStyle getInitializationStyle() const
The kind of initializer this new-expression has.
Definition: ExprCXX.h:2267
clang::CompoundAssignOperator
CompoundAssignOperator - For compound assignments (e.g.
Definition: Expr.h:3654
clang::VarDecl::getStorageClassSpecifierString
static const char * getStorageClassSpecifierString(StorageClass SC)
Return the string used to specify the storage class SC.
Definition: Decl.cpp:1950
clang::GenericSelectionExpr
Represents a C11 generic selection.
Definition: Expr.h:5234
clang::IdentifierInfo::getName
StringRef getName() const
Return the actual identifier string.
Definition: IdentifierTable.h:155
clang::JSONNodeDumper::VisitMemberExpr
void VisitMemberExpr(const MemberExpr *ME)
Definition: JSONNodeDumper.cpp:1174
clang::JSONNodeDumper::VisitMacroQualifiedType
void VisitMacroQualifiedType(const MacroQualifiedType *MQT)
Definition: JSONNodeDumper.cpp:688
clang::JSONNodeDumper::VisitAddrLabelExpr
void VisitAddrLabelExpr(const AddrLabelExpr *ALE)
Definition: JSONNodeDumper.cpp:1264
clang::AddrLabelExpr
AddrLabelExpr - The GNU address of label extension, representing &&label.
Definition: Expr.h:3910
FIELD1
#define FIELD1(Flag)
Definition: JSONNodeDumper.cpp:331
clang::VarDecl::TLS_Dynamic
TLS with a dynamic initializer.
Definition: Decl.h:843
clang::TemplateArgument
Represents a template argument.
Definition: TemplateBase.h:50
clang::Decl::isThisDeclarationReferenced
bool isThisDeclarationReferenced() const
Whether this declaration was referenced.
Definition: DeclBase.h:586
clang::DeducedType::isDeduced
bool isDeduced() const
Definition: Type.h:4862
clang::NOUR_Discarded
This name appears as a potential result of a discarded value expression.
Definition: Specifiers.h:170
clang::ObjCImplDecl::getClassInterface
const ObjCInterfaceDecl * getClassInterface() const
Definition: DeclObjC.h:2454
clang::CXXTypeidExpr::isTypeOperand
bool isTypeOperand() const
Definition: ExprCXX.h:804
clang::UsingDirectiveDecl::getNominatedNamespace
NamespaceDecl * getNominatedNamespace()
Returns the namespace nominated by this using-directive.
Definition: DeclCXX.cpp:2729
clang::JSONNodeDumper::VisitGenericSelectionExpr
void VisitGenericSelectionExpr(const GenericSelectionExpr *GSE)
Definition: JSONNodeDumper.cpp:1293
clang
Dataflow Directional Tag Classes.
Definition: CFGReachabilityAnalysis.h:21
clang::GenericSelectionExpr::isResultDependent
bool isResultDependent() const
Whether this generic selection is result-dependent.
Definition: Expr.h:5414
clang::ObjCPropertyDecl::OBJC_PR_readonly
Definition: DeclObjC.h:747
clang::FunctionType::getExtInfo
ExtInfo getExtInfo() const
Definition: Type.h:3691
clang::EST_Unevaluated
not evaluated yet, for special member function
Definition: ExceptionSpecificationType.h:30
clang::PredefinedExpr
[C99 6.4.2.2] - A predefined identifier such as func.
Definition: Expr.h:1903
clang::JSONNodeDumper::visitVerbatimBlockLineComment
void visitVerbatimBlockLineComment(const comments::VerbatimBlockLineComment *C, const comments::FullComment *)
Definition: JSONNodeDumper.cpp:1610
clang::JSONNodeDumper::VisitInitListExpr
void VisitInitListExpr(const InitListExpr *ILE)
Definition: JSONNodeDumper.cpp:1288
clang::CXXDeleteExpr
Represents a delete expression for memory deallocation and destructor calls, e.g. ...
Definition: ExprCXX.h:2359
clang::BlockDecl::Capture::isNested
bool isNested() const
Whether this is a nested capture, i.e.
Definition: Decl.h:4080
clang::BlockDecl::isVariadic
bool isVariadic() const
Definition: Decl.h:4112
clang::ObjCPropertyImplDecl::getPropertyImplementation
Kind getPropertyImplementation() const
Definition: DeclObjC.h:2842
clang::JSONNodeDumper::VisitSwitchStmt
void VisitSwitchStmt(const SwitchStmt *SS)
Definition: JSONNodeDumper.cpp:1429
clang::JSONNodeDumper::VisitLabelStmt
void VisitLabelStmt(const LabelStmt *LS)
Definition: JSONNodeDumper.cpp:1437
clang::CXXThisExpr::isImplicit
bool isImplicit() const
Definition: ExprCXX.h:1118
clang::interp::NE
bool NE(InterpState &S, CodePtr OpPC)
Definition: Interp.h:223
clang::IfStmt::hasInitStorage
bool hasInitStorage() const
True if this IfStmt has the storage for an init statement.
Definition: Stmt.h:1901
clang::ObjCMessageExpr::getSuperType
QualType getSuperType() const
Retrieve the type referred to by &#39;super&#39;.
Definition: ExprObjC.h:1336
clang::JSONNodeDumper::VisitCXXTypeidExpr
void VisitCXXTypeidExpr(const CXXTypeidExpr *CTE)
Definition: JSONNodeDumper.cpp:1269
clang::TypedefNameDecl::getUnderlyingType
QualType getUnderlyingType() const
Definition: Decl.h:3126
clang::Decl::getAccess
AccessSpecifier getAccess() const
Definition: DeclBase.h:473
clang::NamespaceDecl::getOriginalNamespace
NamespaceDecl * getOriginalNamespace()
Get the original (first) namespace declaration.
Definition: DeclCXX.cpp:2760
clang::TemplateTypeParmDecl::getIndex
unsigned getIndex() const
Retrieve the index of the template parameter.
Definition: DeclTemplate.cpp:646
clang::CallExpr::usesADL
bool usesADL() const
Definition: Expr.h:2673
clang::CXXDependentScopeMemberExpr::getMember
DeclarationName getMember() const
Retrieve the name of the member that this expression refers to.
Definition: ExprCXX.h:3657
clang::JSONNodeDumper::VisitTypedefDecl
void VisitTypedefDecl(const TypedefDecl *TD)
Definition: JSONNodeDumper.cpp:706
clang::ObjCTypeParamDecl
Represents the declaration of an Objective-C type parameter.
Definition: DeclObjC.h:571
clang::VectorType::getVectorKind
VectorKind getVectorKind() const
Definition: Type.h:3280
clang::JSONNodeDumper::VisitCallExpr
void VisitCallExpr(const CallExpr *CE)
Definition: JSONNodeDumper.cpp:1231
clang::ObjCPropertyDecl::OBJC_PR_retain
Definition: DeclObjC.h:751
clang::Decl::getKind
Kind getKind() const
Definition: DeclBase.h:432
clang::JSONNodeDumper::visitTParamCommandComment
void visitTParamCommandComment(const comments::TParamCommandComment *C, const comments::FullComment *FC)
Definition: JSONNodeDumper.cpp:1589
clang::CXXConstructExpr::isListInitialization
bool isListInitialization() const
Whether this constructor call was written as list-initialization.
Definition: ExprCXX.h:1513
clang::CXXCtorInitializer::getBaseClass
const Type * getBaseClass() const
If this is a base class initializer, returns the type of the base class.
Definition: DeclCXX.cpp:2418
clang::EnumDecl
Represents an enum.
Definition: Decl.h:3481
clang::SourceManager::getPresumedLoc
PresumedLoc getPresumedLoc(SourceLocation Loc, bool UseLineDirectives=true) const
Returns the "presumed" location of a SourceLocation specifies.
Definition: SourceManager.cpp:1443
clang::MemberPointerType
A pointer to member type per C++ 8.3.3 - Pointers to members.
Definition: Type.h:2833
clang::VarDecl::isParameterPack
bool isParameterPack() const
Determine whether this variable is actually a function parameter pack or init-capture pack...
Definition: Decl.cpp:2464
clang::JSONNodeDumper::VisitCXXRecordDecl
void VisitCXXRecordDecl(const CXXRecordDecl *RD)
Definition: JSONNodeDumper.cpp:820
clang::JSONNodeDumper::VisitObjCSubscriptRefExpr
void VisitObjCSubscriptRefExpr(const ObjCSubscriptRefExpr *OSRE)
Definition: JSONNodeDumper.cpp:1117
clang::ObjCCompatibleAliasDecl::getClassInterface
const ObjCInterfaceDecl * getClassInterface() const
Definition: DeclObjC.h:2761
clang::comments::InlineCommandComment::RenderNormal
Definition: Comment.h:311
clang::ObjCPropertyDecl::Optional
Definition: DeclObjC.h:774
clang::CXXTypeidExpr::getTypeOperandSourceInfo
TypeSourceInfo * getTypeOperandSourceInfo() const
Retrieve source information for the type operand.
Definition: ExprCXX.h:811
clang::APIntStorage::getValue
llvm::APInt getValue() const
Definition: Expr.h:1430
clang::JSONNodeDumper::VisitBlockDecl
void VisitBlockDecl(const BlockDecl *D)
Definition: JSONNodeDumper.cpp:1039
clang::AddrLabelExpr::getLabel
LabelDecl * getLabel() const
Definition: Expr.h:3932
clang::ObjCMessageExpr::getClassReceiver
QualType getClassReceiver() const
Returns the type of a class message send, or NULL if the message is not a class message.
Definition: ExprObjC.h:1279
clang::CastExpr::path_end
path_iterator path_end()
Definition: Expr.h:3223
clang::comments::HTMLTagComment::getTagName
StringRef getTagName() const LLVM_READONLY
Definition: Comment.h:397
clang::SwitchStmt
SwitchStmt - This represents a &#39;switch&#39; stmt.
Definition: Stmt.h:2043
clang::CXXRecordDecl::needsOverloadResolutionForMoveConstructor
bool needsOverloadResolutionForMoveConstructor() const
Determine whether we need to eagerly declare a defaulted move constructor for this class...
Definition: DeclCXX.h:862
clang::ObjCImplementationDecl
ObjCImplementationDecl - Represents a class definition - this is where method definitions are specifi...
Definition: DeclObjC.h:2566
clang::RecordType
A helper class that allows the use of isa/cast/dyncast to detect TagType objects of structs/unions/cl...
Definition: Type.h:4495
clang::TemplateArgumentLoc
Location wrapper for a TemplateArgument.
Definition: TemplateBase.h:449
clang::SourceManager::isMacroArgExpansion
bool isMacroArgExpansion(SourceLocation Loc, SourceLocation *StartLoc=nullptr) const
Tests whether the given source location represents a macro argument&#39;s expansion into the function-lik...
Definition: SourceManager.cpp:1028
clang::declvisitor::Base< llvm::make_const_ptr, JSONNodeDumper, void >::Visit
void Visit(PTR(Decl) D)
Definition: DeclVisitor.h:37
clang::comments::CommandTraits::getBuiltinCommandInfo
static const CommandInfo * getBuiltinCommandInfo(StringRef Name)
clang::CXXCtorInitializer
Represents a C++ base or member initializer.
Definition: DeclCXX.h:2155
clang::JSONNodeDumper::VisitObjCPropertyDecl
void VisitObjCPropertyDecl(const ObjCPropertyDecl *D)
Definition: JSONNodeDumper.cpp:991
clang::ExprWithCleanups::getNumObjects
unsigned getNumObjects() const
Definition: ExprCXX.h:3337
clang::ObjCEncodeExpr
ObjCEncodeExpr, used for @encode in Objective-C.
Definition: ExprObjC.h:407
clang::Type::isFromAST
bool isFromAST() const
Whether this type comes from an AST file.
Definition: Type.h:1879
clang::CXXConstructExpr::CK_Delegating
Definition: ExprCXX.h:1430
clang::ConstantArrayType::getSize
const llvm::APInt & getSize() const
Definition: Type.h:2958
clang::JSONNodeDumper::VisitGotoStmt
void VisitGotoStmt(const GotoStmt *GS)
Definition: JSONNodeDumper.cpp:1441
clang::JSONNodeDumper::VisitCastExpr
void VisitCastExpr(const CastExpr *CE)
Definition: JSONNodeDumper.cpp:1215
clang::UnaryOperator::getOpcode
Opcode getOpcode() const
Definition: Expr.h:2071
clang::ReferenceType
Base for LValueReferenceType and RValueReferenceType.
Definition: Type.h:2750
clang::ObjCPropertyDecl::OBJC_PR_strong
Definition: DeclObjC.h:757
clang::CastExpr::getCastKindName
static const char * getCastKindName(CastKind CK)
Definition: Expr.cpp:1894
clang::FunctionType::isVolatile
bool isVolatile() const
Definition: Type.h:3698
clang::ObjCPropertyDecl::OBJC_PR_setter
Definition: DeclObjC.h:754
clang::JSONNodeDumper::VisitPackTemplateArgument
void VisitPackTemplateArgument(const TemplateArgument &TA)
Definition: JSONNodeDumper.cpp:1486
clang::JSONNodeDumper::VisitEnumDecl
void VisitEnumDecl(const EnumDecl *ED)
Definition: JSONNodeDumper.cpp:802
clang::CastExpr::getConversionFunction
NamedDecl * getConversionFunction() const
If this cast applies a user-defined conversion, retrieve the conversion function that it invokes...
Definition: Expr.cpp:1942
clang::JSONNodeDumper::VisitConstantArrayType
void VisitConstantArrayType(const ConstantArrayType *CAT)
Definition: JSONNodeDumper.cpp:578
clang::ObjCPropertyDecl::OBJC_PR_getter
Definition: DeclObjC.h:748
clang::CXXDependentScopeMemberExpr::isArrow
bool isArrow() const
Determine whether this member expression used the &#39;->&#39; operator; otherwise, it used the &#39;...
Definition: ExprCXX.h:3618
clang::CXXBaseSpecifier
Represents a base class of a C++ class.
Definition: DeclCXX.h:145
clang::ObjCIvarRefExpr
ObjCIvarRefExpr - A reference to an ObjC instance variable.
Definition: ExprObjC.h:546
clang::FunctionProtoType::ExceptionSpecInfo::Exceptions
ArrayRef< QualType > Exceptions
Explicitly-specified list of exception types.
Definition: Type.h:3816
clang::JSONNodeDumper::visitBlockCommandComment
void visitBlockCommandComment(const comments::BlockCommandComment *C, const comments::FullComment *)
Definition: JSONNodeDumper.cpp:1554
clang::BlockDecl::capturesCXXThis
bool capturesCXXThis() const
Definition: Decl.h:4169
clang::OverloadExpr::decls
llvm::iterator_range< decls_iterator > decls() const
Definition: ExprCXX.h:2942
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::ObjCPropertyDecl::OBJC_PR_readwrite
Definition: DeclObjC.h:750
clang::ObjCPropertyImplDecl::Synthesize
Definition: DeclObjC.h:2776
clang::TypedefType::getDecl
TypedefNameDecl * getDecl() const
Definition: Type.h:4256
clang::NodeStreamer::JOS
llvm::json::OStream JOS
Definition: JSONNodeDumper.h:36
clang::JSONNodeDumper::VisitTagType
void VisitTagType(const TagType *TT)
Definition: JSONNodeDumper.cpp:626
clang::TemplateTypeParmType::getDepth
unsigned getDepth() const
Definition: Type.h:4690
clang::ObjCIvarRefExpr::isFreeIvar
bool isFreeIvar() const
Definition: ExprObjC.h:585
clang::VarDecl::CallInit
Call-style initialization (C++98)
Definition: Decl.h:828
clang::MemberExpr
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
Definition: Expr.h:2836
clang::UETT_SizeOf
Definition: TypeTraits.h:97
clang::JSONNodeDumper::VisitEnumConstantDecl
void VisitEnumConstantDecl(const EnumConstantDecl *ECD)
Definition: JSONNodeDumper.cpp:810
clang::JSONNodeDumper::VisitObjCMethodDecl
void VisitObjCMethodDecl(const ObjCMethodDecl *D)
Definition: JSONNodeDumper.cpp:915
clang::FieldDecl::isMutable
bool isMutable() const
Determines whether this field is mutable (C++ only).
Definition: Decl.h:2804
isTrivial
static bool isTrivial(ASTContext &Ctx, const Expr *E)
Checks if the expression is constant or does not have non-trivial function calls. ...
Definition: CGOpenMPRuntime.cpp:6524
clang::CXXRecordDecl
Represents a C++ struct/union/class.
Definition: DeclCXX.h:253
clang::JSONNodeDumper::VisitRValueReferenceType
void VisitRValueReferenceType(const ReferenceType *RT)
Definition: JSONNodeDumper.cpp:557
clang::comments::Comment::getCommentKindName
const char * getCommentKindName() const
Definition: Comment.cpp:35
clang::SourceRange::isValid
bool isValid() const
Definition: SourceLocation.h:222
clang::MemberPointerType::isMemberFunctionPointer
bool isMemberFunctionPointer() const
Returns true if the member type (i.e.
Definition: Type.h:2857
clang::VarDecl::isNRVOVariable
bool isNRVOVariable() const
Determine whether this local variable can be used with the named return value optimization (NRVO)...
Definition: Decl.h:1355
clang::ObjCPropertyDecl::OBJC_PR_class
Definition: DeclObjC.h:763
clang::ObjCIvarDecl
ObjCIvarDecl - Represents an ObjC instance variable.
Definition: DeclObjC.h:1959
clang::UETT_VecStep
Definition: TypeTraits.h:101
clang::APValue::None
There is no such object (it&#39;s outside its lifetime).
Definition: APValue.h:121
clang::WhileStmt
WhileStmt - This represents a &#39;while&#39; stmt.
Definition: Stmt.h:2226
clang::AttrSyntax::C
clang::Attr::isInherited
bool isInherited() const
Definition: Attr.h:94
clang::ObjCPropertyDecl::OBJC_PR_assign
Definition: DeclObjC.h:749
clang::UnaryTransformType::EnumUnderlyingType
Definition: Type.h:4416
clang::comments::TParamCommandComment::hasParamName
bool hasParamName() const
Definition: Comment.h:830
clang::ObjCMethodDecl::isVariadic
bool isVariadic() const
Definition: DeclObjC.h:428
clang::ObjCMessageExpr::Class
The receiver is a class.
Definition: ExprObjC.h:1098
clang::Stmt::getSourceRange
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation tokens are not useful in isolation - they are low level value objects created/interpre...
Definition: Stmt.cpp:263
clang::CXXDeleteExpr::isGlobalDelete
bool isGlobalDelete() const
Definition: ExprCXX.h:2385
clang::JSONNodeDumper::VisitNamespaceAliasDecl
void VisitNamespaceAliasDecl(const NamespaceAliasDecl *NAD)
Definition: JSONNodeDumper.cpp:729
clang::StringLiteral
StringLiteral - This represents a string literal expression, e.g.
Definition: Expr.h:1711
clang::SD_FullExpression
Full-expression storage duration (for temporaries).
Definition: Specifiers.h:307
clang::CallExpr
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
Definition: Expr.h:2546
clang::VarDecl::TLS_Static
TLS with a known-constant initializer.
Definition: Decl.h:840
clang::EnumDecl::getIntegerType
QualType getIntegerType() const
Return the integer type this enum decl corresponds to.
Definition: Decl.h:3635
clang::NamedDecl::getName
StringRef getName() const
Get the name of identifier for this declaration as a StringRef.
Definition: Decl.h:250
clang::comments::ParamCommandComment::Out
Definition: Comment.h:741
clang::JSONNodeDumper::VisitStringLiteral
void VisitStringLiteral(const StringLiteral *SL)
Definition: JSONNodeDumper.cpp:1412
clang::comments::ParamCommandComment::getParamNameAsWritten
StringRef getParamNameAsWritten() const
Definition: Comment.h:766
clang::StmtVisitorBase< llvm::make_const_ptr, JSONNodeDumper, void, ParamTys... >::Visit
void Visit(PTR(Stmt) S, ParamTys... P)
Definition: StmtVisitor.h:43
clang::UsingDecl::getQualifier
NestedNameSpecifier * getQualifier() const
Retrieve the nested-name-specifier that qualifies the name.
Definition: DeclCXX.h:3412
clang::ObjCIvarDecl::Package
Definition: DeclObjC.h:1964
clang::JSONNodeDumper::VisitObjCCategoryImplDecl
void VisitObjCCategoryImplDecl(const ObjCCategoryImplDecl *D)
Definition: JSONNodeDumper.cpp:950
clang::VectorType::getNumElements
unsigned getNumElements() const
Definition: Type.h:3271
clang::ObjCBoolLiteralExpr
ObjCBoolLiteralExpr - Objective-C Boolean Literal.
Definition: ExprObjC.h:85
clang::EST_NoThrow
Microsoft __declspec(nothrow) extension.
Definition: ExceptionSpecificationType.h:25
clang::Type::isDependentType
bool isDependentType() const
Whether this type is a dependent type, meaning that its definition somehow depends on a template para...
Definition: Type.h:2150
clang::TemplateArgument::getAsType
QualType getAsType() const
Retrieve the type for a type template argument.
Definition: TemplateBase.h:256
FIELD2
#define FIELD2(Name, Flag)
Definition: JSONNodeDumper.cpp:330
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::ObjCPropertyImplDecl::getPropertyDecl
ObjCPropertyDecl * getPropertyDecl() const
Definition: DeclObjC.h:2837
clang::ObjCTypeParamDecl::getVariance
ObjCTypeParamVariance getVariance() const
Determine the variance of this type parameter.
Definition: DeclObjC.h:614
clang::comments::ParamCommandComment
Doxygen \param command.
Definition: Comment.h:713
clang::FunctionDecl::isDeleted
bool isDeleted() const
Whether this function has been deleted.
Definition: Decl.h:2259
clang::ObjCAtCatchStmt::getCatchParamDecl
const VarDecl * getCatchParamDecl() const
Definition: StmtObjC.h:97
clang::TypedefType
Definition: Type.h:4240
clang::JSONNodeDumper::VisitLinkageSpecDecl
void VisitLinkageSpecDecl(const LinkageSpecDecl *LSD)
Definition: JSONNodeDumper.cpp:883
clang::InitListExpr::getInitializedFieldInUnion
FieldDecl * getInitializedFieldInUnion()
If this initializes a union, specifies which field in the union to initialize.
Definition: Expr.h:4515
clang::CXXConstructExpr::hadMultipleCandidates
bool hadMultipleCandidates() const
Whether the referred constructor was resolved from an overloaded set having size greater than 1...
Definition: ExprCXX.h:1505
clang::JSONNodeDumper::VisitNullTemplateArgument
void VisitNullTemplateArgument(const TemplateArgument &TA)
Definition: JSONNodeDumper.cpp:1457
clang::ObjCSubscriptRefExpr::isArraySubscriptRefExpr
bool isArraySubscriptRefExpr() const
Definition: ExprObjC.h:904
clang::CXXUnresolvedConstructExpr::getTypeAsWritten
QualType getTypeAsWritten() const
Retrieve the type that is being constructed, as specified in the source code.
Definition: ExprCXX.h:3425
clang::FunctionType::getNameForCallConv
static StringRef getNameForCallConv(CallingConv CC)
Definition: Type.cpp:2931
clang::JSONNodeDumper::visitVerbatimLineComment
void visitVerbatimLineComment(const comments::VerbatimLineComment *C, const comments::FullComment *)
Definition: JSONNodeDumper.cpp:1616
clang::ValueDecl::getType
QualType getType() const
Definition: Decl.h:630
clang::CXXBaseSpecifier::getAccessSpecifierAsWritten
AccessSpecifier getAccessSpecifierAsWritten() const
Retrieves the access specifier as written in the source code (which may mean that no access specifier...
Definition: DeclCXX.h:237
clang::JSONNodeDumper::VisitCXXThisExpr
void VisitCXXThisExpr(const CXXThisExpr *TE)
Definition: JSONNodeDumper.cpp:1211
clang::VK_LValue
An l-value expression is a reference to an object with independent storage.
Definition: Specifiers.h:129
clang::SourceRange
A trivial tuple used to represent a source range.
Definition: SourceLocation.h:207
clang::Decl::isModulePrivate
bool isModulePrivate() const
Whether this declaration was marked as being private to the module in which it was defined...
Definition: DeclBase.h:607
clang::FunctionProtoType::ExtProtoInfo::Variadic
bool Variadic
Definition: Type.h:3839
clang::UnaryOperator::getOpcodeStr
static StringRef getOpcodeStr(Opcode Op)
getOpcodeStr - Turn an Opcode enum value into the punctuation char it corresponds to...
Definition: Expr.cpp:1294
clang::ObjCPropertyDecl::getGetterMethodDecl
ObjCMethodDecl * getGetterMethodDecl() const
Definition: DeclObjC.h:936
clang::NamedDecl
This represents a decl that may have a name.
Definition: Decl.h:223
clang::CXXBoolLiteralExpr
A boolean literal, per ([C++ lex.bool] Boolean literals).
Definition: ExprCXX.h:645
clang::TagType
Definition: Type.h:4471
clang::comments::TParamCommandComment::getParamName
StringRef getParamName(const FullComment *FC) const
Definition: Comment.cpp:378
clang::TemplateTypeParmType
Definition: Type.h:4647
clang::JSONNodeDumper::VisitTemplateTemplateParmDecl
void VisitTemplateTemplateParmDecl(const TemplateTemplateParmDecl *D)
Definition: JSONNodeDumper.cpp:867
clang::comments::InlineCommandComment::RenderMonospaced
Definition: Comment.h:313
clang::NamespaceAliasDecl
Represents a C++ namespace alias.
Definition: DeclCXX.h:2967
clang::ConstantExpr::getResultAPValueKind
APValue::ValueKind getResultAPValueKind() const
Definition: Expr.h:1050
clang::SD_Automatic
Automatic storage duration (most local variables).
Definition: Specifiers.h:308
clang::VarDecl::isInline
bool isInline() const
Whether this variable is (C++1z) inline.
Definition: Decl.h:1394
clang::ObjCIvarDecl::getAccessControl
AccessControl getAccessControl() const
Definition: DeclObjC.h:1998
clang::UsingDirectiveDecl
Represents C++ using-directive.
Definition: DeclCXX.h:2863
clang::PresumedLoc::getIncludeLoc
SourceLocation getIncludeLoc() const
Return the presumed include location of this location.
Definition: SourceLocation.h:350
clang::Attr::getKind
attr::Kind getKind() const
Definition: Attr.h:85
clang::ObjCMessageExpr::SuperClass
The receiver is a superclass.
Definition: ExprObjC.h:1104
JSONNodeDumper.h
clang::VarDecl::hasInit
bool hasInit() const
Definition: Decl.cpp:2226
clang::SourceRange::getBegin
SourceLocation getBegin() const
Definition: SourceLocation.h:216
clang::JSONNodeDumper::VisitObjCImplementationDecl
void VisitObjCImplementationDecl(const ObjCImplementationDecl *D)
Definition: JSONNodeDumper.cpp:978
clang::JSONNodeDumper::VisitFunctionDecl
void VisitFunctionDecl(const FunctionDecl *FD)
Definition: JSONNodeDumper.cpp:784
clang::ASTContext::getLangOpts
const LangOptions & getLangOpts() const
Definition: ASTContext.h:724
clang::SizeOfPackExpr::getPack
NamedDecl * getPack() const
Retrieve the parameter pack.
Definition: ExprCXX.h:4162
clang::ObjCCategoryImplDecl
ObjCCategoryImplDecl - An object of this class encapsulates a category @implementation declaration...
Definition: DeclObjC.h:2513
clang::CaseStmt::caseStmtIsGNURange
bool caseStmtIsGNURange() const
True if this case statement is of the form case LHS ...
Definition: Stmt.h:1569
clang::ConstantArrayType
Represents the canonical version of C arrays with a specified constant size.
Definition: Type.h:2935
clang::ObjCTypeParamVariance::Invariant
The parameter is invariant: must match exactly.
clang::FunctionProtoType::ExtProtoInfo::ExceptionSpec
ExceptionSpecInfo ExceptionSpec
Definition: Type.h:3843
clang::FunctionType::ExtInfo
A class which abstracts out some details necessary for making a call.
Definition: Type.h:3533
clang::ObjCPropertyDecl::OBJC_PR_unsafe_unretained
Definition: DeclObjC.h:758
clang::Attr
Attr - This represents one attribute.
Definition: Attr.h:45
clang::FunctionDecl::isDeletedAsWritten
bool isDeletedAsWritten() const
Definition: Decl.h:2263
clang::Decl::getLocation
SourceLocation getLocation() const
Definition: DeclBase.h:429
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::UETT_OpenMPRequiredSimdAlign
Definition: TypeTraits.h:102
clang::TypeSourceInfo::getType
QualType getType() const
Return the type wrapped by this type source info.
Definition: Type.h:6238
clang::SourceManager::getDecomposedLoc
std::pair< FileID, unsigned > getDecomposedLoc(SourceLocation Loc) const
Decompose the specified location into a raw FileID + Offset pair.
Definition: SourceManager.h:1238
clang::StmtVisitorBase< llvm::make_const_ptr, JSONNodeDumper, void, ParamTys... >::P
ParamTys P
Definition: StmtVisitor.h:171
clang::EST_NoexceptTrue
noexcept(expression), evals to &#39;true&#39;
Definition: ExceptionSpecificationType.h:29
clang::NamespaceAliasDecl::getAliasedNamespace
NamedDecl * getAliasedNamespace() const
Retrieve the namespace that this alias refers to, which may either be a NamespaceDecl or a NamespaceA...
Definition: DeclCXX.h:3063
clang::ObjCCompatibleAliasDecl
ObjCCompatibleAliasDecl - Represents alias of a class.
Definition: DeclObjC.h:2743
clang::JSONNodeDumper::VisitObjCBoolLiteralExpr
void VisitObjCBoolLiteralExpr(const ObjCBoolLiteralExpr *OBLE)
Definition: JSONNodeDumper.cpp:1134
clang::JSONNodeDumper::visitHTMLEndTagComment
void visitHTMLEndTagComment(const comments::HTMLEndTagComment *C, const comments::FullComment *)
Definition: JSONNodeDumper.cpp:1549
clang::CXXConstructExpr::getConstructionKind
ConstructionKind getConstructionKind() const
Determine whether this constructor is actually constructing a base class (rather than a complete obje...
Definition: ExprCXX.h:1542
clang::CXXBaseSpecifier::getType
QualType getType() const
Retrieves the type of the base class.
Definition: DeclCXX.h:244