clang  16.0.0git
JSONNodeDumper.cpp
Go to the documentation of this file.
2 #include "clang/AST/Type.h"
5 #include "clang/Lex/Lexer.h"
6 
7 using namespace clang;
8 
9 void JSONNodeDumper::addPreviousDeclaration(const Decl *D) {
10  switch (D->getKind()) {
11 #define DECL(DERIVED, BASE) \
12  case Decl::DERIVED: \
13  return writePreviousDeclImpl(cast<DERIVED##Decl>(D));
14 #define ABSTRACT_DECL(DECL)
15 #include "clang/AST/DeclNodes.inc"
16 #undef ABSTRACT_DECL
17 #undef DECL
18  }
19  llvm_unreachable("Decl that isn't part of DeclNodes.inc!");
20 }
21 
22 void JSONNodeDumper::Visit(const Attr *A) {
23  const char *AttrName = nullptr;
24  switch (A->getKind()) {
25 #define ATTR(X) \
26  case attr::X: \
27  AttrName = #X"Attr"; \
28  break;
29 #include "clang/Basic/AttrList.inc"
30 #undef ATTR
31  }
32  JOS.attribute("id", createPointerRepresentation(A));
33  JOS.attribute("kind", AttrName);
34  JOS.attributeObject("range", [A, this] { writeSourceRange(A->getRange()); });
35  attributeOnlyIfTrue("inherited", A->isInherited());
36  attributeOnlyIfTrue("implicit", A->isImplicit());
37 
38  // FIXME: it would be useful for us to output the spelling kind as well as
39  // the actual spelling. This would allow us to distinguish between the
40  // various attribute syntaxes, but we don't currently track that information
41  // within the AST.
42  //JOS.attribute("spelling", A->getSpelling());
43 
45 }
46 
47 void JSONNodeDumper::Visit(const Stmt *S) {
48  if (!S)
49  return;
50 
51  JOS.attribute("id", createPointerRepresentation(S));
52  JOS.attribute("kind", S->getStmtClassName());
53  JOS.attributeObject("range",
54  [S, this] { writeSourceRange(S->getSourceRange()); });
55 
56  if (const auto *E = dyn_cast<Expr>(S)) {
57  JOS.attribute("type", createQualType(E->getType()));
58  const char *Category = nullptr;
59  switch (E->getValueKind()) {
60  case VK_LValue: Category = "lvalue"; break;
61  case VK_XValue: Category = "xvalue"; break;
62  case VK_PRValue:
63  Category = "prvalue";
64  break;
65  }
66  JOS.attribute("valueCategory", Category);
67  }
69 }
70 
71 void JSONNodeDumper::Visit(const Type *T) {
72  JOS.attribute("id", createPointerRepresentation(T));
73 
74  if (!T)
75  return;
76 
77  JOS.attribute("kind", (llvm::Twine(T->getTypeClassName()) + "Type").str());
78  JOS.attribute("type", createQualType(QualType(T, 0), /*Desugar*/ false));
79  attributeOnlyIfTrue("containsErrors", T->containsErrors());
80  attributeOnlyIfTrue("isDependent", T->isDependentType());
81  attributeOnlyIfTrue("isInstantiationDependent",
83  attributeOnlyIfTrue("isVariablyModified", T->isVariablyModifiedType());
84  attributeOnlyIfTrue("containsUnexpandedPack",
86  attributeOnlyIfTrue("isImported", T->isFromAST());
88 }
89 
91  JOS.attribute("id", createPointerRepresentation(T.getAsOpaquePtr()));
92  JOS.attribute("kind", "QualType");
93  JOS.attribute("type", createQualType(T));
94  JOS.attribute("qualifiers", T.split().Quals.getAsString());
95 }
96 
97 void JSONNodeDumper::Visit(const Decl *D) {
98  JOS.attribute("id", createPointerRepresentation(D));
99 
100  if (!D)
101  return;
102 
103  JOS.attribute("kind", (llvm::Twine(D->getDeclKindName()) + "Decl").str());
104  JOS.attributeObject("loc",
105  [D, this] { writeSourceLocation(D->getLocation()); });
106  JOS.attributeObject("range",
107  [D, this] { writeSourceRange(D->getSourceRange()); });
108  attributeOnlyIfTrue("isImplicit", D->isImplicit());
109  attributeOnlyIfTrue("isInvalid", D->isInvalidDecl());
110 
111  if (D->isUsed())
112  JOS.attribute("isUsed", true);
113  else if (D->isThisDeclarationReferenced())
114  JOS.attribute("isReferenced", true);
115 
116  if (const auto *ND = dyn_cast<NamedDecl>(D))
117  attributeOnlyIfTrue("isHidden", !ND->isUnconditionallyVisible());
118 
119  if (D->getLexicalDeclContext() != D->getDeclContext()) {
120  // Because of multiple inheritance, a DeclContext pointer does not produce
121  // the same pointer representation as a Decl pointer that references the
122  // same AST Node.
123  const auto *ParentDeclContextDecl = dyn_cast<Decl>(D->getDeclContext());
124  JOS.attribute("parentDeclContextId",
125  createPointerRepresentation(ParentDeclContextDecl));
126  }
127 
128  addPreviousDeclaration(D);
130 }
131 
133  const comments::FullComment *FC) {
134  if (!C)
135  return;
136 
137  JOS.attribute("id", createPointerRepresentation(C));
138  JOS.attribute("kind", C->getCommentKindName());
139  JOS.attributeObject("loc",
140  [C, this] { writeSourceLocation(C->getLocation()); });
141  JOS.attributeObject("range",
142  [C, this] { writeSourceRange(C->getSourceRange()); });
143 
145 }
146 
148  const Decl *From, StringRef Label) {
149  JOS.attribute("kind", "TemplateArgument");
150  if (R.isValid())
151  JOS.attributeObject("range", [R, this] { writeSourceRange(R); });
152 
153  if (From)
154  JOS.attribute(Label.empty() ? "fromDecl" : Label, createBareDeclRef(From));
155 
157 }
158 
160  JOS.attribute("kind", "CXXCtorInitializer");
161  if (Init->isAnyMemberInitializer())
162  JOS.attribute("anyInit", createBareDeclRef(Init->getAnyMember()));
163  else if (Init->isBaseInitializer())
164  JOS.attribute("baseInit",
165  createQualType(QualType(Init->getBaseClass(), 0)));
166  else if (Init->isDelegatingInitializer())
167  JOS.attribute("delegatingInit",
168  createQualType(Init->getTypeSourceInfo()->getType()));
169  else
170  llvm_unreachable("Unknown initializer type");
171 }
172 
174 
176  JOS.attribute("kind", "Capture");
177  attributeOnlyIfTrue("byref", C.isByRef());
178  attributeOnlyIfTrue("nested", C.isNested());
179  if (C.getVariable())
180  JOS.attribute("var", createBareDeclRef(C.getVariable()));
181 }
182 
184  JOS.attribute("associationKind", A.getTypeSourceInfo() ? "case" : "default");
185  attributeOnlyIfTrue("selected", A.isSelected());
186 }
187 
189  if (!R)
190  return;
191 
192  switch (R->getKind()) {
194  JOS.attribute("kind", "TypeRequirement");
195  break;
197  JOS.attribute("kind", "SimpleRequirement");
198  break;
200  JOS.attribute("kind", "CompoundRequirement");
201  break;
203  JOS.attribute("kind", "NestedRequirement");
204  break;
205  }
206 
207  if (auto *ER = dyn_cast<concepts::ExprRequirement>(R))
208  attributeOnlyIfTrue("noexcept", ER->hasNoexceptRequirement());
209 
210  attributeOnlyIfTrue("isDependent", R->isDependent());
211  if (!R->isDependent())
212  JOS.attribute("satisfied", R->isSatisfied());
213  attributeOnlyIfTrue("containsUnexpandedPack",
215 }
216 
218  std::string Str;
219  llvm::raw_string_ostream OS(Str);
220  Value.printPretty(OS, Ctx, Ty);
221  JOS.attribute("value", OS.str());
222 }
223 
224 void JSONNodeDumper::writeIncludeStack(PresumedLoc Loc, bool JustFirst) {
225  if (Loc.isInvalid())
226  return;
227 
228  JOS.attributeBegin("includedFrom");
229  JOS.objectBegin();
230 
231  if (!JustFirst) {
232  // Walk the stack recursively, then print out the presumed location.
233  writeIncludeStack(SM.getPresumedLoc(Loc.getIncludeLoc()));
234  }
235 
236  JOS.attribute("file", Loc.getFilename());
237  JOS.objectEnd();
238  JOS.attributeEnd();
239 }
240 
241 void JSONNodeDumper::writeBareSourceLocation(SourceLocation Loc,
242  bool IsSpelling) {
243  PresumedLoc Presumed = SM.getPresumedLoc(Loc);
244  unsigned ActualLine = IsSpelling ? SM.getSpellingLineNumber(Loc)
245  : SM.getExpansionLineNumber(Loc);
246  StringRef ActualFile = SM.getBufferName(Loc);
247 
248  if (Presumed.isValid()) {
249  JOS.attribute("offset", SM.getDecomposedLoc(Loc).second);
250  if (LastLocFilename != ActualFile) {
251  JOS.attribute("file", ActualFile);
252  JOS.attribute("line", ActualLine);
253  } else if (LastLocLine != ActualLine)
254  JOS.attribute("line", ActualLine);
255 
256  StringRef PresumedFile = Presumed.getFilename();
257  if (PresumedFile != ActualFile && LastLocPresumedFilename != PresumedFile)
258  JOS.attribute("presumedFile", PresumedFile);
259 
260  unsigned PresumedLine = Presumed.getLine();
261  if (ActualLine != PresumedLine && LastLocPresumedLine != PresumedLine)
262  JOS.attribute("presumedLine", PresumedLine);
263 
264  JOS.attribute("col", Presumed.getColumn());
265  JOS.attribute("tokLen",
266  Lexer::MeasureTokenLength(Loc, SM, Ctx.getLangOpts()));
267  LastLocFilename = ActualFile;
268  LastLocPresumedFilename = PresumedFile;
269  LastLocPresumedLine = PresumedLine;
270  LastLocLine = ActualLine;
271 
272  // Orthogonal to the file, line, and column de-duplication is whether the
273  // given location was a result of an include. If so, print where the
274  // include location came from.
275  writeIncludeStack(SM.getPresumedLoc(Presumed.getIncludeLoc()),
276  /*JustFirst*/ true);
277  }
278 }
279 
280 void JSONNodeDumper::writeSourceLocation(SourceLocation Loc) {
281  SourceLocation Spelling = SM.getSpellingLoc(Loc);
282  SourceLocation Expansion = SM.getExpansionLoc(Loc);
283 
284  if (Expansion != Spelling) {
285  // If the expansion and the spelling are different, output subobjects
286  // describing both locations.
287  JOS.attributeObject("spellingLoc", [Spelling, this] {
288  writeBareSourceLocation(Spelling, /*IsSpelling*/ true);
289  });
290  JOS.attributeObject("expansionLoc", [Expansion, Loc, this] {
291  writeBareSourceLocation(Expansion, /*IsSpelling*/ false);
292  // If there is a macro expansion, add extra information if the interesting
293  // bit is the macro arg expansion.
294  if (SM.isMacroArgExpansion(Loc))
295  JOS.attribute("isMacroArgExpansion", true);
296  });
297  } else
298  writeBareSourceLocation(Spelling, /*IsSpelling*/ true);
299 }
300 
301 void JSONNodeDumper::writeSourceRange(SourceRange R) {
302  JOS.attributeObject("begin",
303  [R, this] { writeSourceLocation(R.getBegin()); });
304  JOS.attributeObject("end", [R, this] { writeSourceLocation(R.getEnd()); });
305 }
306 
307 std::string JSONNodeDumper::createPointerRepresentation(const void *Ptr) {
308  // Because JSON stores integer values as signed 64-bit integers, trying to
309  // represent them as such makes for very ugly pointer values in the resulting
310  // output. Instead, we convert the value to hex and treat it as a string.
311  return "0x" + llvm::utohexstr(reinterpret_cast<uint64_t>(Ptr), true);
312 }
313 
314 llvm::json::Object JSONNodeDumper::createQualType(QualType QT, bool Desugar) {
315  SplitQualType SQT = QT.split();
316  llvm::json::Object Ret{{"qualType", QualType::getAsString(SQT, PrintPolicy)}};
317 
318  if (Desugar && !QT.isNull()) {
320  if (DSQT != SQT)
321  Ret["desugaredQualType"] = QualType::getAsString(DSQT, PrintPolicy);
322  if (const auto *TT = QT->getAs<TypedefType>())
323  Ret["typeAliasDeclId"] = createPointerRepresentation(TT->getDecl());
324  }
325  return Ret;
326 }
327 
328 void JSONNodeDumper::writeBareDeclRef(const Decl *D) {
329  JOS.attribute("id", createPointerRepresentation(D));
330  if (!D)
331  return;
332 
333  JOS.attribute("kind", (llvm::Twine(D->getDeclKindName()) + "Decl").str());
334  if (const auto *ND = dyn_cast<NamedDecl>(D))
335  JOS.attribute("name", ND->getDeclName().getAsString());
336  if (const auto *VD = dyn_cast<ValueDecl>(D))
337  JOS.attribute("type", createQualType(VD->getType()));
338 }
339 
340 llvm::json::Object JSONNodeDumper::createBareDeclRef(const Decl *D) {
341  llvm::json::Object Ret{{"id", createPointerRepresentation(D)}};
342  if (!D)
343  return Ret;
344 
345  Ret["kind"] = (llvm::Twine(D->getDeclKindName()) + "Decl").str();
346  if (const auto *ND = dyn_cast<NamedDecl>(D))
347  Ret["name"] = ND->getDeclName().getAsString();
348  if (const auto *VD = dyn_cast<ValueDecl>(D))
349  Ret["type"] = createQualType(VD->getType());
350  return Ret;
351 }
352 
353 llvm::json::Array JSONNodeDumper::createCastPath(const CastExpr *C) {
354  llvm::json::Array Ret;
355  if (C->path_empty())
356  return Ret;
357 
358  for (auto I = C->path_begin(), E = C->path_end(); I != E; ++I) {
359  const CXXBaseSpecifier *Base = *I;
360  const auto *RD =
361  cast<CXXRecordDecl>(Base->getType()->castAs<RecordType>()->getDecl());
362 
363  llvm::json::Object Val{{"name", RD->getName()}};
364  if (Base->isVirtual())
365  Val["isVirtual"] = true;
366  Ret.push_back(std::move(Val));
367  }
368  return Ret;
369 }
370 
371 #define FIELD2(Name, Flag) if (RD->Flag()) Ret[Name] = true
372 #define FIELD1(Flag) FIELD2(#Flag, Flag)
373 
374 static llvm::json::Object
376  llvm::json::Object Ret;
377 
378  FIELD2("exists", hasDefaultConstructor);
379  FIELD2("trivial", hasTrivialDefaultConstructor);
380  FIELD2("nonTrivial", hasNonTrivialDefaultConstructor);
381  FIELD2("userProvided", hasUserProvidedDefaultConstructor);
382  FIELD2("isConstexpr", hasConstexprDefaultConstructor);
383  FIELD2("needsImplicit", needsImplicitDefaultConstructor);
384  FIELD2("defaultedIsConstexpr", defaultedDefaultConstructorIsConstexpr);
385 
386  return Ret;
387 }
388 
389 static llvm::json::Object
391  llvm::json::Object Ret;
392 
393  FIELD2("simple", hasSimpleCopyConstructor);
394  FIELD2("trivial", hasTrivialCopyConstructor);
395  FIELD2("nonTrivial", hasNonTrivialCopyConstructor);
396  FIELD2("userDeclared", hasUserDeclaredCopyConstructor);
397  FIELD2("hasConstParam", hasCopyConstructorWithConstParam);
398  FIELD2("implicitHasConstParam", implicitCopyConstructorHasConstParam);
399  FIELD2("needsImplicit", needsImplicitCopyConstructor);
400  FIELD2("needsOverloadResolution", needsOverloadResolutionForCopyConstructor);
402  FIELD2("defaultedIsDeleted", defaultedCopyConstructorIsDeleted);
403 
404  return Ret;
405 }
406 
407 static llvm::json::Object
409  llvm::json::Object Ret;
410 
411  FIELD2("exists", hasMoveConstructor);
412  FIELD2("simple", hasSimpleMoveConstructor);
413  FIELD2("trivial", hasTrivialMoveConstructor);
414  FIELD2("nonTrivial", hasNonTrivialMoveConstructor);
415  FIELD2("userDeclared", hasUserDeclaredMoveConstructor);
416  FIELD2("needsImplicit", needsImplicitMoveConstructor);
417  FIELD2("needsOverloadResolution", needsOverloadResolutionForMoveConstructor);
419  FIELD2("defaultedIsDeleted", defaultedMoveConstructorIsDeleted);
420 
421  return Ret;
422 }
423 
424 static llvm::json::Object
426  llvm::json::Object Ret;
427 
428  FIELD2("simple", hasSimpleCopyAssignment);
429  FIELD2("trivial", hasTrivialCopyAssignment);
430  FIELD2("nonTrivial", hasNonTrivialCopyAssignment);
431  FIELD2("hasConstParam", hasCopyAssignmentWithConstParam);
432  FIELD2("implicitHasConstParam", implicitCopyAssignmentHasConstParam);
433  FIELD2("userDeclared", hasUserDeclaredCopyAssignment);
434  FIELD2("needsImplicit", needsImplicitCopyAssignment);
435  FIELD2("needsOverloadResolution", needsOverloadResolutionForCopyAssignment);
436 
437  return Ret;
438 }
439 
440 static llvm::json::Object
442  llvm::json::Object Ret;
443 
444  FIELD2("exists", hasMoveAssignment);
445  FIELD2("simple", hasSimpleMoveAssignment);
446  FIELD2("trivial", hasTrivialMoveAssignment);
447  FIELD2("nonTrivial", hasNonTrivialMoveAssignment);
448  FIELD2("userDeclared", hasUserDeclaredMoveAssignment);
449  FIELD2("needsImplicit", needsImplicitMoveAssignment);
450  FIELD2("needsOverloadResolution", needsOverloadResolutionForMoveAssignment);
451 
452  return Ret;
453 }
454 
455 static llvm::json::Object
457  llvm::json::Object Ret;
458 
459  FIELD2("simple", hasSimpleDestructor);
460  FIELD2("irrelevant", hasIrrelevantDestructor);
461  FIELD2("trivial", hasTrivialDestructor);
462  FIELD2("nonTrivial", hasNonTrivialDestructor);
463  FIELD2("userDeclared", hasUserDeclaredDestructor);
464  FIELD2("needsImplicit", needsImplicitDestructor);
465  FIELD2("needsOverloadResolution", needsOverloadResolutionForDestructor);
467  FIELD2("defaultedIsDeleted", defaultedDestructorIsDeleted);
468 
469  return Ret;
470 }
471 
472 llvm::json::Object
473 JSONNodeDumper::createCXXRecordDefinitionData(const CXXRecordDecl *RD) {
474  llvm::json::Object Ret;
475 
476  // This data is common to all C++ classes.
477  FIELD1(isGenericLambda);
478  FIELD1(isLambda);
479  FIELD1(isEmpty);
480  FIELD1(isAggregate);
481  FIELD1(isStandardLayout);
482  FIELD1(isTriviallyCopyable);
483  FIELD1(isPOD);
484  FIELD1(isTrivial);
485  FIELD1(isPolymorphic);
486  FIELD1(isAbstract);
487  FIELD1(isLiteral);
489  FIELD1(hasUserDeclaredConstructor);
490  FIELD1(hasConstexprNonCopyMoveConstructor);
491  FIELD1(hasMutableFields);
492  FIELD1(hasVariantMembers);
493  FIELD2("canConstDefaultInit", allowConstDefaultInit);
494 
495  Ret["defaultCtor"] = createDefaultConstructorDefinitionData(RD);
496  Ret["copyCtor"] = createCopyConstructorDefinitionData(RD);
497  Ret["moveCtor"] = createMoveConstructorDefinitionData(RD);
498  Ret["copyAssign"] = createCopyAssignmentDefinitionData(RD);
499  Ret["moveAssign"] = createMoveAssignmentDefinitionData(RD);
500  Ret["dtor"] = createDestructorDefinitionData(RD);
501 
502  return Ret;
503 }
504 
505 #undef FIELD1
506 #undef FIELD2
507 
508 std::string JSONNodeDumper::createAccessSpecifier(AccessSpecifier AS) {
509  const auto AccessSpelling = getAccessSpelling(AS);
510  if (AccessSpelling.empty())
511  return "none";
512  return AccessSpelling.str();
513 }
514 
515 llvm::json::Object
516 JSONNodeDumper::createCXXBaseSpecifier(const CXXBaseSpecifier &BS) {
517  llvm::json::Object Ret;
518 
519  Ret["type"] = createQualType(BS.getType());
520  Ret["access"] = createAccessSpecifier(BS.getAccessSpecifier());
521  Ret["writtenAccess"] =
522  createAccessSpecifier(BS.getAccessSpecifierAsWritten());
523  if (BS.isVirtual())
524  Ret["isVirtual"] = true;
525  if (BS.isPackExpansion())
526  Ret["isPackExpansion"] = true;
527 
528  return Ret;
529 }
530 
532  JOS.attribute("decl", createBareDeclRef(TT->getDecl()));
533  if (!TT->typeMatchesDecl())
534  JOS.attribute("type", createQualType(TT->desugar()));
535 }
536 
538  JOS.attribute("decl", createBareDeclRef(TT->getFoundDecl()));
539  if (!TT->typeMatchesDecl())
540  JOS.attribute("type", createQualType(TT->desugar()));
541 }
542 
545  attributeOnlyIfTrue("noreturn", E.getNoReturn());
546  attributeOnlyIfTrue("producesResult", E.getProducesResult());
547  if (E.getHasRegParm())
548  JOS.attribute("regParm", E.getRegParm());
549  JOS.attribute("cc", FunctionType::getNameForCallConv(E.getCC()));
550 }
551 
554  attributeOnlyIfTrue("trailingReturn", E.HasTrailingReturn);
555  attributeOnlyIfTrue("const", T->isConst());
556  attributeOnlyIfTrue("volatile", T->isVolatile());
557  attributeOnlyIfTrue("restrict", T->isRestrict());
558  attributeOnlyIfTrue("variadic", E.Variadic);
559  switch (E.RefQualifier) {
560  case RQ_LValue: JOS.attribute("refQualifier", "&"); break;
561  case RQ_RValue: JOS.attribute("refQualifier", "&&"); break;
562  case RQ_None: break;
563  }
564  switch (E.ExceptionSpec.Type) {
565  case EST_DynamicNone:
566  case EST_Dynamic: {
567  JOS.attribute("exceptionSpec", "throw");
568  llvm::json::Array Types;
569  for (QualType QT : E.ExceptionSpec.Exceptions)
570  Types.push_back(createQualType(QT));
571  JOS.attribute("exceptionTypes", std::move(Types));
572  } break;
573  case EST_MSAny:
574  JOS.attribute("exceptionSpec", "throw");
575  JOS.attribute("throwsAny", true);
576  break;
577  case EST_BasicNoexcept:
578  JOS.attribute("exceptionSpec", "noexcept");
579  break;
580  case EST_NoexceptTrue:
581  case EST_NoexceptFalse:
582  JOS.attribute("exceptionSpec", "noexcept");
583  JOS.attribute("conditionEvaluatesTo",
585  //JOS.attributeWithCall("exceptionSpecExpr",
586  // [this, E]() { Visit(E.ExceptionSpec.NoexceptExpr); });
587  break;
588  case EST_NoThrow:
589  JOS.attribute("exceptionSpec", "nothrow");
590  break;
591  // FIXME: I cannot find a way to trigger these cases while dumping the AST. I
592  // suspect you can only run into them when executing an AST dump from within
593  // the debugger, which is not a use case we worry about for the JSON dumping
594  // feature.
596  case EST_Unevaluated:
597  case EST_Uninstantiated:
598  case EST_Unparsed:
599  case EST_None: break;
600  }
602 }
603 
605  attributeOnlyIfTrue("spelledAsLValue", RT->isSpelledAsLValue());
606 }
607 
609  switch (AT->getSizeModifier()) {
610  case ArrayType::Star:
611  JOS.attribute("sizeModifier", "*");
612  break;
613  case ArrayType::Static:
614  JOS.attribute("sizeModifier", "static");
615  break;
616  case ArrayType::Normal:
617  break;
618  }
619 
621  if (!Str.empty())
622  JOS.attribute("indexTypeQualifiers", Str);
623 }
624 
626  // FIXME: this should use ZExt instead of SExt, but JSON doesn't allow a
627  // narrowing conversion to int64_t so it cannot be expressed.
628  JOS.attribute("size", CAT->getSize().getSExtValue());
629  VisitArrayType(CAT);
630 }
631 
633  const DependentSizedExtVectorType *VT) {
634  JOS.attributeObject(
635  "attrLoc", [VT, this] { writeSourceLocation(VT->getAttributeLoc()); });
636 }
637 
639  JOS.attribute("numElements", VT->getNumElements());
640  switch (VT->getVectorKind()) {
642  break;
644  JOS.attribute("vectorKind", "altivec");
645  break;
647  JOS.attribute("vectorKind", "altivec pixel");
648  break;
650  JOS.attribute("vectorKind", "altivec bool");
651  break;
653  JOS.attribute("vectorKind", "neon");
654  break;
656  JOS.attribute("vectorKind", "neon poly");
657  break;
659  JOS.attribute("vectorKind", "fixed-length sve data vector");
660  break;
662  JOS.attribute("vectorKind", "fixed-length sve predicate vector");
663  break;
664  }
665 }
666 
668  JOS.attribute("decl", createBareDeclRef(UUT->getDecl()));
669 }
670 
672  switch (UTT->getUTTKind()) {
673 #define TRANSFORM_TYPE_TRAIT_DEF(Enum, Trait) \
674  case UnaryTransformType::Enum: \
675  JOS.attribute("transformKind", #Trait); \
676  break;
677 #include "clang/Basic/TransformTypeTraits.def"
678  }
679 }
680 
682  JOS.attribute("decl", createBareDeclRef(TT->getDecl()));
683 }
684 
686  const TemplateTypeParmType *TTPT) {
687  JOS.attribute("depth", TTPT->getDepth());
688  JOS.attribute("index", TTPT->getIndex());
689  attributeOnlyIfTrue("isPack", TTPT->isParameterPack());
690  JOS.attribute("decl", createBareDeclRef(TTPT->getDecl()));
691 }
692 
694  const SubstTemplateTypeParmType *STTPT) {
695  JOS.attribute("index", STTPT->getIndex());
696  if (auto PackIndex = STTPT->getPackIndex())
697  JOS.attribute("pack_index", *PackIndex);
698 }
699 
702  JOS.attribute("index", T->getIndex());
703 }
704 
706  JOS.attribute("undeduced", !AT->isDeduced());
707  switch (AT->getKeyword()) {
709  JOS.attribute("typeKeyword", "auto");
710  break;
712  JOS.attribute("typeKeyword", "decltype(auto)");
713  break;
715  JOS.attribute("typeKeyword", "__auto_type");
716  break;
717  }
718 }
719 
721  const TemplateSpecializationType *TST) {
722  attributeOnlyIfTrue("isAlias", TST->isTypeAlias());
723 
724  std::string Str;
725  llvm::raw_string_ostream OS(Str);
726  TST->getTemplateName().print(OS, PrintPolicy);
727  JOS.attribute("templateName", OS.str());
728 }
729 
731  const InjectedClassNameType *ICNT) {
732  JOS.attribute("decl", createBareDeclRef(ICNT->getDecl()));
733 }
734 
736  JOS.attribute("decl", createBareDeclRef(OIT->getDecl()));
737 }
738 
741  JOS.attribute("numExpansions", *N);
742 }
743 
745  if (const NestedNameSpecifier *NNS = ET->getQualifier()) {
746  std::string Str;
747  llvm::raw_string_ostream OS(Str);
748  NNS->print(OS, PrintPolicy, /*ResolveTemplateArgs*/ true);
749  JOS.attribute("qualifier", OS.str());
750  }
751  if (const TagDecl *TD = ET->getOwnedTagDecl())
752  JOS.attribute("ownedTagDecl", createBareDeclRef(TD));
753 }
754 
756  JOS.attribute("macroName", MQT->getMacroIdentifier()->getName());
757 }
758 
760  attributeOnlyIfTrue("isData", MPT->isMemberDataPointer());
761  attributeOnlyIfTrue("isFunction", MPT->isMemberFunctionPointer());
762 }
763 
765  if (ND && ND->getDeclName()) {
766  JOS.attribute("name", ND->getNameAsString());
767  // FIXME: There are likely other contexts in which it makes no sense to ask
768  // for a mangled name.
769  if (isa<RequiresExprBodyDecl>(ND->getDeclContext()))
770  return;
771 
772  // Mangled names are not meaningful for locals, and may not be well-defined
773  // in the case of VLAs.
774  auto *VD = dyn_cast<VarDecl>(ND);
775  if (VD && VD->hasLocalStorage())
776  return;
777 
778  std::string MangledName = ASTNameGen.getName(ND);
779  if (!MangledName.empty())
780  JOS.attribute("mangledName", MangledName);
781  }
782 }
783 
785  VisitNamedDecl(TD);
786  JOS.attribute("type", createQualType(TD->getUnderlyingType()));
787 }
788 
790  VisitNamedDecl(TAD);
791  JOS.attribute("type", createQualType(TAD->getUnderlyingType()));
792 }
793 
795  VisitNamedDecl(ND);
796  attributeOnlyIfTrue("isInline", ND->isInline());
797  attributeOnlyIfTrue("isNested", ND->isNested());
798  if (!ND->isOriginalNamespace())
799  JOS.attribute("originalNamespace",
800  createBareDeclRef(ND->getOriginalNamespace()));
801 }
802 
804  JOS.attribute("nominatedNamespace",
805  createBareDeclRef(UDD->getNominatedNamespace()));
806 }
807 
809  VisitNamedDecl(NAD);
810  JOS.attribute("aliasedNamespace",
811  createBareDeclRef(NAD->getAliasedNamespace()));
812 }
813 
815  std::string Name;
816  if (const NestedNameSpecifier *NNS = UD->getQualifier()) {
817  llvm::raw_string_ostream SOS(Name);
818  NNS->print(SOS, UD->getASTContext().getPrintingPolicy());
819  }
820  Name += UD->getNameAsString();
821  JOS.attribute("name", Name);
822 }
823 
825  JOS.attribute("target", createBareDeclRef(UED->getEnumDecl()));
826 }
827 
829  JOS.attribute("target", createBareDeclRef(USD->getTargetDecl()));
830 }
831 
833  VisitNamedDecl(VD);
834  JOS.attribute("type", createQualType(VD->getType()));
835 
836  StorageClass SC = VD->getStorageClass();
837  if (SC != SC_None)
838  JOS.attribute("storageClass", VarDecl::getStorageClassSpecifierString(SC));
839  switch (VD->getTLSKind()) {
840  case VarDecl::TLS_Dynamic: JOS.attribute("tls", "dynamic"); break;
841  case VarDecl::TLS_Static: JOS.attribute("tls", "static"); break;
842  case VarDecl::TLS_None: break;
843  }
844  attributeOnlyIfTrue("nrvo", VD->isNRVOVariable());
845  attributeOnlyIfTrue("inline", VD->isInline());
846  attributeOnlyIfTrue("constexpr", VD->isConstexpr());
847  attributeOnlyIfTrue("modulePrivate", VD->isModulePrivate());
848  if (VD->hasInit()) {
849  switch (VD->getInitStyle()) {
850  case VarDecl::CInit: JOS.attribute("init", "c"); break;
851  case VarDecl::CallInit: JOS.attribute("init", "call"); break;
852  case VarDecl::ListInit: JOS.attribute("init", "list"); break;
853  }
854  }
855  attributeOnlyIfTrue("isParameterPack", VD->isParameterPack());
856 }
857 
859  VisitNamedDecl(FD);
860  JOS.attribute("type", createQualType(FD->getType()));
861  attributeOnlyIfTrue("mutable", FD->isMutable());
862  attributeOnlyIfTrue("modulePrivate", FD->isModulePrivate());
863  attributeOnlyIfTrue("isBitfield", FD->isBitField());
864  attributeOnlyIfTrue("hasInClassInitializer", FD->hasInClassInitializer());
865 }
866 
868  VisitNamedDecl(FD);
869  JOS.attribute("type", createQualType(FD->getType()));
870  StorageClass SC = FD->getStorageClass();
871  if (SC != SC_None)
872  JOS.attribute("storageClass", VarDecl::getStorageClassSpecifierString(SC));
873  attributeOnlyIfTrue("inline", FD->isInlineSpecified());
874  attributeOnlyIfTrue("virtual", FD->isVirtualAsWritten());
875  attributeOnlyIfTrue("pure", FD->isPure());
876  attributeOnlyIfTrue("explicitlyDeleted", FD->isDeletedAsWritten());
877  attributeOnlyIfTrue("constexpr", FD->isConstexpr());
878  attributeOnlyIfTrue("variadic", FD->isVariadic());
879 
880  if (FD->isDefaulted())
881  JOS.attribute("explicitlyDefaulted",
882  FD->isDeleted() ? "deleted" : "default");
883 }
884 
886  VisitNamedDecl(ED);
887  if (ED->isFixed())
888  JOS.attribute("fixedUnderlyingType", createQualType(ED->getIntegerType()));
889  if (ED->isScoped())
890  JOS.attribute("scopedEnumTag",
891  ED->isScopedUsingClassTag() ? "class" : "struct");
892 }
894  VisitNamedDecl(ECD);
895  JOS.attribute("type", createQualType(ECD->getType()));
896 }
897 
899  VisitNamedDecl(RD);
900  JOS.attribute("tagUsed", RD->getKindName());
901  attributeOnlyIfTrue("completeDefinition", RD->isCompleteDefinition());
902 }
904  VisitRecordDecl(RD);
905 
906  // All other information requires a complete definition.
907  if (!RD->isCompleteDefinition())
908  return;
909 
910  JOS.attribute("definitionData", createCXXRecordDefinitionData(RD));
911  if (RD->getNumBases()) {
912  JOS.attributeArray("bases", [this, RD] {
913  for (const auto &Spec : RD->bases())
914  JOS.value(createCXXBaseSpecifier(Spec));
915  });
916  }
917 }
918 
920  VisitNamedDecl(D);
921  JOS.attribute("bufferKind", D->isCBuffer() ? "cbuffer" : "tbuffer");
922 }
923 
925  VisitNamedDecl(D);
926  JOS.attribute("tagUsed", D->wasDeclaredWithTypename() ? "typename" : "class");
927  JOS.attribute("depth", D->getDepth());
928  JOS.attribute("index", D->getIndex());
929  attributeOnlyIfTrue("isParameterPack", D->isParameterPack());
930 
931  if (D->hasDefaultArgument())
932  JOS.attributeObject("defaultArg", [=] {
935  D->defaultArgumentWasInherited() ? "inherited from" : "previous");
936  });
937 }
938 
940  const NonTypeTemplateParmDecl *D) {
941  VisitNamedDecl(D);
942  JOS.attribute("type", createQualType(D->getType()));
943  JOS.attribute("depth", D->getDepth());
944  JOS.attribute("index", D->getIndex());
945  attributeOnlyIfTrue("isParameterPack", D->isParameterPack());
946 
947  if (D->hasDefaultArgument())
948  JOS.attributeObject("defaultArg", [=] {
951  D->defaultArgumentWasInherited() ? "inherited from" : "previous");
952  });
953 }
954 
956  const TemplateTemplateParmDecl *D) {
957  VisitNamedDecl(D);
958  JOS.attribute("depth", D->getDepth());
959  JOS.attribute("index", D->getIndex());
960  attributeOnlyIfTrue("isParameterPack", D->isParameterPack());
961 
962  if (D->hasDefaultArgument())
963  JOS.attributeObject("defaultArg", [=] {
964  const auto *InheritedFrom = D->getDefaultArgStorage().getInheritedFrom();
966  InheritedFrom ? InheritedFrom->getSourceRange() : SourceLocation{},
967  InheritedFrom,
968  D->defaultArgumentWasInherited() ? "inherited from" : "previous");
969  });
970 }
971 
973  StringRef Lang;
974  switch (LSD->getLanguage()) {
975  case LinkageSpecDecl::lang_c: Lang = "C"; break;
976  case LinkageSpecDecl::lang_cxx: Lang = "C++"; break;
977  }
978  JOS.attribute("language", Lang);
979  attributeOnlyIfTrue("hasBraces", LSD->hasBraces());
980 }
981 
983  JOS.attribute("access", createAccessSpecifier(ASD->getAccess()));
984 }
985 
987  if (const TypeSourceInfo *T = FD->getFriendType())
988  JOS.attribute("type", createQualType(T->getType()));
989 }
990 
992  VisitNamedDecl(D);
993  JOS.attribute("type", createQualType(D->getType()));
994  attributeOnlyIfTrue("synthesized", D->getSynthesize());
995  switch (D->getAccessControl()) {
996  case ObjCIvarDecl::None: JOS.attribute("access", "none"); break;
997  case ObjCIvarDecl::Private: JOS.attribute("access", "private"); break;
998  case ObjCIvarDecl::Protected: JOS.attribute("access", "protected"); break;
999  case ObjCIvarDecl::Public: JOS.attribute("access", "public"); break;
1000  case ObjCIvarDecl::Package: JOS.attribute("access", "package"); break;
1001  }
1002 }
1003 
1005  VisitNamedDecl(D);
1006  JOS.attribute("returnType", createQualType(D->getReturnType()));
1007  JOS.attribute("instance", D->isInstanceMethod());
1008  attributeOnlyIfTrue("variadic", D->isVariadic());
1009 }
1010 
1012  VisitNamedDecl(D);
1013  JOS.attribute("type", createQualType(D->getUnderlyingType()));
1014  attributeOnlyIfTrue("bounded", D->hasExplicitBound());
1015  switch (D->getVariance()) {
1017  break;
1019  JOS.attribute("variance", "covariant");
1020  break;
1022  JOS.attribute("variance", "contravariant");
1023  break;
1024  }
1025 }
1026 
1028  VisitNamedDecl(D);
1029  JOS.attribute("interface", createBareDeclRef(D->getClassInterface()));
1030  JOS.attribute("implementation", createBareDeclRef(D->getImplementation()));
1031 
1032  llvm::json::Array Protocols;
1033  for (const auto* P : D->protocols())
1034  Protocols.push_back(createBareDeclRef(P));
1035  if (!Protocols.empty())
1036  JOS.attribute("protocols", std::move(Protocols));
1037 }
1038 
1040  VisitNamedDecl(D);
1041  JOS.attribute("interface", createBareDeclRef(D->getClassInterface()));
1042  JOS.attribute("categoryDecl", createBareDeclRef(D->getCategoryDecl()));
1043 }
1044 
1046  VisitNamedDecl(D);
1047 
1048  llvm::json::Array Protocols;
1049  for (const auto *P : D->protocols())
1050  Protocols.push_back(createBareDeclRef(P));
1051  if (!Protocols.empty())
1052  JOS.attribute("protocols", std::move(Protocols));
1053 }
1054 
1056  VisitNamedDecl(D);
1057  JOS.attribute("super", createBareDeclRef(D->getSuperClass()));
1058  JOS.attribute("implementation", createBareDeclRef(D->getImplementation()));
1059 
1060  llvm::json::Array Protocols;
1061  for (const auto* P : D->protocols())
1062  Protocols.push_back(createBareDeclRef(P));
1063  if (!Protocols.empty())
1064  JOS.attribute("protocols", std::move(Protocols));
1065 }
1066 
1068  const ObjCImplementationDecl *D) {
1069  VisitNamedDecl(D);
1070  JOS.attribute("super", createBareDeclRef(D->getSuperClass()));
1071  JOS.attribute("interface", createBareDeclRef(D->getClassInterface()));
1072 }
1073 
1075  const ObjCCompatibleAliasDecl *D) {
1076  VisitNamedDecl(D);
1077  JOS.attribute("interface", createBareDeclRef(D->getClassInterface()));
1078 }
1079 
1081  VisitNamedDecl(D);
1082  JOS.attribute("type", createQualType(D->getType()));
1083 
1084  switch (D->getPropertyImplementation()) {
1085  case ObjCPropertyDecl::None: break;
1086  case ObjCPropertyDecl::Required: JOS.attribute("control", "required"); break;
1087  case ObjCPropertyDecl::Optional: JOS.attribute("control", "optional"); break;
1088  }
1089 
1091  if (Attrs != ObjCPropertyAttribute::kind_noattr) {
1093  JOS.attribute("getter", createBareDeclRef(D->getGetterMethodDecl()));
1095  JOS.attribute("setter", createBareDeclRef(D->getSetterMethodDecl()));
1096  attributeOnlyIfTrue("readonly",
1098  attributeOnlyIfTrue("assign", Attrs & ObjCPropertyAttribute::kind_assign);
1099  attributeOnlyIfTrue("readwrite",
1101  attributeOnlyIfTrue("retain", Attrs & ObjCPropertyAttribute::kind_retain);
1102  attributeOnlyIfTrue("copy", Attrs & ObjCPropertyAttribute::kind_copy);
1103  attributeOnlyIfTrue("nonatomic",
1105  attributeOnlyIfTrue("atomic", Attrs & ObjCPropertyAttribute::kind_atomic);
1106  attributeOnlyIfTrue("weak", Attrs & ObjCPropertyAttribute::kind_weak);
1107  attributeOnlyIfTrue("strong", Attrs & ObjCPropertyAttribute::kind_strong);
1108  attributeOnlyIfTrue("unsafe_unretained",
1110  attributeOnlyIfTrue("class", Attrs & ObjCPropertyAttribute::kind_class);
1111  attributeOnlyIfTrue("direct", Attrs & ObjCPropertyAttribute::kind_direct);
1112  attributeOnlyIfTrue("nullability",
1114  attributeOnlyIfTrue("null_resettable",
1116  }
1117 }
1118 
1121  JOS.attribute("implKind", D->getPropertyImplementation() ==
1123  ? "synthesize"
1124  : "dynamic");
1125  JOS.attribute("propertyDecl", createBareDeclRef(D->getPropertyDecl()));
1126  JOS.attribute("ivarDecl", createBareDeclRef(D->getPropertyIvarDecl()));
1127 }
1128 
1130  attributeOnlyIfTrue("variadic", D->isVariadic());
1131  attributeOnlyIfTrue("capturesThis", D->capturesCXXThis());
1132 }
1133 
1135  JOS.attribute("encodedType", createQualType(OEE->getEncodedType()));
1136 }
1137 
1139  std::string Str;
1140  llvm::raw_string_ostream OS(Str);
1141 
1142  OME->getSelector().print(OS);
1143  JOS.attribute("selector", OS.str());
1144 
1145  switch (OME->getReceiverKind()) {
1147  JOS.attribute("receiverKind", "instance");
1148  break;
1150  JOS.attribute("receiverKind", "class");
1151  JOS.attribute("classType", createQualType(OME->getClassReceiver()));
1152  break;
1154  JOS.attribute("receiverKind", "super (instance)");
1155  JOS.attribute("superType", createQualType(OME->getSuperType()));
1156  break;
1158  JOS.attribute("receiverKind", "super (class)");
1159  JOS.attribute("superType", createQualType(OME->getSuperType()));
1160  break;
1161  }
1162 
1163  QualType CallReturnTy = OME->getCallReturnType(Ctx);
1164  if (OME->getType() != CallReturnTy)
1165  JOS.attribute("callReturnType", createQualType(CallReturnTy));
1166 }
1167 
1169  if (const ObjCMethodDecl *MD = OBE->getBoxingMethod()) {
1170  std::string Str;
1171  llvm::raw_string_ostream OS(Str);
1172 
1173  MD->getSelector().print(OS);
1174  JOS.attribute("selector", OS.str());
1175  }
1176 }
1177 
1179  std::string Str;
1180  llvm::raw_string_ostream OS(Str);
1181 
1182  OSE->getSelector().print(OS);
1183  JOS.attribute("selector", OS.str());
1184 }
1185 
1187  JOS.attribute("protocol", createBareDeclRef(OPE->getProtocol()));
1188 }
1189 
1191  if (OPRE->isImplicitProperty()) {
1192  JOS.attribute("propertyKind", "implicit");
1193  if (const ObjCMethodDecl *MD = OPRE->getImplicitPropertyGetter())
1194  JOS.attribute("getter", createBareDeclRef(MD));
1195  if (const ObjCMethodDecl *MD = OPRE->getImplicitPropertySetter())
1196  JOS.attribute("setter", createBareDeclRef(MD));
1197  } else {
1198  JOS.attribute("propertyKind", "explicit");
1199  JOS.attribute("property", createBareDeclRef(OPRE->getExplicitProperty()));
1200  }
1201 
1202  attributeOnlyIfTrue("isSuperReceiver", OPRE->isSuperReceiver());
1203  attributeOnlyIfTrue("isMessagingGetter", OPRE->isMessagingGetter());
1204  attributeOnlyIfTrue("isMessagingSetter", OPRE->isMessagingSetter());
1205 }
1206 
1208  const ObjCSubscriptRefExpr *OSRE) {
1209  JOS.attribute("subscriptKind",
1210  OSRE->isArraySubscriptRefExpr() ? "array" : "dictionary");
1211 
1212  if (const ObjCMethodDecl *MD = OSRE->getAtIndexMethodDecl())
1213  JOS.attribute("getter", createBareDeclRef(MD));
1214  if (const ObjCMethodDecl *MD = OSRE->setAtIndexMethodDecl())
1215  JOS.attribute("setter", createBareDeclRef(MD));
1216 }
1217 
1219  JOS.attribute("decl", createBareDeclRef(OIRE->getDecl()));
1220  attributeOnlyIfTrue("isFreeIvar", OIRE->isFreeIvar());
1221  JOS.attribute("isArrow", OIRE->isArrow());
1222 }
1223 
1225  JOS.attribute("value", OBLE->getValue() ? "__objc_yes" : "__objc_no");
1226 }
1227 
1229  JOS.attribute("referencedDecl", createBareDeclRef(DRE->getDecl()));
1230  if (DRE->getDecl() != DRE->getFoundDecl())
1231  JOS.attribute("foundReferencedDecl",
1232  createBareDeclRef(DRE->getFoundDecl()));
1233  switch (DRE->isNonOdrUse()) {
1234  case NOUR_None: break;
1235  case NOUR_Unevaluated: JOS.attribute("nonOdrUseReason", "unevaluated"); break;
1236  case NOUR_Constant: JOS.attribute("nonOdrUseReason", "constant"); break;
1237  case NOUR_Discarded: JOS.attribute("nonOdrUseReason", "discarded"); break;
1238  }
1239 }
1240 
1242  const SYCLUniqueStableNameExpr *E) {
1243  JOS.attribute("typeSourceInfo",
1244  createQualType(E->getTypeSourceInfo()->getType()));
1245 }
1246 
1248  JOS.attribute("name", PredefinedExpr::getIdentKindName(PE->getIdentKind()));
1249 }
1250 
1252  JOS.attribute("isPostfix", UO->isPostfix());
1253  JOS.attribute("opcode", UnaryOperator::getOpcodeStr(UO->getOpcode()));
1254  if (!UO->canOverflow())
1255  JOS.attribute("canOverflow", false);
1256 }
1257 
1259  JOS.attribute("opcode", BinaryOperator::getOpcodeStr(BO->getOpcode()));
1260 }
1261 
1263  const CompoundAssignOperator *CAO) {
1264  VisitBinaryOperator(CAO);
1265  JOS.attribute("computeLHSType", createQualType(CAO->getComputationLHSType()));
1266  JOS.attribute("computeResultType",
1267  createQualType(CAO->getComputationResultType()));
1268 }
1269 
1271  // Note, we always write this Boolean field because the information it conveys
1272  // is critical to understanding the AST node.
1273  ValueDecl *VD = ME->getMemberDecl();
1274  JOS.attribute("name", VD && VD->getDeclName() ? VD->getNameAsString() : "");
1275  JOS.attribute("isArrow", ME->isArrow());
1276  JOS.attribute("referencedMemberDecl", createPointerRepresentation(VD));
1277  switch (ME->isNonOdrUse()) {
1278  case NOUR_None: break;
1279  case NOUR_Unevaluated: JOS.attribute("nonOdrUseReason", "unevaluated"); break;
1280  case NOUR_Constant: JOS.attribute("nonOdrUseReason", "constant"); break;
1281  case NOUR_Discarded: JOS.attribute("nonOdrUseReason", "discarded"); break;
1282  }
1283 }
1284 
1286  attributeOnlyIfTrue("isGlobal", NE->isGlobalNew());
1287  attributeOnlyIfTrue("isArray", NE->isArray());
1288  attributeOnlyIfTrue("isPlacement", NE->getNumPlacementArgs() != 0);
1289  switch (NE->getInitializationStyle()) {
1290  case CXXNewExpr::NoInit: break;
1291  case CXXNewExpr::CallInit: JOS.attribute("initStyle", "call"); break;
1292  case CXXNewExpr::ListInit: JOS.attribute("initStyle", "list"); break;
1293  }
1294  if (const FunctionDecl *FD = NE->getOperatorNew())
1295  JOS.attribute("operatorNewDecl", createBareDeclRef(FD));
1296  if (const FunctionDecl *FD = NE->getOperatorDelete())
1297  JOS.attribute("operatorDeleteDecl", createBareDeclRef(FD));
1298 }
1300  attributeOnlyIfTrue("isGlobal", DE->isGlobalDelete());
1301  attributeOnlyIfTrue("isArray", DE->isArrayForm());
1302  attributeOnlyIfTrue("isArrayAsWritten", DE->isArrayFormAsWritten());
1303  if (const FunctionDecl *FD = DE->getOperatorDelete())
1304  JOS.attribute("operatorDeleteDecl", createBareDeclRef(FD));
1305 }
1306 
1308  attributeOnlyIfTrue("implicit", TE->isImplicit());
1309 }
1310 
1312  JOS.attribute("castKind", CE->getCastKindName());
1313  llvm::json::Array Path = createCastPath(CE);
1314  if (!Path.empty())
1315  JOS.attribute("path", std::move(Path));
1316  // FIXME: This may not be useful information as it can be obtusely gleaned
1317  // from the inner[] array.
1318  if (const NamedDecl *ND = CE->getConversionFunction())
1319  JOS.attribute("conversionFunc", createBareDeclRef(ND));
1320 }
1321 
1323  VisitCastExpr(ICE);
1324  attributeOnlyIfTrue("isPartOfExplicitCast", ICE->isPartOfExplicitCast());
1325 }
1326 
1328  attributeOnlyIfTrue("adl", CE->usesADL());
1329 }
1330 
1332  const UnaryExprOrTypeTraitExpr *TTE) {
1333  JOS.attribute("name", getTraitSpelling(TTE->getKind()));
1334  if (TTE->isArgumentType())
1335  JOS.attribute("argType", createQualType(TTE->getArgumentType()));
1336 }
1337 
1339  VisitNamedDecl(SOPE->getPack());
1340 }
1341 
1343  const UnresolvedLookupExpr *ULE) {
1344  JOS.attribute("usesADL", ULE->requiresADL());
1345  JOS.attribute("name", ULE->getName().getAsString());
1346 
1347  JOS.attributeArray("lookups", [this, ULE] {
1348  for (const NamedDecl *D : ULE->decls())
1349  JOS.value(createBareDeclRef(D));
1350  });
1351 }
1352 
1354  JOS.attribute("name", ALE->getLabel()->getName());
1355  JOS.attribute("labelDeclId", createPointerRepresentation(ALE->getLabel()));
1356 }
1357 
1359  if (CTE->isTypeOperand()) {
1360  QualType Adjusted = CTE->getTypeOperand(Ctx);
1361  QualType Unadjusted = CTE->getTypeOperandSourceInfo()->getType();
1362  JOS.attribute("typeArg", createQualType(Unadjusted));
1363  if (Adjusted != Unadjusted)
1364  JOS.attribute("adjustedTypeArg", createQualType(Adjusted));
1365  }
1366 }
1367 
1369  if (CE->getResultAPValueKind() != APValue::None)
1370  Visit(CE->getAPValueResult(), CE->getType());
1371 }
1372 
1374  if (const FieldDecl *FD = ILE->getInitializedFieldInUnion())
1375  JOS.attribute("field", createBareDeclRef(FD));
1376 }
1377 
1379  const GenericSelectionExpr *GSE) {
1380  attributeOnlyIfTrue("resultDependent", GSE->isResultDependent());
1381 }
1382 
1384  const CXXUnresolvedConstructExpr *UCE) {
1385  if (UCE->getType() != UCE->getTypeAsWritten())
1386  JOS.attribute("typeAsWritten", createQualType(UCE->getTypeAsWritten()));
1387  attributeOnlyIfTrue("list", UCE->isListInitialization());
1388 }
1389 
1391  CXXConstructorDecl *Ctor = CE->getConstructor();
1392  JOS.attribute("ctorType", createQualType(Ctor->getType()));
1393  attributeOnlyIfTrue("elidable", CE->isElidable());
1394  attributeOnlyIfTrue("list", CE->isListInitialization());
1395  attributeOnlyIfTrue("initializer_list", CE->isStdInitListInitialization());
1396  attributeOnlyIfTrue("zeroing", CE->requiresZeroInitialization());
1397  attributeOnlyIfTrue("hadMultipleCandidates", CE->hadMultipleCandidates());
1398 
1399  switch (CE->getConstructionKind()) {
1401  JOS.attribute("constructionKind", "complete");
1402  break;
1404  JOS.attribute("constructionKind", "delegating");
1405  break;
1407  JOS.attribute("constructionKind", "non-virtual base");
1408  break;
1410  JOS.attribute("constructionKind", "virtual base");
1411  break;
1412  }
1413 }
1414 
1416  attributeOnlyIfTrue("cleanupsHaveSideEffects",
1417  EWC->cleanupsHaveSideEffects());
1418  if (EWC->getNumObjects()) {
1419  JOS.attributeArray("cleanups", [this, EWC] {
1420  for (const ExprWithCleanups::CleanupObject &CO : EWC->getObjects())
1421  if (auto *BD = CO.dyn_cast<BlockDecl *>()) {
1422  JOS.value(createBareDeclRef(BD));
1423  } else if (auto *CLE = CO.dyn_cast<CompoundLiteralExpr *>()) {
1424  llvm::json::Object Obj;
1425  Obj["id"] = createPointerRepresentation(CLE);
1426  Obj["kind"] = CLE->getStmtClassName();
1427  JOS.value(std::move(Obj));
1428  } else {
1429  llvm_unreachable("unexpected cleanup object type");
1430  }
1431  });
1432  }
1433 }
1434 
1436  const CXXBindTemporaryExpr *BTE) {
1437  const CXXTemporary *Temp = BTE->getTemporary();
1438  JOS.attribute("temp", createPointerRepresentation(Temp));
1439  if (const CXXDestructorDecl *Dtor = Temp->getDestructor())
1440  JOS.attribute("dtor", createBareDeclRef(Dtor));
1441 }
1442 
1444  const MaterializeTemporaryExpr *MTE) {
1445  if (const ValueDecl *VD = MTE->getExtendingDecl())
1446  JOS.attribute("extendingDecl", createBareDeclRef(VD));
1447 
1448  switch (MTE->getStorageDuration()) {
1449  case SD_Automatic:
1450  JOS.attribute("storageDuration", "automatic");
1451  break;
1452  case SD_Dynamic:
1453  JOS.attribute("storageDuration", "dynamic");
1454  break;
1455  case SD_FullExpression:
1456  JOS.attribute("storageDuration", "full expression");
1457  break;
1458  case SD_Static:
1459  JOS.attribute("storageDuration", "static");
1460  break;
1461  case SD_Thread:
1462  JOS.attribute("storageDuration", "thread");
1463  break;
1464  }
1465 
1466  attributeOnlyIfTrue("boundToLValueRef", MTE->isBoundToLvalueReference());
1467 }
1468 
1470  const CXXDependentScopeMemberExpr *DSME) {
1471  JOS.attribute("isArrow", DSME->isArrow());
1472  JOS.attribute("member", DSME->getMember().getAsString());
1473  attributeOnlyIfTrue("hasTemplateKeyword", DSME->hasTemplateKeyword());
1474  attributeOnlyIfTrue("hasExplicitTemplateArgs",
1475  DSME->hasExplicitTemplateArgs());
1476 
1477  if (DSME->getNumTemplateArgs()) {
1478  JOS.attributeArray("explicitTemplateArgs", [DSME, this] {
1479  for (const TemplateArgumentLoc &TAL : DSME->template_arguments())
1480  JOS.object(
1481  [&TAL, this] { Visit(TAL.getArgument(), TAL.getSourceRange()); });
1482  });
1483  }
1484 }
1485 
1487  if (!RE->isValueDependent())
1488  JOS.attribute("satisfied", RE->isSatisfied());
1489 }
1490 
1492  llvm::SmallString<16> Buffer;
1493  IL->getValue().toString(Buffer,
1494  /*Radix=*/10, IL->getType()->isSignedIntegerType());
1495  JOS.attribute("value", Buffer);
1496 }
1498  // FIXME: This should probably print the character literal as a string,
1499  // rather than as a numerical value. It would be nice if the behavior matched
1500  // what we do to print a string literal; right now, it is impossible to tell
1501  // the difference between 'a' and L'a' in C from the JSON output.
1502  JOS.attribute("value", CL->getValue());
1503 }
1505  JOS.attribute("value", FPL->getValueAsString(/*Radix=*/10));
1506 }
1508  llvm::SmallString<16> Buffer;
1509  FL->getValue().toString(Buffer);
1510  JOS.attribute("value", Buffer);
1511 }
1513  std::string Buffer;
1514  llvm::raw_string_ostream SS(Buffer);
1515  SL->outputString(SS);
1516  JOS.attribute("value", SS.str());
1517 }
1519  JOS.attribute("value", BLE->getValue());
1520 }
1521 
1523  attributeOnlyIfTrue("hasInit", IS->hasInitStorage());
1524  attributeOnlyIfTrue("hasVar", IS->hasVarStorage());
1525  attributeOnlyIfTrue("hasElse", IS->hasElseStorage());
1526  attributeOnlyIfTrue("isConstexpr", IS->isConstexpr());
1527  attributeOnlyIfTrue("isConsteval", IS->isConsteval());
1528  attributeOnlyIfTrue("constevalIsNegated", IS->isNegatedConsteval());
1529 }
1530 
1532  attributeOnlyIfTrue("hasInit", SS->hasInitStorage());
1533  attributeOnlyIfTrue("hasVar", SS->hasVarStorage());
1534 }
1536  attributeOnlyIfTrue("isGNURange", CS->caseStmtIsGNURange());
1537 }
1538 
1540  JOS.attribute("name", LS->getName());
1541  JOS.attribute("declId", createPointerRepresentation(LS->getDecl()));
1542  attributeOnlyIfTrue("sideEntry", LS->isSideEntry());
1543 }
1545  JOS.attribute("targetLabelDeclId",
1546  createPointerRepresentation(GS->getLabel()));
1547 }
1548 
1550  attributeOnlyIfTrue("hasVar", WS->hasVarStorage());
1551 }
1552 
1554  // FIXME: it would be nice for the ASTNodeTraverser would handle the catch
1555  // parameter the same way for C++ and ObjC rather. In this case, C++ gets a
1556  // null child node and ObjC gets no child node.
1557  attributeOnlyIfTrue("isCatchAll", OACS->getCatchParamDecl() == nullptr);
1558 }
1559 
1561  JOS.attribute("isNull", true);
1562 }
1564  JOS.attribute("type", createQualType(TA.getAsType()));
1565 }
1567  const TemplateArgument &TA) {
1568  JOS.attribute("decl", createBareDeclRef(TA.getAsDecl()));
1569 }
1571  JOS.attribute("isNullptr", true);
1572 }
1574  JOS.attribute("value", TA.getAsIntegral().getSExtValue());
1575 }
1577  // FIXME: cannot just call dump() on the argument, as that doesn't specify
1578  // the output format.
1579 }
1581  const TemplateArgument &TA) {
1582  // FIXME: cannot just call dump() on the argument, as that doesn't specify
1583  // the output format.
1584 }
1586  const TemplateArgument &TA) {
1587  JOS.attribute("isExpr", true);
1588 }
1590  JOS.attribute("isPack", true);
1591 }
1592 
1593 StringRef JSONNodeDumper::getCommentCommandName(unsigned CommandID) const {
1594  if (Traits)
1595  return Traits->getCommandInfo(CommandID)->Name;
1596  if (const comments::CommandInfo *Info =
1598  return Info->Name;
1599  return "<invalid>";
1600 }
1601 
1603  const comments::FullComment *) {
1604  JOS.attribute("text", C->getText());
1605 }
1606 
1609  JOS.attribute("name", getCommentCommandName(C->getCommandID()));
1610 
1611  switch (C->getRenderKind()) {
1613  JOS.attribute("renderKind", "normal");
1614  break;
1616  JOS.attribute("renderKind", "bold");
1617  break;
1619  JOS.attribute("renderKind", "emphasized");
1620  break;
1622  JOS.attribute("renderKind", "monospaced");
1623  break;
1625  JOS.attribute("renderKind", "anchor");
1626  break;
1627  }
1628 
1629  llvm::json::Array Args;
1630  for (unsigned I = 0, E = C->getNumArgs(); I < E; ++I)
1631  Args.push_back(C->getArgText(I));
1632 
1633  if (!Args.empty())
1634  JOS.attribute("args", std::move(Args));
1635 }
1636 
1639  JOS.attribute("name", C->getTagName());
1640  attributeOnlyIfTrue("selfClosing", C->isSelfClosing());
1641  attributeOnlyIfTrue("malformed", C->isMalformed());
1642 
1643  llvm::json::Array Attrs;
1644  for (unsigned I = 0, E = C->getNumAttrs(); I < E; ++I)
1645  Attrs.push_back(
1646  {{"name", C->getAttr(I).Name}, {"value", C->getAttr(I).Value}});
1647 
1648  if (!Attrs.empty())
1649  JOS.attribute("attrs", std::move(Attrs));
1650 }
1651 
1654  JOS.attribute("name", C->getTagName());
1655 }
1656 
1659  JOS.attribute("name", getCommentCommandName(C->getCommandID()));
1660 
1661  llvm::json::Array Args;
1662  for (unsigned I = 0, E = C->getNumArgs(); I < E; ++I)
1663  Args.push_back(C->getArgText(I));
1664 
1665  if (!Args.empty())
1666  JOS.attribute("args", std::move(Args));
1667 }
1668 
1671  switch (C->getDirection()) {
1673  JOS.attribute("direction", "in");
1674  break;
1676  JOS.attribute("direction", "out");
1677  break;
1679  JOS.attribute("direction", "in,out");
1680  break;
1681  }
1682  attributeOnlyIfTrue("explicit", C->isDirectionExplicit());
1683 
1684  if (C->hasParamName())
1685  JOS.attribute("param", C->isParamIndexValid() ? C->getParamName(FC)
1686  : C->getParamNameAsWritten());
1687 
1688  if (C->isParamIndexValid() && !C->isVarArgParam())
1689  JOS.attribute("paramIdx", C->getParamIndex());
1690 }
1691 
1694  if (C->hasParamName())
1695  JOS.attribute("param", C->isPositionValid() ? C->getParamName(FC)
1696  : C->getParamNameAsWritten());
1697  if (C->isPositionValid()) {
1698  llvm::json::Array Positions;
1699  for (unsigned I = 0, E = C->getDepth(); I < E; ++I)
1700  Positions.push_back(C->getIndex(I));
1701 
1702  if (!Positions.empty())
1703  JOS.attribute("positions", std::move(Positions));
1704  }
1705 }
1706 
1709  JOS.attribute("name", getCommentCommandName(C->getCommandID()));
1710  JOS.attribute("closeName", C->getCloseName());
1711 }
1712 
1715  const comments::FullComment *) {
1716  JOS.attribute("text", C->getText());
1717 }
1718 
1721  JOS.attribute("text", C->getText());
1722 }
1723 
1724 llvm::json::Object JSONNodeDumper::createFPOptions(FPOptionsOverride FPO) {
1725  llvm::json::Object Ret;
1726 #define OPTION(NAME, TYPE, WIDTH, PREVIOUS) \
1727  if (FPO.has##NAME##Override()) \
1728  Ret.try_emplace(#NAME, static_cast<unsigned>(FPO.get##NAME##Override()));
1729 #include "clang/Basic/FPOptions.def"
1730  return Ret;
1731 }
1732 
1734  VisitStmt(S);
1735  if (S->hasStoredFPFeatures())
1736  JOS.attribute("fpoptions", createFPOptions(S->getStoredFPFeatures()));
1737 }
clang::ObjCSubscriptRefExpr::setAtIndexMethodDecl
ObjCMethodDecl * setAtIndexMethodDecl() const
Definition: ExprObjC.h:890
clang::SwitchStmt::hasVarStorage
bool hasVarStorage() const
True if this SwitchStmt has storage for a condition variable.
Definition: Stmt.h:2248
clang::LabelStmt
LabelStmt - Represents a label, which has a substatement.
Definition: Stmt.h:1835
clang::ObjCMessageExpr::SuperInstance
@ SuperInstance
The receiver is the instance of the superclass object.
Definition: ExprObjC.h:1097
clang::TagDecl::getKindName
StringRef getKindName() const
Definition: Decl.h:3616
clang::ObjCInterfaceDecl
Represents an ObjC class declaration.
Definition: DeclObjC.h:1149
clang::CompoundAssignOperator::getComputationLHSType
QualType getComputationLHSType() const
Definition: Expr.h:4093
clang::JSONNodeDumper::VisitUnaryTransformType
void VisitUnaryTransformType(const UnaryTransformType *UTT)
Definition: JSONNodeDumper.cpp:671
clang::ObjCTypeParamDecl::hasExplicitBound
bool hasExplicitBound() const
Whether this type parameter has an explicitly-written type bound, e.g., "T : NSView".
Definition: DeclObjC.h:642
clang::ObjCSubscriptRefExpr::isArraySubscriptRefExpr
bool isArraySubscriptRefExpr() const
Definition: ExprObjC.h:894
clang::JSONNodeDumper::VisitLinkageSpecDecl
void VisitLinkageSpecDecl(const LinkageSpecDecl *LSD)
Definition: JSONNodeDumper.cpp:972
clang::comments::CommentVisitorBase< llvm::make_const_ptr, JSONNodeDumper, void, ParamTys... >::visit
void visit(PTR(Comment) C, ParamTys... P)
Definition: CommentVisitor.h:27
clang::DeclRefExpr::getFoundDecl
NamedDecl * getFoundDecl()
Get the NamedDecl through which this reference occurred.
Definition: Expr.h:1341
clang::CXXConstructExpr::CK_Complete
@ CK_Complete
Definition: ExprCXX.h:1472
clang::CXXUnresolvedConstructExpr::isListInitialization
bool isListInitialization() const
Determine whether this expression models list-initialization.
Definition: ExprCXX.h:3507
clang::ObjCPropertyImplDecl::getPropertyIvarDecl
ObjCIvarDecl * getPropertyIvarDecl() const
Definition: DeclObjC.h:2844
clang::CaseStmt
CaseStmt - Represent a case statement.
Definition: Stmt.h:1603
clang::ObjCCompatibleAliasDecl
ObjCCompatibleAliasDecl - Represents alias of a class.
Definition: DeclObjC.h:2741
clang::ObjCMessageExpr::getCallReturnType
QualType getCallReturnType(ASTContext &Ctx) const
Definition: ExprObjC.cpp:265
clang::Decl::getASTContext
ASTContext & getASTContext() const LLVM_READONLY
Definition: DeclBase.cpp:428
clang::AccessSpecDecl
Represents an access specifier followed by colon ':'.
Definition: DeclCXX.h:86
clang::comments::VerbatimLineComment
A verbatim line command.
Definition: Comment.h:926
clang::FunctionDecl::isDefaulted
bool isDefaulted() const
Whether this function is defaulted.
Definition: Decl.h:2269
clang::ObjCPropertyRefExpr::getImplicitPropertySetter
ObjCMethodDecl * getImplicitPropertySetter() const
Definition: ExprObjC.h:713
clang::JSONNodeDumper::VisitFieldDecl
void VisitFieldDecl(const FieldDecl *FD)
Definition: JSONNodeDumper.cpp:858
clang::JSONNodeDumper::VisitObjCIvarRefExpr
void VisitObjCIvarRefExpr(const ObjCIvarRefExpr *OIRE)
Definition: JSONNodeDumper.cpp:1218
clang::JSONNodeDumper::VisitObjCBoolLiteralExpr
void VisitObjCBoolLiteralExpr(const ObjCBoolLiteralExpr *OBLE)
Definition: JSONNodeDumper.cpp:1224
clang::SizeOfPackExpr::getPack
NamedDecl * getPack() const
Retrieve the parameter pack.
Definition: ExprCXX.h:4222
clang::UnresolvedLookupExpr::requiresADL
bool requiresADL() const
True if this declaration should be extended by argument-dependent lookup.
Definition: ExprCXX.h:3165
clang::CXXConstructorDecl
Represents a C++ constructor within a class.
Definition: DeclCXX.h:2436
clang::CXXBaseSpecifier::getType
QualType getType() const
Retrieves the type of the base class.
Definition: DeclCXX.h:245
clang::JSONNodeDumper::visitVerbatimLineComment
void visitVerbatimLineComment(const comments::VerbatimLineComment *C, const comments::FullComment *)
Definition: JSONNodeDumper.cpp:1719
clang::ObjCProtocolExpr::getProtocol
ObjCProtocolDecl * getProtocol() const
Definition: ExprObjC.h:521
clang::ObjCBoxedExpr
ObjCBoxedExpr - used for generalized expression boxing.
Definition: ExprObjC.h:128
clang::BlockDecl::isVariadic
bool isVariadic() const
Definition: Decl.h:4358
clang::CaseStmt::caseStmtIsGNURange
bool caseStmtIsGNURange() const
True if this case statement is of the form case LHS ...
Definition: Stmt.h:1672
clang::CXXBoolLiteralExpr
A boolean literal, per ([C++ lex.bool] Boolean literals).
Definition: ExprCXX.h:721
clang::ObjCProtocolDecl::protocols
protocol_range protocols() const
Definition: DeclObjC.h:2126
clang::comments::ParamCommandComment::Out
@ Out
Definition: Comment.h:722
Specifiers.h
clang::VarDecl::getTLSKind
TLSKind getTLSKind() const
Definition: Decl.cpp:2093
clang::JSONNodeDumper::VisitObjCSelectorExpr
void VisitObjCSelectorExpr(const ObjCSelectorExpr *OSE)
Definition: JSONNodeDumper.cpp:1178
clang::JSONNodeDumper::VisitSubstTemplateTypeParmPackType
void VisitSubstTemplateTypeParmPackType(const SubstTemplateTypeParmPackType *T)
Definition: JSONNodeDumper.cpp:700
clang::NonTypeTemplateParmDecl::getDefaultArgStorage
const DefArgStorage & getDefaultArgStorage() const
Definition: DeclTemplate.h:1485
clang::AutoTypeKeyword::GNUAutoType
@ GNUAutoType
__auto_type (GNU extension)
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:93
clang::JSONNodeDumper::visitParamCommandComment
void visitParamCommandComment(const comments::ParamCommandComment *C, const comments::FullComment *FC)
Definition: JSONNodeDumper.cpp:1669
clang::comments::InlineCommandComment::RenderEmphasized
@ RenderEmphasized
Definition: Comment.h:310
clang::UsingType::getFoundDecl
UsingShadowDecl * getFoundDecl() const
Definition: Type.h:4512
clang::TypeSourceInfo::getType
QualType getType() const
Return the type wrapped by this type source info.
Definition: Type.h:6604
clang::TemplateTemplateParmDecl::hasDefaultArgument
bool hasDefaultArgument() const
Determine whether this template parameter has a default argument.
Definition: DeclTemplate.h:1745
clang::ObjCIvarDecl::None
@ None
Definition: DeclObjC.h:1926
clang::TemplateTypeParmDecl::defaultArgumentWasInherited
bool defaultArgumentWasInherited() const
Determines whether the default argument was inherited from a previous declaration of this template.
Definition: DeclTemplate.h:1292
clang::TemplateTypeParmDecl::getIndex
unsigned getIndex() const
Retrieve the index of the template parameter.
Definition: DeclTemplate.cpp:695
clang::TemplateTypeParmType::getDecl
TemplateTypeParmDecl * getDecl() const
Definition: Type.h:5047
clang::VectorType::SveFixedLengthPredicateVector
@ SveFixedLengthPredicateVector
is AArch64 SVE fixed-length predicate vector
Definition: Type.h:3383
clang::Type::getTypeClassName
const char * getTypeClassName() const
Definition: Type.cpp:2937
clang::SwitchStmt
SwitchStmt - This represents a 'switch' stmt.
Definition: Stmt.h:2186
clang::GenericSelectionExpr::ConstAssociation
AssociationTy< true > ConstAssociation
Definition: Expr.h:5791
clang::FunctionType::isVolatile
bool isVolatile() const
Definition: Type.h:3959
clang::JSONNodeDumper::VisitObjCProtocolDecl
void VisitObjCProtocolDecl(const ObjCProtocolDecl *D)
Definition: JSONNodeDumper.cpp:1045
clang::LinkageSpecDecl
Represents a linkage specification.
Definition: DeclCXX.h:2832
clang::JSONNodeDumper::VisitObjCBoxedExpr
void VisitObjCBoxedExpr(const ObjCBoxedExpr *OBE)
Definition: JSONNodeDumper.cpp:1168
clang::SourceRange
A trivial tuple used to represent a source range.
Definition: SourceLocation.h:210
clang::IfStmt::hasVarStorage
bool hasVarStorage() const
True if this IfStmt has storage for a variable declaration.
Definition: Stmt.h:2014
string
string(SUBSTRING ${CMAKE_CURRENT_BINARY_DIR} 0 ${PATH_LIB_START} PATH_HEAD) string(SUBSTRING $
Definition: CMakeLists.txt:22
clang::JSONNodeDumper::VisitSubstTemplateTypeParmType
void VisitSubstTemplateTypeParmType(const SubstTemplateTypeParmType *STTPT)
Definition: JSONNodeDumper.cpp:693
clang::WhileStmt
WhileStmt - This represents a 'while' stmt.
Definition: Stmt.h:2377
clang::JSONNodeDumper::VisitUsingDecl
void VisitUsingDecl(const UsingDecl *UD)
Definition: JSONNodeDumper.cpp:814
Ret
static bool Ret(InterpState &S, CodePtr &PC, APValue &Result)
Definition: Interp.cpp:34
clang::PresumedLoc::getLine
unsigned getLine() const
Return the presumed line number of this location.
Definition: SourceLocation.h:337
clang::JSONNodeDumper::VisitTemplateTypeParmType
void VisitTemplateTypeParmType(const TemplateTypeParmType *TTPT)
Definition: JSONNodeDumper.cpp:685
clang::TemplateTypeParmDecl::getDefaultArgument
QualType getDefaultArgument() const
Retrieve the default argument, if any.
Definition: DeclTemplate.h:1278
clang::ObjCPropertyDecl::getGetterMethodDecl
ObjCMethodDecl * getGetterMethodDecl() const
Definition: DeclObjC.h:897
clang::JSONNodeDumper::VisitFloatingLiteral
void VisitFloatingLiteral(const FloatingLiteral *FL)
Definition: JSONNodeDumper.cpp:1507
clang::JSONNodeDumper::VisitObjCMessageExpr
void VisitObjCMessageExpr(const ObjCMessageExpr *OME)
Definition: JSONNodeDumper.cpp:1138
clang::NonTypeTemplateParmDecl::getIndex
unsigned getIndex() const
Get the index of the template parameter within its parameter list.
Definition: DeclTemplate.h:1196
clang::NamespaceAliasDecl
Represents a C++ namespace alias.
Definition: DeclCXX.h:3021
clang::ObjCPropertyAttribute::kind_direct
@ kind_direct
Definition: DeclObjCCommon.h:41
clang::ObjCImplementationDecl
ObjCImplementationDecl - Represents a class definition - this is where method definitions are specifi...
Definition: DeclObjC.h:2566
clang::ConstantArrayType
Represents the canonical version of C arrays with a specified constant size.
Definition: Type.h:3058
clang::FunctionDecl::isConstexpr
bool isConstexpr() const
Whether this is a (C++11) constexpr function or constexpr constructor.
Definition: Decl.h:2354
clang::ObjCMessageExpr::getSelector
Selector getSelector() const
Definition: ExprObjC.cpp:293
clang::ObjCTypeParamVariance::Invariant
@ Invariant
The parameter is invariant: must match exactly.
clang::FloatingLiteral::getValue
llvm::APFloat getValue() const
Definition: Expr.h:1662
clang::JSONNodeDumper::VisitObjCPropertyRefExpr
void VisitObjCPropertyRefExpr(const ObjCPropertyRefExpr *OPRE)
Definition: JSONNodeDumper.cpp:1190
clang::FunctionDecl::isDeleted
bool isDeleted() const
Whether this function has been deleted.
Definition: Decl.h:2409
clang::UsingDecl::getQualifier
NestedNameSpecifier * getQualifier() const
Retrieve the nested-name-specifier that qualifies the name.
Definition: DeclCXX.h:3451
createCopyConstructorDefinitionData
static llvm::json::Object createCopyConstructorDefinitionData(const CXXRecordDecl *RD)
Definition: JSONNodeDumper.cpp:390
clang::ObjCIvarDecl::Protected
@ Protected
Definition: DeclObjC.h:1926
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:5415
clang::UsingDirectiveDecl
Represents C++ using-directive.
Definition: DeclCXX.h:2917
clang::JSONNodeDumper::VisitCXXNewExpr
void VisitCXXNewExpr(const CXXNewExpr *NE)
Definition: JSONNodeDumper.cpp:1285
clang::ObjCPropertyAttribute::kind_class
@ kind_class
Definition: DeclObjCCommon.h:40
clang::JSONNodeDumper::VisitTypedefType
void VisitTypedefType(const TypedefType *TT)
Definition: JSONNodeDumper.cpp:531
clang::ConstantArrayType::getSize
const llvm::APInt & getSize() const
Definition: Type.h:3081
clang::JSONNodeDumper::VisitInjectedClassNameType
void VisitInjectedClassNameType(const InjectedClassNameType *ICNT)
Definition: JSONNodeDumper.cpp:730
clang::ObjCSubscriptRefExpr::getAtIndexMethodDecl
ObjCMethodDecl * getAtIndexMethodDecl() const
Definition: ExprObjC.h:886
clang::if
if(T->getSizeExpr()) TRY_TO(TraverseStmt(T -> getSizeExpr()))
Definition: RecursiveASTVisitor.h:1081
clang::SourceLocation
Encodes a location in the source.
Definition: SourceLocation.h:86
clang::JSONNodeDumper::VisitDependentSizedExtVectorType
void VisitDependentSizedExtVectorType(const DependentSizedExtVectorType *VT)
Definition: JSONNodeDumper.cpp:632
clang::JSONNodeDumper::VisitObjCIvarDecl
void VisitObjCIvarDecl(const ObjCIvarDecl *D)
Definition: JSONNodeDumper.cpp:991
clang::CXXNewExpr::CallInit
@ CallInit
New-expression has a C++98 paren-delimited initializer.
Definition: ExprCXX.h:2203
clang::TemplateTemplateParmDecl::getIndex
unsigned getIndex() const
Get the index of the template parameter within its parameter list.
Definition: DeclTemplate.h:1196
clang::NamedDecl
This represents a decl that may have a name.
Definition: Decl.h:247
clang::CharacterLiteral::getValue
unsigned getValue() const
Definition: Expr.h:1627
clang::SourceRange::getBegin
SourceLocation getBegin() const
Definition: SourceLocation.h:219
clang::ExprWithCleanups::getNumObjects
unsigned getNumObjects() const
Definition: ExprCXX.h:3399
clang::NOUR_Discarded
@ NOUR_Discarded
This name appears as a potential result of a discarded value expression.
Definition: Specifiers.h:171
clang::UsingType
Definition: Type.h:4502
clang::JSONNodeDumper::VisitDeclRefExpr
void VisitDeclRefExpr(const DeclRefExpr *DRE)
Definition: JSONNodeDumper.cpp:1228
clang::JSONNodeDumper::VisitIntegralTemplateArgument
void VisitIntegralTemplateArgument(const TemplateArgument &TA)
Definition: JSONNodeDumper.cpp:1573
clang::ConstantExpr::getAPValueResult
APValue getAPValueResult() const
Definition: Expr.cpp:464
clang::WhileStmt::hasVarStorage
bool hasVarStorage() const
True if this WhileStmt has storage for a condition variable.
Definition: Stmt.h:2428
clang::CXXDeleteExpr::isArrayForm
bool isArrayForm() const
Definition: ExprCXX.h:2448
clang::JSONNodeDumper::VisitCXXDependentScopeMemberExpr
void VisitCXXDependentScopeMemberExpr(const CXXDependentScopeMemberExpr *ME)
Definition: JSONNodeDumper.cpp:1469
clang::CXXConstructExpr::requiresZeroInitialization
bool requiresZeroInitialization() const
Whether this construction first requires zero-initialization before the initializer is called.
Definition: ExprCXX.h:1578
clang::VarDecl::TLS_Static
@ TLS_Static
TLS with a known-constant initializer.
Definition: Decl.h:926
clang::QualType
A (possibly-)qualified type.
Definition: Type.h:737
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:3919
clang::NonTypeTemplateParmDecl
NonTypeTemplateParmDecl - Declares a non-type template parameter, e.g., "Size" in.
Definition: DeclTemplate.h:1410
clang::Qualifiers::getAsString
std::string getAsString() const
Definition: TypePrinter.cpp:2166
clang::EST_None
@ EST_None
no exception specification
Definition: ExceptionSpecificationType.h:21
AttributeLangSupport::C
@ C
Definition: SemaDeclAttr.cpp:56
clang::NestedNameSpecifier
Represents a C++ nested name specifier, such as "\::std::vector<int>::".
Definition: NestedNameSpecifier.h:50
clang::TemplateTemplateParmDecl::getDefaultArgStorage
const DefArgStorage & getDefaultArgStorage() const
Definition: DeclTemplate.h:1741
clang::ObjCIvarDecl::getAccessControl
AccessControl getAccessControl() const
Definition: DeclObjC.h:1970
clang::CXXTypeidExpr
A C++ typeid expression (C++ [expr.typeid]), which gets the type_info that corresponds to the supplie...
Definition: ExprCXX.h:846
clang::FieldDecl
Represents a member of a struct/union/class.
Definition: Decl.h:2930
clang::VectorType::NeonVector
@ NeonVector
is ARM Neon vector
Definition: Type.h:3374
clang::FunctionProtoType::ExtProtoInfo::RefQualifier
RefQualifierKind RefQualifier
Definition: Type.h:4104
clang::ObjCTypeParamDecl::getVariance
ObjCTypeParamVariance getVariance() const
Determine the variance of this type parameter.
Definition: DeclObjC.h:625
clang::RequiresExpr
C++2a [expr.prim.req]: A requires-expression provides a concise way to express requirements on templa...
Definition: ExprConcepts.h:471
clang::EST_Dynamic
@ EST_Dynamic
throw(T1, T2)
Definition: ExceptionSpecificationType.h:23
clang::JSONNodeDumper::VisitUnaryExprOrTypeTraitExpr
void VisitUnaryExprOrTypeTraitExpr(const UnaryExprOrTypeTraitExpr *TTE)
Definition: JSONNodeDumper.cpp:1331
clang::JSONNodeDumper::VisitNamedDecl
void VisitNamedDecl(const NamedDecl *ND)
Definition: JSONNodeDumper.cpp:764
clang::DeclRefExpr::isNonOdrUse
NonOdrUseReason isNonOdrUse() const
Is this expression a non-odr-use reference, and if so, why?
Definition: Expr.h:1428
clang::ObjCCategoryDecl::getClassInterface
ObjCInterfaceDecl * getClassInterface()
Definition: DeclObjC.h:2339
clang::VK_XValue
@ VK_XValue
An x-value expression is a reference to an object with independent storage but which can be "moved",...
Definition: Specifiers.h:132
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:457
clang::JSONNodeDumper::VisitNamespaceDecl
void VisitNamespaceDecl(const NamespaceDecl *ND)
Definition: JSONNodeDumper.cpp:794
clang::JSONNodeDumper::VisitTypeTemplateArgument
void VisitTypeTemplateArgument(const TemplateArgument &TA)
Definition: JSONNodeDumper.cpp:1563
clang::BinaryOperator::getOpcodeStr
StringRef getOpcodeStr() const
Definition: Expr.h:3877
clang::JSONNodeDumper::VisitHLSLBufferDecl
void VisitHLSLBufferDecl(const HLSLBufferDecl *D)
Definition: JSONNodeDumper.cpp:919
clang::JSONNodeDumper::VisitCXXUnresolvedConstructExpr
void VisitCXXUnresolvedConstructExpr(const CXXUnresolvedConstructExpr *UCE)
Definition: JSONNodeDumper.cpp:1383
clang::FunctionProtoType::ExtProtoInfo::Variadic
bool Variadic
Definition: Type.h:4101
clang::UsingShadowDecl
Represents a shadow declaration implicitly introduced into a scope by a (resolved) using-declaration ...
Definition: DeclCXX.h:3222
clang::CXXNewExpr
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)".
Definition: ExprCXX.h:2146
clang::TemplateSpecializationType
Represents a type template specialization; the template must be a class template, a type alias templa...
Definition: Type.h:5354
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:2004
clang::IfStmt
IfStmt - This represents an if/then/else.
Definition: Stmt.h:1940
clang::SourceRange::isValid
bool isValid() const
Definition: SourceLocation.h:225
clang::ObjCTypeParamVariance::Covariant
@ Covariant
The parameter is covariant, e.g., X<T> is a subtype of X when the type parameter is covariant and T i...
clang::IfStmt::hasElseStorage
bool hasElseStorage() const
True if this IfStmt has storage for an else statement.
Definition: Stmt.h:2017
clang::JSONNodeDumper::VisitFriendDecl
void VisitFriendDecl(const FriendDecl *FD)
Definition: JSONNodeDumper.cpp:986
clang::JSONNodeDumper::VisitAccessSpecDecl
void VisitAccessSpecDecl(const AccessSpecDecl *ASD)
Definition: JSONNodeDumper.cpp:982
clang::FunctionType::getExtInfo
ExtInfo getExtInfo() const
Definition: Type.h:3952
clang::GotoStmt
GotoStmt - This represents a direct goto.
Definition: Stmt.h:2641
createMoveConstructorDefinitionData
static llvm::json::Object createMoveConstructorDefinitionData(const CXXRecordDecl *RD)
Definition: JSONNodeDumper.cpp:408
clang::InitListExpr
Describes an C or C++ initializer list.
Definition: Expr.h:4796
clang::ObjCPropertyImplDecl
ObjCPropertyImplDecl - Represents implementation declaration of a property in a class or category imp...
Definition: DeclObjC.h:2771
llvm::Optional< unsigned >
clang::JSONNodeDumper::VisitExpressionTemplateArgument
void VisitExpressionTemplateArgument(const TemplateArgument &TA)
Definition: JSONNodeDumper.cpp:1585
clang::PresumedLoc::getIncludeLoc
SourceLocation getIncludeLoc() const
Return the presumed include location of this location.
Definition: SourceLocation.h:353
clang::RQ_RValue
@ RQ_RValue
An rvalue ref-qualifier was provided (&&).
Definition: Type.h:1524
clang::JSONNodeDumper::visitTextComment
void visitTextComment(const comments::TextComment *C, const comments::FullComment *)
Definition: JSONNodeDumper.cpp:1602
clang::UnaryOperator
UnaryOperator - This represents the unary-expression's (except sizeof and alignof),...
Definition: Expr.h:2172
clang::MemberPointerType::isMemberFunctionPointer
bool isMemberFunctionPointer() const
Returns true if the member type (i.e.
Definition: Type.h:2980
clang::TagType
Definition: Type.h:4792
SourceManager.h
clang::IfStmt::hasInitStorage
bool hasInitStorage() const
True if this IfStmt has the storage for an init statement.
Definition: Stmt.h:2011
clang::NonTypeTemplateParmDecl::hasDefaultArgument
bool hasDefaultArgument() const
Determine whether this template parameter has a default argument.
Definition: DeclTemplate.h:1489
clang::MaterializeTemporaryExpr::getStorageDuration
StorageDuration getStorageDuration() const
Retrieve the storage duration for the materialized temporary.
Definition: ExprCXX.h:4538
clang::HLSLBufferDecl::isCBuffer
bool isCBuffer() const
Definition: Decl.h:4757
clang::SourceManager::getPresumedLoc
PresumedLoc getPresumedLoc(SourceLocation Loc, bool UseLineDirectives=true) const
Returns the "presumed" location of a SourceLocation specifies.
Definition: SourceManager.cpp:1521
clang::EST_Unparsed
@ EST_Unparsed
not parsed yet
Definition: ExceptionSpecificationType.h:32
clang::APValue::None
@ None
There is no such object (it's outside its lifetime).
Definition: APValue.h:129
clang::ObjCPropertyRefExpr::isSuperReceiver
bool isSuperReceiver() const
Definition: ExprObjC.h:772
clang::VectorType::NeonPolyVector
@ NeonPolyVector
is ARM Neon polynomial vector
Definition: Type.h:3377
clang::BinaryOperator::getOpcode
Opcode getOpcode() const
Definition: Expr.h:3856
clang::MaterializeTemporaryExpr::isBoundToLvalueReference
bool isBoundToLvalueReference() const
Determine whether this materialized temporary is bound to an lvalue reference; otherwise,...
Definition: ExprCXX.h:4582
clang::ObjCPropertyDecl::getPropertyImplementation
PropertyControl getPropertyImplementation() const
Definition: DeclObjC.h:908
clang::ObjCInterfaceType::getDecl
ObjCInterfaceDecl * getDecl() const
Get the declaration of this interface.
Definition: Type.cpp:823
clang::FunctionDecl::isInlineSpecified
bool isInlineSpecified() const
Determine whether the "inline" keyword was specified for this function.
Definition: Decl.h:2679
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:451
clang::JSONNodeDumper::VisitSizeOfPackExpr
void VisitSizeOfPackExpr(const SizeOfPackExpr *SOPE)
Definition: JSONNodeDumper.cpp:1338
clang::concepts::Requirement::isSatisfied
bool isSatisfied() const
Definition: ExprConcepts.h:174
clang::JSONNodeDumper::VisitMemberPointerType
void VisitMemberPointerType(const MemberPointerType *MPT)
Definition: JSONNodeDumper.cpp:759
clang::comments::HTMLEndTagComment
A closing HTML tag.
Definition: Comment.h:499
clang::ObjCIvarDecl::Public
@ Public
Definition: DeclObjC.h:1926
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:3117
clang::JSONNodeDumper::VisitDeclarationTemplateArgument
void VisitDeclarationTemplateArgument(const TemplateArgument &TA)
Definition: JSONNodeDumper.cpp:1566
clang::FunctionType
FunctionType - C99 6.7.5.3 - Function Declarators.
Definition: Type.h:3675
clang::SD_Automatic
@ SD_Automatic
Automatic storage duration (most local variables).
Definition: Specifiers.h:313
clang::JSONNodeDumper::VisitWhileStmt
void VisitWhileStmt(const WhileStmt *WS)
Definition: JSONNodeDumper.cpp:1549
clang::comments::CommandInfo
Information about a single command.
Definition: CommentCommandTraits.h:32
clang::ObjCPropertyDecl::Optional
@ Optional
Definition: DeclObjC.h:737
clang::CXXBindTemporaryExpr::getTemporary
CXXTemporary * getTemporary()
Definition: ExprCXX.h:1437
clang::JSONNodeDumper::VisitCXXConstructExpr
void VisitCXXConstructExpr(const CXXConstructExpr *CE)
Definition: JSONNodeDumper.cpp:1390
clang::ObjCMessageExpr::SuperClass
@ SuperClass
The receiver is a superclass.
Definition: ExprObjC.h:1094
clang::ObjCPropertyRefExpr::isImplicitProperty
bool isImplicitProperty() const
Definition: ExprObjC.h:700
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:238
clang::SourceManager::isMacroArgExpansion
bool isMacroArgExpansion(SourceLocation Loc, SourceLocation *StartLoc=nullptr) const
Tests whether the given source location represents a macro argument's expansion into the function-lik...
Definition: SourceManager.cpp:1062
clang::concepts::Requirement::containsUnexpandedParameterPack
bool containsUnexpandedParameterPack() const
Definition: ExprConcepts.h:192
clang::JSONNodeDumper::VisitUnaryOperator
void VisitUnaryOperator(const UnaryOperator *UO)
Definition: JSONNodeDumper.cpp:1251
clang::comments::InlineCommandComment::RenderMonospaced
@ RenderMonospaced
Definition: Comment.h:309
clang::SD_Dynamic
@ SD_Dynamic
Dynamic storage duration.
Definition: Specifiers.h:316
clang::ArrayType::Normal
@ Normal
Definition: Type.h:3019
clang::SubstTemplateTypeParmType::getIndex
unsigned getIndex() const
Returns the index of the replaced parameter in the associated declaration.
Definition: Type.h:5112
clang::ObjCPropertyAttribute::kind_strong
@ kind_strong
Definition: DeclObjCCommon.h:34
clang::ObjCImplDecl::getClassInterface
const ObjCInterfaceDecl * getClassInterface() const
Definition: DeclObjC.h:2454
clang::JSONNodeDumper::VisitTemplateExpansionTemplateArgument
void VisitTemplateExpansionTemplateArgument(const TemplateArgument &TA)
Definition: JSONNodeDumper.cpp:1580
clang::RequiresExpr::isSatisfied
bool isSatisfied() const
Whether or not the requires clause is satisfied.
Definition: ExprConcepts.h:520
clang::ArrayType::Star
@ Star
Definition: Type.h:3019
clang::getTraitSpelling
const char * getTraitSpelling(ExpressionTrait T) LLVM_READONLY
Return the spelling of the type trait TT. Never null.
Definition: ExpressionTraits.cpp:33
clang::EnumDecl
Represents an enum.
Definition: Decl.h:3705
clang::Type
The base class of the type hierarchy.
Definition: Type.h:1565
clang::UsingShadowDecl::getTargetDecl
NamedDecl * getTargetDecl() const
Gets the underlying declaration which has been brought into the local scope.
Definition: DeclCXX.h:3286
clang::ObjCPropertyRefExpr::getExplicitProperty
ObjCPropertyDecl * getExplicitProperty() const
Definition: ExprObjC.h:703
clang::comments::CommandTraits::getCommandInfo
const CommandInfo * getCommandInfo(StringRef Name) const
Definition: CommentCommandTraits.h:145
clang::ObjCSubscriptRefExpr
ObjCSubscriptRefExpr - used for array and dictionary subscripting.
Definition: ExprObjC.h:841
clang::ObjCBoolLiteralExpr
ObjCBoolLiteralExpr - Objective-C Boolean Literal.
Definition: ExprObjC.h:88
clang::PredefinedExpr::getIdentKind
IdentKind getIdentKind() const
Definition: Expr.h:2016
clang::TemplateTypeParmDecl::hasDefaultArgument
bool hasDefaultArgument() const
Determine whether this template parameter has a default argument.
Definition: DeclTemplate.h:1275
clang::comments::InlineCommandComment
A command with word-like arguments that is considered inline content.
Definition: Comment.h:302
clang::TypedefType
Definition: Type.h:4535
clang::Type::containsErrors
bool containsErrors() const
Whether this type is an error type.
Definition: Type.h:2298
clang::FunctionDecl::isVirtualAsWritten
bool isVirtualAsWritten() const
Whether this function is marked as virtual explicitly.
Definition: Decl.h:2235
clang::LinkageSpecDecl::lang_c
@ lang_c
Definition: DeclCXX.h:2841
clang::NamespaceDecl::getOriginalNamespace
NamespaceDecl * getOriginalNamespace()
Get the original (first) namespace declaration.
Definition: DeclCXX.cpp:2912
clang::ObjCPropertyRefExpr
ObjCPropertyRefExpr - A dot-syntax expression to access an ObjC property.
Definition: ExprObjC.h:614
clang::EST_DependentNoexcept
@ EST_DependentNoexcept
noexcept(expression), value-dependent
Definition: ExceptionSpecificationType.h:27
clang::ObjCIvarRefExpr::getDecl
ObjCIvarDecl * getDecl()
Definition: ExprObjC.h:576
clang::EST_Unevaluated
@ EST_Unevaluated
not evaluated yet, for special member function
Definition: ExceptionSpecificationType.h:30
clang::FixedPointLiteral
Definition: Expr.h:1546
clang::comments::InlineCommandComment::RenderBold
@ RenderBold
Definition: Comment.h:308
clang::Decl::isThisDeclarationReferenced
bool isThisDeclarationReferenced() const
Whether this declaration was referenced.
Definition: DeclBase.h:604
clang::JSONNodeDumper::VisitUsingEnumDecl
void VisitUsingEnumDecl(const UsingEnumDecl *UED)
Definition: JSONNodeDumper.cpp:824
clang::EST_NoexceptTrue
@ EST_NoexceptTrue
noexcept(expression), evals to 'true'
Definition: ExceptionSpecificationType.h:29
clang::comments::VerbatimBlockLineComment
A line of text contained in a verbatim block.
Definition: Comment.h:846
clang::Decl::getLexicalDeclContext
DeclContext * getLexicalDeclContext()
getLexicalDeclContext - The declaration context where this Decl was lexically declared (LexicalDC).
Definition: DeclBase.h:883
clang::ObjCPropertyAttribute::kind_atomic
@ kind_atomic
Definition: DeclObjCCommon.h:32
clang::VarDecl::isInline
bool isInline() const
Whether this variable is (C++1z) inline.
Definition: Decl.h:1491
clang::VarDecl::isParameterPack
bool isParameterPack() const
Determine whether this variable is actually a function parameter pack or init-capture pack.
Definition: Decl.cpp:2579
clang::comments::ParamCommandComment
Doxygen \param command.
Definition: Comment.h:694
clang::JSONNodeDumper::VisitTemplateTypeParmDecl
void VisitTemplateTypeParmDecl(const TemplateTypeParmDecl *D)
Definition: JSONNodeDumper.cpp:924
clang::ObjCPropertyAttribute::kind_copy
@ kind_copy
Definition: DeclObjCCommon.h:29
clang::comments::Comment
Any part of the comment.
Definition: Comment.h:52
clang::JSONNodeDumper::VisitImplicitCastExpr
void VisitImplicitCastExpr(const ImplicitCastExpr *ICE)
Definition: JSONNodeDumper.cpp:1322
clang::IntegerLiteral
Definition: Expr.h:1503
clang::VarDecl::hasInit
bool hasInit() const
Definition: Decl.cpp:2324
clang::JSONNodeDumper::VisitSYCLUniqueStableNameExpr
void VisitSYCLUniqueStableNameExpr(const SYCLUniqueStableNameExpr *E)
Definition: JSONNodeDumper.cpp:1241
clang::NonTypeTemplateParmDecl::defaultArgumentWasInherited
bool defaultArgumentWasInherited() const
Determines whether the default argument was inherited from a previous declaration of this template.
Definition: DeclTemplate.h:1499
clang::ObjCAtCatchStmt
Represents Objective-C's @catch statement.
Definition: StmtObjC.h:77
clang::UnaryExprOrTypeTraitExpr
UnaryExprOrTypeTraitExpr - expression with either a type or (unevaluated) expression operand.
Definition: Expr.h:2558
clang::ElaboratedType
Represents a type that was referred to using an elaborated type keyword, e.g., struct S,...
Definition: Type.h:5628
clang::FloatingLiteral
Definition: Expr.h:1648
clang::RecordType
A helper class that allows the use of isa/cast/dyncast to detect TagType objects of structs/unions/cl...
Definition: Type.h:4816
clang::JSONNodeDumper::VisitUsingType
void VisitUsingType(const UsingType *TT)
Definition: JSONNodeDumper.cpp:537
clang::CompoundStmt
CompoundStmt - This represents a group of statements like { stmt stmt }.
Definition: Stmt.h:1410
clang::JSONNodeDumper::VisitPredefinedExpr
void VisitPredefinedExpr(const PredefinedExpr *PE)
Definition: JSONNodeDumper.cpp:1247
clang::ObjCSelectorExpr
ObjCSelectorExpr used for @selector in Objective-C.
Definition: ExprObjC.h:454
clang::OverloadExpr::getName
DeclarationName getName() const
Gets the name looked up.
Definition: ExprCXX.h:3013
clang::NamespaceDecl::isNested
bool isNested() const
Returns true if this is a nested namespace declaration.
Definition: Decl.h:624
clang::ObjCTypeParamVariance::Contravariant
@ Contravariant
The parameter is contravariant, e.g., X<T> is a subtype of X when the type parameter is covariant and...
clang::PackExpansionType
Represents a pack expansion of types.
Definition: Type.h:5830
clang::VectorType::SveFixedLengthDataVector
@ SveFixedLengthDataVector
is AArch64 SVE fixed-length data vector
Definition: Type.h:3380
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:3097
clang::VarDecl::getStorageClassSpecifierString
static const char * getStorageClassSpecifierString(StorageClass SC)
Return the string used to specify the storage class SC.
Definition: Decl.cpp:2046
clang::Decl::getAccess
AccessSpecifier getAccess() const
Definition: DeclBase.h:491
clang::CXXBoolLiteralExpr::getValue
bool getValue() const
Definition: ExprCXX.h:738
clang::SizeOfPackExpr
Represents an expression that computes the length of a parameter pack.
Definition: ExprCXX.h:4151
clang::JSONNodeDumper::VisitObjCAtCatchStmt
void VisitObjCAtCatchStmt(const ObjCAtCatchStmt *OACS)
Definition: JSONNodeDumper.cpp:1553
clang::JSONNodeDumper::VisitCompoundAssignOperator
void VisitCompoundAssignOperator(const CompoundAssignOperator *CAO)
Definition: JSONNodeDumper.cpp:1262
clang::comments::CommandTraits::getBuiltinCommandInfo
static const CommandInfo * getBuiltinCommandInfo(StringRef Name)
clang::CXXBindTemporaryExpr
Represents binding an expression to a temporary.
Definition: ExprCXX.h:1419
clang::OverloadExpr::decls
llvm::iterator_range< decls_iterator > decls() const
Definition: ExprCXX.h:3002
clang::CXXDependentScopeMemberExpr::getMember
DeclarationName getMember() const
Retrieve the name of the member that this expression refers to.
Definition: ExprCXX.h:3720
clang::BlockDecl
Represents a block literal declaration, which is like an unnamed FunctionDecl.
Definition: Decl.h:4283
clang::JSONNodeDumper::VisitAutoType
void VisitAutoType(const AutoType *AT)
Definition: JSONNodeDumper.cpp:705
clang::Decl::getKind
Kind getKind() const
Definition: DeclBase.h:435
clang::ObjCInterfaceDecl::getImplementation
ObjCImplementationDecl * getImplementation() const
Definition: DeclObjC.cpp:1598
createDefaultConstructorDefinitionData
static llvm::json::Object createDefaultConstructorDefinitionData(const CXXRecordDecl *RD)
Definition: JSONNodeDumper.cpp:375
clang::BinaryOperator
A builtin binary operation expression such as "x + y" or "x <= y".
Definition: Expr.h:3812
clang::OMPClause
This is a basic class for representing single OpenMP clause.
Definition: OpenMPClause.h:55
clang::TemplateTypeParmType::getIndex
unsigned getIndex() const
Definition: Type.h:5044
clang::JSONNodeDumper::VisitObjCTypeParamDecl
void VisitObjCTypeParamDecl(const ObjCTypeParamDecl *D)
Definition: JSONNodeDumper.cpp:1011
clang::ObjCInterfaceDecl::protocols
protocol_range protocols() const
Definition: DeclObjC.h:1343
hlsl::uint64_t
unsigned long uint64_t
Definition: hlsl_basic_types.h:25
clang::Type::isFromAST
bool isFromAST() const
Whether this type comes from an AST file.
Definition: Type.h:1987
clang::MacroQualifiedType::getMacroIdentifier
const IdentifierInfo * getMacroIdentifier() const
Definition: Type.h:4586
clang::MemberExpr::isArrow
bool isArrow() const
Definition: Expr.h:3353
clang::JSONNodeDumper::VisitPackExpansionType
void VisitPackExpansionType(const PackExpansionType *PET)
Definition: JSONNodeDumper.cpp:739
clang::PresumedLoc::getFilename
const char * getFilename() const
Return the presumed filename of this location.
Definition: SourceLocation.h:324
createCopyAssignmentDefinitionData
static llvm::json::Object createCopyAssignmentDefinitionData(const CXXRecordDecl *RD)
Definition: JSONNodeDumper.cpp:425
clang::FunctionType::ExtInfo::getNoReturn
bool getNoReturn() const
Definition: Type.h:3834
clang::CallExpr::usesADL
bool usesADL() const
Definition: Expr.h:2970
clang::SourceRange::getEnd
SourceLocation getEnd() const
Definition: SourceLocation.h:220
clang::CXXDependentScopeMemberExpr::template_arguments
ArrayRef< TemplateArgumentLoc > template_arguments() const
Definition: ExprCXX.h:3783
clang::JSONNodeDumper::VisitCharacterLiteral
void VisitCharacterLiteral(const CharacterLiteral *CL)
Definition: JSONNodeDumper.cpp:1497
clang::JSONNodeDumper::VisitObjCCompatibleAliasDecl
void VisitObjCCompatibleAliasDecl(const ObjCCompatibleAliasDecl *D)
Definition: JSONNodeDumper.cpp:1074
clang::VectorType
Represents a GCC generic vector type.
Definition: Type.h:3358
clang::ObjCPropertyImplDecl::Synthesize
@ Synthesize
Definition: DeclObjC.h:2774
clang::ObjCPropertyAttribute::kind_weak
@ kind_weak
Definition: DeclObjCCommon.h:33
clang::JSONNodeDumper::VisitObjCPropertyImplDecl
void VisitObjCPropertyImplDecl(const ObjCPropertyImplDecl *D)
Definition: JSONNodeDumper.cpp:1119
clang::MaterializeTemporaryExpr::getExtendingDecl
ValueDecl * getExtendingDecl()
Get the declaration which triggered the lifetime-extension of this temporary, if any.
Definition: ExprCXX.h:4563
clang::FPOptionsOverride
Represents difference between two FPOptions values.
Definition: LangOptions.h:803
clang::MaterializeTemporaryExpr
Represents a prvalue temporary that is written into memory so that a reference can bind to it.
Definition: ExprCXX.h:4513
clang::ReferenceType::isSpelledAsLValue
bool isSpelledAsLValue() const
Definition: Type.h:2893
clang::ObjCPropertyAttribute::kind_unsafe_unretained
@ kind_unsafe_unretained
Definition: DeclObjCCommon.h:35
clang::ArrayType
Represents an array type, per C99 6.7.5.2 - Array Declarators.
Definition: Type.h:3012
clang::ObjCPropertyDecl::getSetterMethodDecl
ObjCMethodDecl * getSetterMethodDecl() const
Definition: DeclObjC.h:900
clang::UnaryOperator::getOpcodeStr
static StringRef getOpcodeStr(Opcode Op)
getOpcodeStr - Turn an Opcode enum value into the punctuation char it corresponds to,...
Definition: Expr.cpp:1388
clang::DeclarationName::getAsString
std::string getAsString() const
Retrieve the human-readable string for this name.
Definition: DeclarationName.cpp:235
clang::GotoStmt::getLabel
LabelDecl * getLabel() const
Definition: Stmt.h:2654
clang::ObjCPropertyAttribute::kind_null_resettable
@ kind_null_resettable
Definition: DeclObjCCommon.h:39
clang::ExprWithCleanups::getObjects
ArrayRef< CleanupObject > getObjects() const
Definition: ExprCXX.h:3394
clang::Type::getAs
const T * getAs() const
Member-template getAs<specific type>'.
Definition: Type.h:7386
clang::CXXBaseSpecifier::getAccessSpecifier
AccessSpecifier getAccessSpecifier() const
Returns the access specifier for this base specifier.
Definition: DeclCXX.h:226
clang::FunctionProtoType::ExceptionSpecInfo::Exceptions
ArrayRef< QualType > Exceptions
Explicitly-specified list of exception types.
Definition: Type.h:4078
clang::comments::ParamCommandComment::In
@ In
Definition: Comment.h:721
clang::CXXRecordDecl::getNumBases
unsigned getNumBases() const
Retrieves the number of base classes of this class.
Definition: DeclCXX.h:591
clang::Decl::isInvalidDecl
bool isInvalidDecl() const
Definition: DeclBase.h:571
clang::ExprWithCleanups::CleanupObject
llvm::PointerUnion< BlockDecl *, CompoundLiteralExpr * > CleanupObject
The type of objects that are kept in the cleanup.
Definition: ExprCXX.h:3376
createMoveAssignmentDefinitionData
static llvm::json::Object createMoveAssignmentDefinitionData(const CXXRecordDecl *RD)
Definition: JSONNodeDumper.cpp:441
clang::AutoType::getKeyword
AutoTypeKeyword getKeyword() const
Definition: Type.h:5277
clang::TemplateArgument
Represents a template argument.
Definition: TemplateBase.h:61
clang::JSONNodeDumper::VisitObjCProtocolExpr
void VisitObjCProtocolExpr(const ObjCProtocolExpr *OPE)
Definition: JSONNodeDumper.cpp:1186
clang::ObjCCategoryDecl::getImplementation
ObjCCategoryImplDecl * getImplementation() const
Definition: DeclObjC.cpp:2132
clang::concepts::Requirement
A static requirement that can be used in a requires-expression to check properties of types and expre...
Definition: ExprConcepts.h:145
clang::EST_DynamicNone
@ EST_DynamicNone
throw()
Definition: ExceptionSpecificationType.h:22
clang::JSONNodeDumper::VisitIntegerLiteral
void VisitIntegerLiteral(const IntegerLiteral *IL)
Definition: JSONNodeDumper.cpp:1491
clang::VarDecl::isNRVOVariable
bool isNRVOVariable() const
Determine whether this local variable can be used with the named return value optimization (NRVO).
Definition: Decl.h:1452
clang::StmtVisitorBase< llvm::make_const_ptr, JSONNodeDumper, void, ParamTys... >::Visit
void Visit(PTR(Stmt) S, ParamTys... P)
Definition: StmtVisitor.h:43
clang::JSONNodeDumper::VisitCXXBindTemporaryExpr
void VisitCXXBindTemporaryExpr(const CXXBindTemporaryExpr *BTE)
Definition: JSONNodeDumper.cpp:1435
clang::Attr::getKind
attr::Kind getKind() const
Definition: Attr.h:80
clang::JSONNodeDumper::VisitObjCInterfaceDecl
void VisitObjCInterfaceDecl(const ObjCInterfaceDecl *D)
Definition: JSONNodeDumper.cpp:1055
clang::CXXRecordDecl::needsOverloadResolutionForMoveConstructor
bool needsOverloadResolutionForMoveConstructor() const
Determine whether we need to eagerly declare a defaulted move constructor for this class.
Definition: DeclCXX.h:884
clang::QualType::getSplitDesugaredType
SplitQualType getSplitDesugaredType() const
Definition: Type.h:1056
clang::ObjCMessageExpr::getReceiverKind
ReceiverKind getReceiverKind() const
Determine the kind of receiver that this message is being sent to.
Definition: ExprObjC.h:1224
clang::UsingType::desugar
QualType desugar() const
Definition: Type.h:4518
clang::MacroQualifiedType
Sugar type that represents a type that was qualified by a qualifier written as a macro invocation.
Definition: Type.h:4571
clang::ObjCPropertyRefExpr::isMessagingSetter
bool isMessagingSetter() const
True if the property reference will result in a message to the setter.
Definition: ExprObjC.h:740
clang::comments::CommandInfo::Name
const char * Name
Definition: CommentCommandTraits.h:37
clang::comments::FullComment
A full comment attached to a declaration, contains block content.
Definition: Comment.h:1077
clang::TypedefNameDecl::getUnderlyingType
QualType getUnderlyingType() const
Definition: Decl.h:3330
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:1504
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:3393
clang::ObjCIvarDecl::getSynthesize
bool getSynthesize() const
Definition: DeclObjC.h:1977
clang::CXXDestructorDecl
Represents a C++ destructor within a class.
Definition: DeclCXX.h:2703
clang::JSONNodeDumper::VisitIfStmt
void VisitIfStmt(const IfStmt *IS)
Definition: JSONNodeDumper.cpp:1522
clang::AutoType
Represents a C++11 auto or C++14 decltype(auto) type, possibly constrained by a type-constraint.
Definition: Type.h:5246
clang::CXXBaseSpecifier::isVirtual
bool isVirtual() const
Determines whether the base class is a virtual base class (or not).
Definition: DeclCXX.h:199
clang::DeclRefExpr::getDecl
ValueDecl * getDecl()
Definition: Expr.h:1304
clang::TemplateArgumentLoc
Location wrapper for a TemplateArgument.
Definition: TemplateBase.h:457
clang::Selector::print
void print(llvm::raw_ostream &OS) const
Prints the full selector name (e.g. "foo:bar:").
Definition: IdentifierTable.cpp:625
Type.h
clang::ObjCMessageExpr::Class
@ Class
The receiver is a class.
Definition: ExprObjC.h:1088
clang::FieldDecl::hasInClassInitializer
bool hasInClassInitializer() const
Determine whether this member has a C++11 default member initializer.
Definition: Decl.h:3070
clang::JSONNodeDumper::VisitNonTypeTemplateParmDecl
void VisitNonTypeTemplateParmDecl(const NonTypeTemplateParmDecl *D)
Definition: JSONNodeDumper.cpp:939
llvm::SmallString< 16 >
clang::FriendDecl
FriendDecl - Represents the declaration of a friend entity, which can be a function,...
Definition: DeclFriend.h:53
clang::TemplateTemplateParmDecl
TemplateTemplateParmDecl - Declares a template template parameter, e.g., "T" in.
Definition: DeclTemplate.h:1627
clang::JSONNodeDumper::VisitExprWithCleanups
void VisitExprWithCleanups(const ExprWithCleanups *EWC)
Definition: JSONNodeDumper.cpp:1415
clang::ImplicitCastExpr::isPartOfExplicitCast
bool isPartOfExplicitCast() const
Definition: Expr.h:3658
clang::JSONNodeDumper::VisitMaterializeTemporaryExpr
void VisitMaterializeTemporaryExpr(const MaterializeTemporaryExpr *MTE)
Definition: JSONNodeDumper.cpp:1443
clang::JSONNodeDumper::VisitElaboratedType
void VisitElaboratedType(const ElaboratedType *ET)
Definition: JSONNodeDumper.cpp:744
clang::VarDecl
Represents a variable declaration or definition.
Definition: Decl.h:906
clang::TemplateArgumentLoc::getArgument
const TemplateArgument & getArgument() const
Definition: TemplateBase.h:506
clang::ObjCMethodDecl::getReturnType
QualType getReturnType() const
Definition: DeclObjC.h:332
clang::CompoundAssignOperator::getComputationResultType
QualType getComputationResultType() const
Definition: Expr.h:4096
clang::CXXConstructExpr::CK_Delegating
@ CK_Delegating
Definition: ExprCXX.h:1475
clang::UnresolvedUsingType
Represents the dependent type named by a dependently-scoped typename using declaration,...
Definition: Type.h:4472
clang::QualType::getAsString
std::string getAsString() const
Definition: TypePrinter.cpp:2303
clang::JSONNodeDumper::VisitObjCEncodeExpr
void VisitObjCEncodeExpr(const ObjCEncodeExpr *OEE)
Definition: JSONNodeDumper.cpp:1134
clang::comments::BlockCommandComment
A command that has zero or more word-like arguments (number of word-like arguments depends on command...
Definition: Comment.h:588
Category
int Category
Definition: Format.cpp:2718
clang::TagDecl
Represents the declaration of a struct/union/class/enum.
Definition: Decl.h:3423
clang::CXXDeleteExpr::getOperatorDelete
FunctionDecl * getOperatorDelete() const
Definition: ExprCXX.h:2461
clang::ObjCIvarDecl::Private
@ Private
Definition: DeclObjC.h:1926
clang::StringLiteral
StringLiteral - This represents a string literal expression, e.g.
Definition: Expr.h:1776
clang::SD_FullExpression
@ SD_FullExpression
Full-expression storage duration (for temporaries).
Definition: Specifiers.h:312
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:161
clang::JSONNodeDumper::VisitTypeAliasDecl
void VisitTypeAliasDecl(const TypeAliasDecl *TAD)
Definition: JSONNodeDumper.cpp:789
clang::CXXConstructExpr::getConstructor
CXXConstructorDecl * getConstructor() const
Get the constructor that this expression will (ultimately) call.
Definition: ExprCXX.h:1539
clang::ExprWithCleanups
Represents an expression – generally a full-expression – that introduces cleanups to be run at the en...
Definition: ExprCXX.h:3366
clang::ObjCCategoryImplDecl
ObjCCategoryImplDecl - An object of this class encapsulates a category @implementation declaration.
Definition: DeclObjC.h:2513
clang::UsingType::typeMatchesDecl
bool typeMatchesDecl() const
Definition: Type.h:4521
clang::PresumedLoc::getColumn
unsigned getColumn() const
Return the presumed column number of this location.
Definition: SourceLocation.h:345
clang::NamedDecl::isModulePrivate
bool isModulePrivate() const
Whether this declaration was marked as being private to the module in which it was defined.
Definition: DeclBase.h:625
clang::RQ_None
@ RQ_None
No ref-qualifier was provided.
Definition: Type.h:1518
clang::Type::isVariablyModifiedType
bool isVariablyModifiedType() const
Whether this type is a variably-modified type (C99 6.7.5).
Definition: Type.h:2322
clang::UnaryOperator::canOverflow
bool canOverflow() const
Returns true if the unary operator can cause an overflow.
Definition: Expr.h:2232
clang::CXXRecordDecl::bases
base_class_range bases()
Definition: DeclCXX.h:597
clang::JSONNodeDumper::VisitObjCCategoryDecl
void VisitObjCCategoryDecl(const ObjCCategoryDecl *D)
Definition: JSONNodeDumper.cpp:1027
clang::MemberPointerType::isMemberDataPointer
bool isMemberDataPointer() const
Returns true if the member type (i.e.
Definition: Type.h:2986
clang::CXXTemporary
Represents a C++ temporary.
Definition: ExprCXX.h:1387
clang::SubstTemplateTypeParmType
Represents the result of substituting a type for a template type parameter.
Definition: Type.h:5081
clang::JSONNodeDumper::VisitCaseStmt
void VisitCaseStmt(const CaseStmt *CS)
Definition: JSONNodeDumper.cpp:1535
clang::ObjCPropertyAttribute::kind_readonly
@ kind_readonly
Definition: DeclObjCCommon.h:24
clang::EnumConstantDecl
An instance of this object exists for each enum constant that is defined.
Definition: Decl.h:3145
clang::DependentSizedExtVectorType::getAttributeLoc
SourceLocation getAttributeLoc() const
Definition: Type.h:3335
clang::JSONNodeDumper::visitVerbatimBlockComment
void visitVerbatimBlockComment(const comments::VerbatimBlockComment *C, const comments::FullComment *)
Definition: JSONNodeDumper.cpp:1707
clang::comments::ParamCommandComment::InOut
@ InOut
Definition: Comment.h:723
Base
clang::EnumDecl::isScopedUsingClassTag
bool isScopedUsingClassTag() const
Returns true if this is a C++11 scoped enumeration.
Definition: Decl.h:3913
clang::JSONNodeDumper::VisitArrayType
void VisitArrayType(const ArrayType *AT)
Definition: JSONNodeDumper.cpp:608
Label
std::string Label
Definition: UsingDeclarationsSorter.cpp:69
clang::ObjCEncodeExpr
ObjCEncodeExpr, used for @encode in Objective-C.
Definition: ExprObjC.h:409
clang::SubstTemplateTypeParmPackType
Represents the result of substituting a set of types for a template type parameter pack.
Definition: Type.h:5154
clang::ObjCPropertyDecl::getType
QualType getType() const
Definition: DeclObjC.h:800
clang::LabelStmt::isSideEntry
bool isSideEntry() const
Definition: Stmt.h:1874
clang::TagDecl::isCompleteDefinition
bool isCompleteDefinition() const
Return true if this decl has its body fully specified.
Definition: Decl.h:3528
clang::JSONNodeDumper::VisitRecordDecl
void VisitRecordDecl(const RecordDecl *RD)
Definition: JSONNodeDumper.cpp:898
clang::ElaboratedType::getQualifier
NestedNameSpecifier * getQualifier() const
Retrieve the qualification on this type.
Definition: Type.h:5666
clang::VectorType::GenericVector
@ GenericVector
not a target-specific vector type
Definition: Type.h:3362
clang::JSONNodeDumper::VisitNullPtrTemplateArgument
void VisitNullPtrTemplateArgument(const TemplateArgument &TA)
Definition: JSONNodeDumper.cpp:1570
clang::CXXConstructExpr::hadMultipleCandidates
bool hadMultipleCandidates() const
Whether the referred constructor was resolved from an overloaded set having size greater than 1.
Definition: ExprCXX.h:1550
clang::VarDecl::TLS_None
@ TLS_None
Not a TLS variable.
Definition: Decl.h:923
clang::VectorType::AltiVecPixel
@ AltiVecPixel
is AltiVec 'vector Pixel'
Definition: Type.h:3368
clang::NamespaceDecl::isOriginalNamespace
bool isOriginalNamespace() const
Return true if this declaration is an original (first) declaration of the namespace.
Definition: DeclCXX.cpp:2926
clang::concepts::Requirement::RK_Compound
@ RK_Compound
Definition: ExprConcepts.h:149
clang::ConstantExpr
ConstantExpr - An expression that occurs in a constant context and optionally the result of evaluatin...
Definition: Expr.h:1041
clang::TemplateTypeParmDecl
Declaration of a template type parameter.
Definition: DeclTemplate.h:1205
clang::concepts::Requirement::RK_Simple
@ RK_Simple
Definition: ExprConcepts.h:149
clang::ObjCMessageExpr
An expression that sends a message to the given Objective-C object or class.
Definition: ExprObjC.h:940
clang::JSONNodeDumper::VisitFunctionProtoType
void VisitFunctionProtoType(const FunctionProtoType *T)
Definition: JSONNodeDumper.cpp:552
clang::SourceManager::getDecomposedLoc
std::pair< FileID, unsigned > getDecomposedLoc(SourceLocation Loc) const
Decompose the specified location into a raw FileID + Offset pair.
Definition: SourceManager.h:1243
clang::Decl::isImplicit
bool isImplicit() const
isImplicit - Indicates whether the declaration was implicitly generated by the implementation.
Definition: DeclBase.h:576
clang::ObjCImplementationDecl::getSuperClass
const ObjCInterfaceDecl * getSuperClass() const
Definition: DeclObjC.h:2701
clang::MemberExpr::getMemberDecl
ValueDecl * getMemberDecl() const
Retrieve the member declaration to which this expression refers.
Definition: Expr.h:3252
clang::FieldDecl::isMutable
bool isMutable() const
Determines whether this field is mutable (C++ only).
Definition: Decl.h:3005
clang::QualType::split
SplitQualType split() const
Divides a QualType into its unqualified type and a set of local qualifiers.
Definition: Type.h:6643
clang::TagType::getDecl
TagDecl * getDecl() const
Definition: Type.cpp:3537
clang::VectorType::getVectorKind
VectorKind getVectorKind() const
Definition: Type.h:3405
clang::NodeStreamer::JOS
llvm::json::OStream JOS
Definition: JSONNodeDumper.h:39
clang::APIntStorage::getValue
llvm::APInt getValue() const
Definition: Expr.h:1487
clang::UsingDecl
Represents a C++ using-declaration.
Definition: DeclCXX.h:3414
clang::FunctionType::isRestrict
bool isRestrict() const
Definition: Type.h:3960
clang::JSONNodeDumper::VisitTemplateSpecializationType
void VisitTemplateSpecializationType(const TemplateSpecializationType *TST)
Definition: JSONNodeDumper.cpp:720
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:6627
clang::GenericSelectionExpr::isResultDependent
bool isResultDependent() const
Whether this generic selection is result-dependent.
Definition: Expr.h:5811
clang::ObjCCategoryDecl
ObjCCategoryDecl - Represents a category declaration.
Definition: DeclObjC.h:2294
clang::UnaryTransformType
A unary type transform, which is a type constructed from another.
Definition: Type.h:4733
clang::DeducedType::isDeduced
bool isDeduced() const
Definition: Type.h:5234
clang::TemplateTypeParmType
Definition: Type.h:5002
clang::PredefinedExpr::getIdentKindName
StringRef getIdentKindName() const
Definition: Expr.h:2036
clang::FixedPointLiteral::getValueAsString
std::string getValueAsString(unsigned Radix) const
Definition: Expr.cpp:1017
clang::comments::HTMLStartTagComment
An opening HTML tag with attributes.
Definition: Comment.h:411
clang::CharacterLiteral
Definition: Expr.h:1593
clang::ArrayType::getIndexTypeQualifiers
Qualifiers getIndexTypeQualifiers() const
Definition: Type.h:3039
clang::TemplateTypeParmDecl::wasDeclaredWithTypename
bool wasDeclaredWithTypename() const
Whether this template type parameter was declared with the 'typename' keyword.
Definition: DeclTemplate.h:1267
clang::VK_LValue
@ VK_LValue
An l-value expression is a reference to an object with independent storage.
Definition: Specifiers.h:127
clang::ArrayType::getSizeModifier
ArraySizeModifier getSizeModifier() const
Definition: Type.h:3035
clang::CompoundLiteralExpr
CompoundLiteralExpr - [C99 6.5.2.5].
Definition: Expr.h:3410
clang::AccessSpecifier
AccessSpecifier
A C++ access specifier (public, private, protected), plus the special value "none" which means differ...
Definition: Specifiers.h:111
clang::JSONNodeDumper::VisitCXXBoolLiteralExpr
void VisitCXXBoolLiteralExpr(const CXXBoolLiteralExpr *BLE)
Definition: JSONNodeDumper.cpp:1518
clang::Decl::getSourceRange
virtual SourceRange getSourceRange() const LLVM_READONLY
Source range that this declaration covers.
Definition: DeclBase.h:420
clang::UnaryExprOrTypeTraitExpr::isArgumentType
bool isArgumentType() const
Definition: Expr.h:2600
clang::PresumedLoc::isInvalid
bool isInvalid() const
Return true if this object is invalid or uninitialized.
Definition: SourceLocation.h:318
clang::UsingEnumDecl
Represents a C++ using-enum-declaration.
Definition: DeclCXX.h:3614
clang::VarDecl::ListInit
@ ListInit
Direct list-initialization (C++11)
Definition: Decl.h:917
clang::JSONNodeDumper::VisitFixedPointLiteral
void VisitFixedPointLiteral(const FixedPointLiteral *FPL)
Definition: JSONNodeDumper.cpp:1504
clang::HLSLBufferDecl
HLSLBufferDecl - Represent a cbuffer or tbuffer declaration.
Definition: Decl.h:4729
clang::TemplateTemplateParmDecl::defaultArgumentWasInherited
bool defaultArgumentWasInherited() const
Determines whether the default argument was inherited from a previous declaration of this template.
Definition: DeclTemplate.h:1758
clang::CXXRecordDecl
Represents a C++ struct/union/class.
Definition: DeclCXX.h:254
clang::LinkageSpecDecl::getLanguage
LanguageIDs getLanguage() const
Return the language specified by this linkage specification.
Definition: DeclCXX.h:2861
clang::FunctionType::ExtInfo::getHasRegParm
bool getHasRegParm() const
Definition: Type.h:3839
clang::declvisitor::Base< llvm::make_const_ptr, JSONNodeDumper, void >::Visit
void Visit(PTR(Decl) D)
Definition: DeclVisitor.h:37
clang::EST_Uninstantiated
@ EST_Uninstantiated
not instantiated yet
Definition: ExceptionSpecificationType.h:31
clang::RISCV::TA
@ TA
Definition: RISCVVIntrinsicUtils.h:98
clang::Attr::isInherited
bool isInherited() const
Definition: Attr.h:89
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:2304
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:2312
clang::VK_PRValue
@ VK_PRValue
A pr-value expression (in the C++11 taxonomy) produces a temporary value.
Definition: Specifiers.h:123
clang::JSONNodeDumper::VisitObjCInterfaceType
void VisitObjCInterfaceType(const ObjCInterfaceType *OIT)
Definition: JSONNodeDumper.cpp:735
clang::FunctionType::getNameForCallConv
static StringRef getNameForCallConv(CallingConv CC)
Definition: Type.cpp:3142
clang::VectorType::AltiVecVector
@ AltiVecVector
is AltiVec vector
Definition: Type.h:3365
clang::IfStmt::isNegatedConsteval
bool isNegatedConsteval() const
Definition: Stmt.h:2126
clang::CXXRecordDecl::needsOverloadResolutionForCopyConstructor
bool needsOverloadResolutionForCopyConstructor() const
Determine whether we need to eagerly declare a defaulted copy constructor for this class.
Definition: DeclCXX.h:794
clang::AttributeCommonInfo::getRange
SourceRange getRange() const
Definition: AttributeCommonInfo.h:133
clang::UnaryExprOrTypeTraitExpr::getArgumentType
QualType getArgumentType() const
Definition: Expr.h:2601
clang::FieldDecl::isBitField
bool isBitField() const
Determines whether this field is a bitfield.
Definition: Decl.h:3008
clang::EnumDecl::isScoped
bool isScoped() const
Returns true if this is a C++11 scoped enumeration.
Definition: Decl.h:3910
clang::ObjCEncodeExpr::getEncodedType
QualType getEncodedType() const
Definition: ExprObjC.h:428
clang::CXXTemporary::getDestructor
const CXXDestructorDecl * getDestructor() const
Definition: ExprCXX.h:1398
clang::NonTypeTemplateParmDecl::getDefaultArgument
Expr * getDefaultArgument() const
Retrieve the default argument, if any.
Definition: DeclTemplate.h:1492
clang::JSONNodeDumper::VisitVectorType
void VisitVectorType(const VectorType *VT)
Definition: JSONNodeDumper.cpp:638
clang::JSONNodeDumper::VisitBinaryOperator
void VisitBinaryOperator(const BinaryOperator *BO)
Definition: JSONNodeDumper.cpp:1258
clang::TypedefType::getDecl
TypedefNameDecl * getDecl() const
Definition: Type.h:4546
clang::ObjCPropertyAttribute::kind_noattr
@ kind_noattr
Definition: DeclObjCCommon.h:23
createDestructorDefinitionData
static llvm::json::Object createDestructorDefinitionData(const CXXRecordDecl *RD)
Definition: JSONNodeDumper.cpp:456
clang::FunctionType::ExtInfo::getCC
CallingConv getCC() const
Definition: Type.h:3848
clang::JSONNodeDumper::Visit
void Visit(const Attr *A)
Definition: JSONNodeDumper.cpp:22
clang::ValueDecl
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
Definition: Decl.h:701
clang::IfStmt::isConsteval
bool isConsteval() const
Definition: Stmt.h:2117
clang::TypedefType::desugar
QualType desugar() const
Definition: Type.cpp:3414
clang::VarDecl::getStorageClass
StorageClass getStorageClass() const
Returns the storage class as written in the source.
Definition: Decl.h:1115
clang::CXXRecordDecl::needsOverloadResolutionForDestructor
bool needsOverloadResolutionForDestructor() const
Determine whether we need to eagerly declare a destructor for this class.
Definition: DeclCXX.h:995
clang::JSONNodeDumper::VisitUsingDirectiveDecl
void VisitUsingDirectiveDecl(const UsingDirectiveDecl *UDD)
Definition: JSONNodeDumper.cpp:803
clang::JSONNodeDumper::VisitUnresolvedUsingType
void VisitUnresolvedUsingType(const UnresolvedUsingType *UUT)
Definition: JSONNodeDumper.cpp:667
clang::JSONNodeDumper::visitHTMLStartTagComment
void visitHTMLStartTagComment(const comments::HTMLStartTagComment *C, const comments::FullComment *)
Definition: JSONNodeDumper.cpp:1637
clang::FunctionProtoType
Represents a prototype with parameter type info, e.g.
Definition: Type.h:4016
clang::ObjCProtocolExpr
ObjCProtocolExpr used for protocol expression in Objective-C.
Definition: ExprObjC.h:504
clang::ObjCCategoryDecl::protocols
protocol_range protocols() const
Definition: DeclObjC.h:2370
clang::ObjCCompatibleAliasDecl::getClassInterface
const ObjCInterfaceDecl * getClassInterface() const
Definition: DeclObjC.h:2759
clang::ASTContext::getPrintingPolicy
const clang::PrintingPolicy & getPrintingPolicy() const
Definition: ASTContext.h:713
clang::LabelStmt::getName
const char * getName() const
Definition: Stmt.cpp:419
clang::NOUR_None
@ NOUR_None
This is an odr-use.
Definition: Specifiers.h:163
clang::JSONNodeDumper::VisitUsingShadowDecl
void VisitUsingShadowDecl(const UsingShadowDecl *USD)
Definition: JSONNodeDumper.cpp:828
clang::JSONNodeDumper::VisitMemberExpr
void VisitMemberExpr(const MemberExpr *ME)
Definition: JSONNodeDumper.cpp:1270
clang::CXXDeleteExpr
Represents a delete expression for memory deallocation and destructor calls, e.g.
Definition: ExprCXX.h:2422
clang::QualType::isNull
bool isNull() const
Return true if this QualType doesn't point to a type yet.
Definition: Type.h:802
clang::comments::TParamCommandComment
Doxygen \tparam command, describes a template parameter.
Definition: Comment.h:782
clang::ObjCPropertyDecl::None
@ None
Definition: DeclObjC.h:737
FIELD1
#define FIELD1(Flag)
Definition: JSONNodeDumper.cpp:372
Lexer.h
Value
Value
Definition: UninitializedValues.cpp:103
clang::Decl
Decl - This represents one declaration (or definition), e.g.
Definition: DeclBase.h:83
clang::JSONNodeDumper::VisitVarDecl
void VisitVarDecl(const VarDecl *VD)
Definition: JSONNodeDumper.cpp:832
clang::CXXTypeidExpr::isTypeOperand
bool isTypeOperand() const
Definition: ExprCXX.h:882
clang::FunctionDecl::isPure
bool isPure() const
Whether this virtual function is pure, i.e.
Definition: Decl.h:2244
clang::AddrLabelExpr
AddrLabelExpr - The GNU address of label extension, representing &&label.
Definition: Expr.h:4309
clang::ObjCPropertyDecl
Represents one property declaration in an Objective-C interface.
Definition: DeclObjC.h:732
clang::JSONNodeDumper::VisitUnresolvedLookupExpr
void VisitUnresolvedLookupExpr(const UnresolvedLookupExpr *ULE)
Definition: JSONNodeDumper.cpp:1342
clang::LinkageSpecDecl::lang_cxx
@ lang_cxx
Definition: DeclCXX.h:2841
clang::ObjCMethodDecl::isInstanceMethod
bool isInstanceMethod() const
Definition: DeclObjC.h:431
clang::JSONNodeDumper::visitInlineCommandComment
void visitInlineCommandComment(const comments::InlineCommandComment *C, const comments::FullComment *)
Definition: JSONNodeDumper.cpp:1607
clang::ConstantExpr::getResultAPValueKind
APValue::ValueKind getResultAPValueKind() const
Definition: Expr.h:1113
clang::JSONNodeDumper::VisitTemplateTemplateArgument
void VisitTemplateTemplateArgument(const TemplateArgument &TA)
Definition: JSONNodeDumper.cpp:1576
clang::ObjCCategoryImplDecl::getCategoryDecl
ObjCCategoryDecl * getCategoryDecl() const
Definition: DeclObjC.cpp:2176
clang::JSONNodeDumper::VisitCXXDeleteExpr
void VisitCXXDeleteExpr(const CXXDeleteExpr *DE)
Definition: JSONNodeDumper.cpp:1299
clang::SD_Static
@ SD_Static
Static storage duration.
Definition: Specifiers.h:315
clang::ObjCPropertyAttribute::kind_assign
@ kind_assign
Definition: DeclObjCCommon.h:26
clang::StmtVisitorBase< llvm::make_const_ptr, JSONNodeDumper, void, ParamTys... >::P
ParamTys P
Definition: StmtVisitor.h:171
clang::NonTypeTemplateParmDecl::getDepth
unsigned getDepth() const
Get the nesting depth of the template parameter.
Definition: DeclTemplate.h:1180
clang::EST_MSAny
@ EST_MSAny
Microsoft throw(...) extension.
Definition: ExceptionSpecificationType.h:24
clang::ObjCInterfaceDecl::getSuperClass
ObjCInterfaceDecl * getSuperClass() const
Definition: DeclObjC.cpp:352
clang::Type::isSignedIntegerType
bool isSignedIntegerType() const
Return true if this is an integer type that is signed, according to C99 6.2.5p4 [char,...
Definition: Type.cpp:2019
clang::ObjCBoxedExpr::getBoxingMethod
ObjCMethodDecl * getBoxingMethod() const
Definition: ExprObjC.h:147
clang::InjectedClassNameType
The injected class name of a C++ class template or class template partial specialization.
Definition: Type.h:5481
clang::CXXDependentScopeMemberExpr
Represents a C++ member access expression where the actual member referenced could not be resolved be...
Definition: ExprCXX.h:3574
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:5679
clang::templateargumentvisitor::Base< llvm::make_const_ref, JSONNodeDumper, void, ParamTys... >::Visit
void Visit(REF(TemplateArgument) TA, ParamTys... P)
Definition: TemplateArgumentVisitor.h:33
clang::ObjCPropertyImplDecl::getPropertyImplementation
Kind getPropertyImplementation() const
Definition: DeclObjC.h:2840
clang::CompoundAssignOperator
CompoundAssignOperator - For compound assignments (e.g.
Definition: Expr.h:4059
clang::CXXTypeidExpr::getTypeOperandSourceInfo
TypeSourceInfo * getTypeOperandSourceInfo() const
Retrieve source information for the type operand.
Definition: ExprCXX.h:889
clang::NOUR_Unevaluated
@ NOUR_Unevaluated
This name appears in an unevaluated operand.
Definition: Specifiers.h:165
clang::FunctionType::ExtInfo
A class which abstracts out some details necessary for making a call.
Definition: Type.h:3786
clang::AutoTypeKeyword::Auto
@ Auto
auto
clang::SplitQualType
A std::pair-like structure for storing a qualified type split into its local qualifiers and its local...
Definition: Type.h:670
clang::ArrayType::Static
@ Static
Definition: Type.h:3019
clang::Expr::isValueDependent
bool isValueDependent() const
Determines whether the value of this expression depends on.
Definition: Expr.h:168
clang::CXXUnresolvedConstructExpr
Describes an explicit type conversion that uses functional notion but could not be resolved because o...
Definition: ExprCXX.h:3452
clang::EST_NoThrow
@ EST_NoThrow
Microsoft __declspec(nothrow) extension.
Definition: ExceptionSpecificationType.h:25
clang::JSONNodeDumper::VisitBlockDecl
void VisitBlockDecl(const BlockDecl *D)
Definition: JSONNodeDumper.cpp:1129
clang::TypedefDecl
Represents the declaration of a typedef-name via the 'typedef' type specifier.
Definition: Decl.h:3377
clang::JSONNodeDumper::VisitObjCSubscriptRefExpr
void VisitObjCSubscriptRefExpr(const ObjCSubscriptRefExpr *OSRE)
Definition: JSONNodeDumper.cpp:1207
clang::VectorType::AltiVecBool
@ AltiVecBool
is AltiVec 'vector bool ...'
Definition: Type.h:3371
clang::JSONNodeDumper::VisitTypedefDecl
void VisitTypedefDecl(const TypedefDecl *TD)
Definition: JSONNodeDumper.cpp:784
clang::ObjCPropertyImplDecl::getPropertyDecl
ObjCPropertyDecl * getPropertyDecl() const
Definition: DeclObjC.h:2835
clang::JSONNodeDumper::VisitFunctionType
void VisitFunctionType(const FunctionType *T)
Definition: JSONNodeDumper.cpp:543
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:290
clang::TemplateTypeParmDecl::isParameterPack
bool isParameterPack() const
Returns whether this is a parameter pack.
Definition: DeclTemplate.cpp:699
clang::MemberPointerType
A pointer to member type per C++ 8.3.3 - Pointers to members.
Definition: Type.h:2960
clang::ObjCPropertyAttribute::Kind
Kind
Definition: DeclObjCCommon.h:22
clang::TemplateTypeParmDecl::getDefaultArgStorage
const DefArgStorage & getDefaultArgStorage() const
Definition: DeclTemplate.h:1271
clang::ObjCTypeParamDecl
Represents the declaration of an Objective-C type parameter.
Definition: DeclObjC.h:582
clang::SwitchStmt::hasInitStorage
bool hasInitStorage() const
True if this SwitchStmt has storage for an init statement.
Definition: Stmt.h:2245
clang::JSONNodeDumper::visitTParamCommandComment
void visitTParamCommandComment(const comments::TParamCommandComment *C, const comments::FullComment *FC)
Definition: JSONNodeDumper.cpp:1692
clang::FunctionProtoType::ExceptionSpecInfo::Type
ExceptionSpecificationType Type
The kind of exception specification this is.
Definition: Type.h:4075
clang::JSONNodeDumper::VisitAddrLabelExpr
void VisitAddrLabelExpr(const AddrLabelExpr *ALE)
Definition: JSONNodeDumper.cpp:1353
clang::JSONNodeDumper::VisitLabelStmt
void VisitLabelStmt(const LabelStmt *LS)
Definition: JSONNodeDumper.cpp:1539
clang::FunctionProtoType::ExtProtoInfo::ExceptionSpec
ExceptionSpecInfo ExceptionSpec
Definition: Type.h:4105
clang::CXXThisExpr
Represents the this expression in C++.
Definition: ExprCXX.h:1149
clang::UnresolvedUsingType::getDecl
UnresolvedUsingTypenameDecl * getDecl() const
Definition: Type.h:4483
clang::JSONNodeDumper::VisitConstantExpr
void VisitConstantExpr(const ConstantExpr *CE)
Definition: JSONNodeDumper.cpp:1368
clang::ObjCMethodDecl
ObjCMethodDecl - Represents an instance or class method declaration.
Definition: DeclObjC.h:139
clang::PredefinedExpr
[C99 6.4.2.2] - A predefined identifier such as func.
Definition: Expr.h:1968
clang::LinkageSpecDecl::hasBraces
bool hasBraces() const
Determines whether this linkage specification had braces in its syntactic form.
Definition: DeclCXX.h:2870
clang::PresumedLoc::isValid
bool isValid() const
Definition: SourceLocation.h:319
clang::JSONNodeDumper::VisitInitListExpr
void VisitInitListExpr(const InitListExpr *ILE)
Definition: JSONNodeDumper.cpp:1373
clang::comments::TextComment
Plain text.
Definition: Comment.h:266
clang::JSONNodeDumper::VisitGotoStmt
void VisitGotoStmt(const GotoStmt *GS)
Definition: JSONNodeDumper.cpp:1544
clang::interp::NE
bool NE(InterpState &S, CodePtr OpPC)
Definition: Interp.h:490
clang::ObjCSelectorExpr::getSelector
Selector getSelector() const
Definition: ExprObjC.h:468
clang::ObjCPropertyAttribute::kind_readwrite
@ kind_readwrite
Definition: DeclObjCCommon.h:27
clang::ObjCMessageExpr::Instance
@ Instance
The receiver is an object instance.
Definition: ExprObjC.h:1091
clang::CXXBaseSpecifier::isPackExpansion
bool isPackExpansion() const
Determine whether this base specifier is a pack expansion.
Definition: DeclCXX.h:206
clang::UnaryExprOrTypeTraitExpr::getKind
UnaryExprOrTypeTrait getKind() const
Definition: Expr.h:2590
clang::CXXConstructExpr::CK_NonVirtualBase
@ CK_NonVirtualBase
Definition: ExprCXX.h:1473
clang::VarDecl::CInit
@ CInit
C-style initialization with assignment.
Definition: Decl.h:911
clang::TemplateName::print
void print(raw_ostream &OS, const PrintingPolicy &Policy, Qualified Qual=Qualified::AsWritten) const
Print the template name.
Definition: TemplateName.cpp:285
clang::VarDecl::TLS_Dynamic
@ TLS_Dynamic
TLS with a dynamic initializer.
Definition: Decl.h:929
clang::SubstTemplateTypeParmPackType::getIndex
unsigned getIndex() const
Returns the index of the replaced parameter in the associated declaration.
Definition: Type.h:5180
clang::FunctionType::ExtInfo::getRegParm
unsigned getRegParm() const
Definition: Type.h:3841
clang::IdentifierInfo::getName
StringRef getName() const
Return the actual identifier string.
Definition: IdentifierTable.h:196
clang::IfStmt::isConstexpr
bool isConstexpr() const
Definition: Stmt.h:2130
clang::FunctionProtoType::ExtProtoInfo
Extra information about a function prototype.
Definition: Type.h:4099
clang::TemplateTemplateParmDecl::getDefaultArgument
const TemplateArgumentLoc & getDefaultArgument() const
Retrieve the default argument, if any.
Definition: DeclTemplate.h:1748
clang::TemplateTypeParmType::getDepth
unsigned getDepth() const
Definition: Type.h:5043
clang::JSONNodeDumper::VisitCastExpr
void VisitCastExpr(const CastExpr *CE)
Definition: JSONNodeDumper.cpp:1311
clang
Definition: CalledOnceCheck.h:17
clang::ObjCPropertyDecl::Required
@ Required
Definition: DeclObjC.h:737
clang::ObjCIvarRefExpr::isArrow
bool isArrow() const
Definition: ExprObjC.h:584
clang::ObjCPropertyRefExpr::getImplicitPropertyGetter
ObjCMethodDecl * getImplicitPropertyGetter() const
Definition: ExprObjC.h:708
clang::JSONNodeDumper::VisitRValueReferenceType
void VisitRValueReferenceType(const ReferenceType *RT)
Definition: JSONNodeDumper.cpp:604
clang::InitListExpr::getInitializedFieldInUnion
FieldDecl * getInitializedFieldInUnion()
If this initializes a union, specifies which field in the union to initialize.
Definition: Expr.h:4910
clang::UnaryOperator::isPostfix
static bool isPostfix(Opcode Op)
isPostfix - Return true if this is a postfix operation, like x++.
Definition: Expr.h:2248
clang::FunctionProtoType::ExtProtoInfo::HasTrailingReturn
bool HasTrailingReturn
Definition: Type.h:4102
clang::JSONNodeDumper::VisitGenericSelectionExpr
void VisitGenericSelectionExpr(const GenericSelectionExpr *GSE)
Definition: JSONNodeDumper.cpp:1378
clang::JSONNodeDumper::VisitSwitchStmt
void VisitSwitchStmt(const SwitchStmt *SS)
Definition: JSONNodeDumper.cpp:1531
clang::JSONNodeDumper::visitVerbatimBlockLineComment
void visitVerbatimBlockLineComment(const comments::VerbatimBlockLineComment *C, const comments::FullComment *)
Definition: JSONNodeDumper.cpp:1713
clang::NonTypeTemplateParmDecl::isParameterPack
bool isParameterPack() const
Whether this parameter is a non-type template parameter pack.
Definition: DeclTemplate.h:1524
clang::Stmt
Stmt - This represents one statement.
Definition: Stmt.h:71
clang::EST_BasicNoexcept
@ EST_BasicNoexcept
noexcept
Definition: ExceptionSpecificationType.h:26
clang::ObjCIvarDecl
ObjCIvarDecl - Represents an ObjC instance variable.
Definition: DeclObjC.h:1921
clang::JSONNodeDumper::VisitPackTemplateArgument
void VisitPackTemplateArgument(const TemplateArgument &TA)
Definition: JSONNodeDumper.cpp:1589
clang::ObjCPropertyRefExpr::isMessagingGetter
bool isMessagingGetter() const
True if the property reference will result in a message to the getter.
Definition: ExprObjC.h:733
clang::VarDecl::isConstexpr
bool isConstexpr() const
Whether this variable is (C++11) constexpr.
Definition: Decl.h:1509
clang::UnaryOperator::getOpcode
Opcode getOpcode() const
Definition: Expr.h:2214
clang::CXXConstructExpr::CK_VirtualBase
@ CK_VirtualBase
Definition: ExprCXX.h:1474
clang::JSONNodeDumper::VisitMacroQualifiedType
void VisitMacroQualifiedType(const MacroQualifiedType *MQT)
Definition: JSONNodeDumper.cpp:755
clang::ObjCPropertyAttribute::kind_nonatomic
@ kind_nonatomic
Definition: DeclObjCCommon.h:30
clang::comments::VerbatimBlockComment
A verbatim block command (e.
Definition: Comment.h:874
clang::GenericSelectionExpr
Represents a C11 generic selection.
Definition: Expr.h:5633
clang::EnumDecl::getIntegerType
QualType getIntegerType() const
Return the integer type this enum decl corresponds to.
Definition: Decl.h:3865
clang::ObjCProtocolDecl
Represents an Objective-C protocol declaration.
Definition: DeclObjC.h:2050
clang::Expr::getType
QualType getType() const
Definition: Expr.h:141
clang::JSONNodeDumper::VisitRequiresExpr
void VisitRequiresExpr(const RequiresExpr *RE)
Definition: JSONNodeDumper.cpp:1486
clang::tok::isLiteral
bool isLiteral(TokenKind K)
Return true if this is a "literal" kind, like a numeric constant, string, etc.
Definition: TokenKinds.h:89
clang::CXXBaseSpecifier
Represents a base class of a C++ class.
Definition: DeclCXX.h:146
clang::Attr
Attr - This represents one attribute.
Definition: Attr.h:40
clang::TypeSourceInfo
A container of type source information.
Definition: Type.h:6593
clang::CXXDependentScopeMemberExpr::getNumTemplateArgs
unsigned getNumTemplateArgs() const
Retrieve the number of template arguments provided as part of this template-id.
Definition: ExprCXX.h:3776
clang::NamedDecl::getDeclName
DeclarationName getDeclName() const
Get the actual, stored name of the declaration, which may be a special name.
Definition: Decl.h:313
clang::JSONNodeDumper::visitBlockCommandComment
void visitBlockCommandComment(const comments::BlockCommandComment *C, const comments::FullComment *)
Definition: JSONNodeDumper.cpp:1657
clang::ObjCAtCatchStmt::getCatchParamDecl
const VarDecl * getCatchParamDecl() const
Definition: StmtObjC.h:97
clang::CXXNewExpr::ListInit
@ ListInit
New-expression has a C++11 list-initializer.
Definition: ExprCXX.h:2206
clang::RQ_LValue
@ RQ_LValue
An lvalue ref-qualifier was provided (&).
Definition: Type.h:1521
clang::SD_Thread
@ SD_Thread
Thread storage duration.
Definition: Specifiers.h:314
clang::JSONNodeDumper::VisitTagType
void VisitTagType(const TagType *TT)
Definition: JSONNodeDumper.cpp:681
clang::JSONNodeDumper::VisitObjCCategoryImplDecl
void VisitObjCCategoryImplDecl(const ObjCCategoryImplDecl *D)
Definition: JSONNodeDumper.cpp:1039
clang::CXXNewExpr::NoInit
@ NoInit
New-expression has no initializer as written.
Definition: ExprCXX.h:2200
clang::JSONNodeDumper::VisitObjCPropertyDecl
void VisitObjCPropertyDecl(const ObjCPropertyDecl *D)
Definition: JSONNodeDumper.cpp:1080
clang::JSONNodeDumper::VisitCXXTypeidExpr
void VisitCXXTypeidExpr(const CXXTypeidExpr *CTE)
Definition: JSONNodeDumper.cpp:1358
FIELD2
#define FIELD2(Name, Flag)
Definition: JSONNodeDumper.cpp:371
clang::FunctionDecl::isVariadic
bool isVariadic() const
Whether this function is variadic.
Definition: Decl.cpp:3004
clang::JSONNodeDumper::VisitEnumConstantDecl
void VisitEnumConstantDecl(const EnumConstantDecl *ECD)
Definition: JSONNodeDumper.cpp:893
clang::TypeVisitor< JSONNodeDumper >::Visit
void Visit(const Type *T)
Performs the operation associated with this visitor object.
Definition: TypeVisitor.h:68
clang::LabelStmt::getDecl
LabelDecl * getDecl() const
Definition: Stmt.h:1853
clang::JSONNodeDumper::VisitCompoundStmt
void VisitCompoundStmt(const CompoundStmt *IS)
Definition: JSONNodeDumper.cpp:1733
clang::SYCLUniqueStableNameExpr::getTypeSourceInfo
TypeSourceInfo * getTypeSourceInfo()
Definition: Expr.h:2082
clang::JSONNodeDumper::VisitCallExpr
void VisitCallExpr(const CallExpr *CE)
Definition: JSONNodeDumper.cpp:1327
clang::ObjCBoolLiteralExpr::getValue
bool getValue() const
Definition: ExprObjC.h:101
clang::SubstTemplateTypeParmType::getPackIndex
Optional< unsigned > getPackIndex() const
Definition: Type.h:5114
clang::ImplicitCastExpr
ImplicitCastExpr - Allows us to explicitly represent implicit type conversions, which have no direct ...
Definition: Expr.h:3624
clang::ObjCPropertyAttribute::kind_nullability
@ kind_nullability
Indicates that the nullability of the type was spelled with a property attribute rather than a type q...
Definition: DeclObjCCommon.h:38
clang::MemberExpr
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
Definition: Expr.h:3169
clang::UnaryTransformType::getUTTKind
UTTKind getUTTKind() const
Definition: Type.h:4762
clang::JSONNodeDumper::VisitCXXRecordDecl
void VisitCXXRecordDecl(const CXXRecordDecl *RD)
Definition: JSONNodeDumper.cpp:903
clang::RecordType::getDecl
RecordDecl * getDecl() const
Definition: Type.h:4826
clang::QualType::getAsOpaquePtr
void * getAsOpaquePtr() const
Definition: Type.h:782
clang::FunctionType::isConst
bool isConst() const
Definition: Type.h:3958
clang::CXXDependentScopeMemberExpr::isArrow
bool isArrow() const
Determine whether this member expression used the '->' operator; otherwise, it used the '.
Definition: ExprCXX.h:3681
clang::ReferenceType
Base for LValueReferenceType and RValueReferenceType.
Definition: Type.h:2880
clang::ObjCPropertyAttribute::kind_getter
@ kind_getter
Definition: DeclObjCCommon.h:25
clang::concepts::Requirement::getKind
RequirementKind getKind() const
Definition: ExprConcepts.h:172
clang::SourceManager::getExpansionLoc
SourceLocation getExpansionLoc(SourceLocation Loc) const
Given a SourceLocation object Loc, return the expansion location referenced by the ID.
Definition: SourceManager.h:1165
clang::comments::InlineCommandComment::RenderNormal
@ RenderNormal
Definition: Comment.h:307
clang::CXXDeleteExpr::isGlobalDelete
bool isGlobalDelete() const
Definition: ExprCXX.h:2447
clang::VectorType::getNumElements
unsigned getNumElements() const
Definition: Type.h:3400
clang::JSONNodeDumper::VisitTemplateTemplateParmDecl
void VisitTemplateTemplateParmDecl(const TemplateTemplateParmDecl *D)
Definition: JSONNodeDumper.cpp:955
clang::CXXDependentScopeMemberExpr::hasExplicitTemplateArgs
bool hasExplicitTemplateArgs() const
Determines whether this member expression actually had a C++ template argument list explicitly specif...
Definition: ExprCXX.h:3755
clang::getAccessSpelling
llvm::StringRef getAccessSpelling(AccessSpecifier AS)
Definition: Specifiers.h:383
clang::JSONNodeDumper::VisitNamespaceAliasDecl
void VisitNamespaceAliasDecl(const NamespaceAliasDecl *NAD)
Definition: JSONNodeDumper.cpp:808
clang::APValue
APValue - This class implements a discriminated union of [uninitialized] [APSInt] [APFloat],...
Definition: APValue.h:122
clang::StringLiteral::outputString
void outputString(raw_ostream &OS) const
Definition: Expr.cpp:1206
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:6168
clang::PresumedLoc
Represents an unpacked "presumed" location which can be presented to the user.
Definition: SourceLocation.h:302
clang::JSONNodeDumper::VisitEnumDecl
void VisitEnumDecl(const EnumDecl *ED)
Definition: JSONNodeDumper.cpp:885
clang::concepts::Requirement::RK_Nested
@ RK_Nested
Definition: ExprConcepts.h:149
clang::DefaultArgStorage::getInheritedFrom
const ParmDecl * getInheritedFrom() const
Get the parameter from which we inherit the default argument, if any.
Definition: DeclTemplate.h:360
clang::SourceManager::getSpellingLineNumber
unsigned getSpellingLineNumber(SourceLocation Loc, bool *Invalid=nullptr) const
Definition: SourceManager.cpp:1447
clang::JSONNodeDumper::VisitConstantArrayType
void VisitConstantArrayType(const ConstantArrayType *CAT)
Definition: JSONNodeDumper.cpp:625
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:1269
clang::VarDecl::getInitStyle
InitializationStyle getInitStyle() const
The style of initialization for this declaration.
Definition: Decl.h:1406
clang::TypeAliasDecl
Represents the declaration of a typedef-name via a C++11 alias-declaration.
Definition: Decl.h:3397
clang::ObjCMessageExpr::getSuperType
QualType getSuperType() const
Retrieve the type referred to by 'super'.
Definition: ExprObjC.h:1326
clang::EST_NoexceptFalse
@ EST_NoexceptFalse
noexcept(expression), evals to 'false'
Definition: ExceptionSpecificationType.h:28
clang::ExprWithCleanups::cleanupsHaveSideEffects
bool cleanupsHaveSideEffects() const
Definition: ExprCXX.h:3406
clang::SC_None
@ SC_None
Definition: Specifiers.h:238
clang::ValueDecl::getType
QualType getType() const
Definition: Decl.h:712
clang::InjectedClassNameType::getDecl
CXXRecordDecl * getDecl() const
Definition: Type.cpp:3631
clang::CastExpr::getConversionFunction
NamedDecl * getConversionFunction() const
If this cast applies a user-defined conversion, retrieve the conversion function that it invokes.
Definition: Expr.cpp:1991
clang::PackExpansionType::getNumExpansions
Optional< unsigned > getNumExpansions() const
Retrieve the number of expansions that this pack expansion will generate, if known.
Definition: Type.h:5855
clang::SourceManager::getExpansionLineNumber
unsigned getExpansionLineNumber(SourceLocation Loc, bool *Invalid=nullptr) const
Definition: SourceManager.cpp:1453
clang::CXXConstructExpr::isListInitialization
bool isListInitialization() const
Whether this constructor call was written as list-initialization.
Definition: ExprCXX.h:1558
clang::ObjCIvarRefExpr::isFreeIvar
bool isFreeIvar() const
Definition: ExprObjC.h:585
clang::comments::InlineCommandComment::RenderAnchor
@ RenderAnchor
Definition: Comment.h:311
clang::TemplateTypeParmType::isParameterPack
bool isParameterPack() const
Definition: Type.h:5045
clang::CXXDeleteExpr::isArrayFormAsWritten
bool isArrayFormAsWritten() const
Definition: ExprCXX.h:2449
clang::CXXCtorInitializer
Represents a C++ base or member initializer.
Definition: DeclCXX.h:2207
clang::JSONNodeDumper::visitHTMLEndTagComment
void visitHTMLEndTagComment(const comments::HTMLEndTagComment *C, const comments::FullComment *)
Definition: JSONNodeDumper.cpp:1652
clang::BlockDecl::Capture
A class which contains all the information about a particular captured value.
Definition: Decl.h:4289
clang::JSONNodeDumper::VisitObjCMethodDecl
void VisitObjCMethodDecl(const ObjCMethodDecl *D)
Definition: JSONNodeDumper.cpp:1004
clang::concepts::Requirement::RK_Type
@ RK_Type
Definition: ExprConcepts.h:149
clang::FunctionDecl::isDeletedAsWritten
bool isDeletedAsWritten() const
Definition: Decl.h:2413
clang::CastExpr::getCastKindName
static const char * getCastKindName(CastKind CK)
Definition: Expr.cpp:1944
clang::FunctionProtoType::getExtProtoInfo
ExtProtoInfo getExtProtoInfo() const
Definition: Type.h:4238
clang::TypedefType::typeMatchesDecl
bool typeMatchesDecl() const
Definition: Type.h:4554
clang::ObjCPropertyDecl::getPropertyAttributes
ObjCPropertyAttribute::Kind getPropertyAttributes() const
Definition: DeclObjC.h:811
clang::CastExpr
CastExpr - Base class for type casts, including both implicit casts (ImplicitCastExpr) and explicit c...
Definition: Expr.h:3480
clang::DependentSizedExtVectorType
Represents an extended vector type where either the type or size is dependent.
Definition: Type.h:3318
clang::CXXThisExpr::isImplicit
bool isImplicit() const
Definition: ExprCXX.h:1166
clang::TemplateTemplateParmDecl::getDepth
unsigned getDepth() const
Get the nesting depth of the template parameter.
Definition: DeclTemplate.h:1180
clang::Decl::getLocation
SourceLocation getLocation() const
Definition: DeclBase.h:432
clang::SplitQualType::Quals
Qualifiers Quals
The local qualifiers.
Definition: Type.h:675
clang::attrvisitor::Base< llvm::make_const_ptr, JSONNodeDumper, void, ParamTys... >::Visit
void Visit(PTR(Attr) A)
Definition: AttrVisitor.h:31
clang::ASTNameGenerator::getName
std::string getName(const Decl *D)
Definition: Mangle.cpp:593
clang::DeclRefExpr
A reference to a declared variable, function, enum, etc.
Definition: Expr.h:1232
clang::AddrLabelExpr::getLabel
LabelDecl * getLabel() const
Definition: Expr.h:4332
clang::NamespaceDecl
Represent a C++ namespace.
Definition: Decl.h:542
clang::FunctionDecl
Represents a function declaration or definition.
Definition: Decl.h:1904
clang::JSONNodeDumper::VisitNullTemplateArgument
void VisitNullTemplateArgument(const TemplateArgument &TA)
Definition: JSONNodeDumper.cpp:1560
clang::TemplateTypeParmDecl::getDepth
unsigned getDepth() const
Retrieve the depth of the template parameter.
Definition: DeclTemplate.cpp:691
clang::BlockDecl::capturesCXXThis
bool capturesCXXThis() const
Definition: Decl.h:4415
clang::RecordDecl
Represents a struct/union/class.
Definition: Decl.h:3983
JSONNodeDumper.h
clang::CallExpr
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
Definition: Expr.h:2810
clang::FunctionType::ExtInfo::getProducesResult
bool getProducesResult() const
Definition: Type.h:3835
clang::FunctionDecl::getStorageClass
StorageClass getStorageClass() const
Returns the storage class as written in the source.
Definition: Decl.h:2668
clang::ObjCInterfaceType
Interfaces are the core concept in Objective-C for object oriented design.
Definition: Type.h:6214
clang::NamespaceDecl::isInline
bool isInline() const
Returns true if this is an inline namespace declaration.
Definition: Decl.h:607
clang::CXXConstructExpr
Represents a call to a C++ constructor.
Definition: ExprCXX.h:1467
clang::ObjCPropertyAttribute::kind_retain
@ kind_retain
Definition: DeclObjCCommon.h:28
clang::ObjCIvarRefExpr
ObjCIvarRefExpr - A reference to an ObjC instance variable.
Definition: ExprObjC.h:548
clang::CXXConstructExpr::getConstructionKind
ConstructionKind getConstructionKind() const
Determine whether this constructor is actually constructing a base class (rather than a complete obje...
Definition: ExprCXX.h:1587
clang::NOUR_Constant
@ NOUR_Constant
This name appears as a potential result of an lvalue-to-rvalue conversion that is a constant expressi...
Definition: Specifiers.h:168
clang::concepts::Requirement::isDependent
bool isDependent() const
Definition: ExprConcepts.h:187
clang::JSONNodeDumper::VisitCXXThisExpr
void VisitCXXThisExpr(const CXXThisExpr *TE)
Definition: JSONNodeDumper.cpp:1307
clang::ASTContext::getLangOpts
const LangOptions & getLangOpts() const
Definition: ASTContext.h:791
clang::JSONNodeDumper::VisitObjCImplementationDecl
void VisitObjCImplementationDecl(const ObjCImplementationDecl *D)
Definition: JSONNodeDumper.cpp:1067
clang::JSONNodeDumper::VisitFunctionDecl
void VisitFunctionDecl(const FunctionDecl *FD)
Definition: JSONNodeDumper.cpp:867
clang::UsingDirectiveDecl::getNominatedNamespace
NamespaceDecl * getNominatedNamespace()
Returns the namespace nominated by this using-directive.
Definition: DeclCXX.cpp:2875
clang::JSONNodeDumper::VisitStringLiteral
void VisitStringLiteral(const StringLiteral *SL)
Definition: JSONNodeDumper.cpp:1512
clang::ObjCMethodDecl::isVariadic
bool isVariadic() const
Definition: DeclObjC.h:436
clang::CXXConstructExpr::isElidable
bool isElidable() const
Whether this construction is elidable.
Definition: ExprCXX.h:1545
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::UsingEnumDecl::getEnumDecl
EnumDecl * getEnumDecl() const
Definition: DeclCXX.h:3658
clang::CXXDependentScopeMemberExpr::hasTemplateKeyword
bool hasTemplateKeyword() const
Determines whether the member name was preceded by the template keyword.
Definition: ExprCXX.h:3751
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:1569
clang::CXXUnresolvedConstructExpr::getTypeAsWritten
QualType getTypeAsWritten() const
Retrieve the type that is being constructed, as specified in the source code.
Definition: ExprCXX.h:3488
clang::VarDecl::CallInit
@ CallInit
Call-style initialization (C++98)
Definition: Decl.h:914
clang::Decl::getDeclKindName
const char * getDeclKindName() const
Definition: DeclBase.cpp:123
clang::TemplateTemplateParmDecl::isParameterPack
bool isParameterPack() const
Whether this template template parameter is a template parameter pack.
Definition: DeclTemplate.h:1696
clang::ObjCPropertyAttribute::kind_setter
@ kind_setter
Definition: DeclObjCCommon.h:31
clang::ObjCIvarDecl::Package
@ Package
Definition: DeclObjC.h:1926
clang::Decl::getDeclContext
DeclContext * getDeclContext()
Definition: DeclBase.h:441
clang::TemplateSpecializationType::getTemplateName
TemplateName getTemplateName() const
Retrieve the name of the template that we are specializing.
Definition: Type.h:5422
clang::SYCLUniqueStableNameExpr
Definition: Expr.h:2065
clang::SourceManager::getSpellingLoc
SourceLocation getSpellingLoc(SourceLocation Loc) const
Given a SourceLocation object, return the spelling location referenced by the ID.
Definition: SourceManager.h:1213
clang::StorageClass
StorageClass
Storage classes.
Definition: Specifiers.h:236
clang::NamedDecl::getName
StringRef getName() const
Get the name of identifier for this declaration as a StringRef.
Definition: Decl.h:274
clang::AutoTypeKeyword::DecltypeAuto
@ DecltypeAuto
decltype(auto)