clang  14.0.0git
JSONNodeDumper.cpp
Go to the documentation of this file.
4 #include "clang/Lex/Lexer.h"
5 #include "llvm/ADT/StringSwitch.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 }
534 
537  attributeOnlyIfTrue("noreturn", E.getNoReturn());
538  attributeOnlyIfTrue("producesResult", E.getProducesResult());
539  if (E.getHasRegParm())
540  JOS.attribute("regParm", E.getRegParm());
541  JOS.attribute("cc", FunctionType::getNameForCallConv(E.getCC()));
542 }
543 
546  attributeOnlyIfTrue("trailingReturn", E.HasTrailingReturn);
547  attributeOnlyIfTrue("const", T->isConst());
548  attributeOnlyIfTrue("volatile", T->isVolatile());
549  attributeOnlyIfTrue("restrict", T->isRestrict());
550  attributeOnlyIfTrue("variadic", E.Variadic);
551  switch (E.RefQualifier) {
552  case RQ_LValue: JOS.attribute("refQualifier", "&"); break;
553  case RQ_RValue: JOS.attribute("refQualifier", "&&"); break;
554  case RQ_None: break;
555  }
556  switch (E.ExceptionSpec.Type) {
557  case EST_DynamicNone:
558  case EST_Dynamic: {
559  JOS.attribute("exceptionSpec", "throw");
560  llvm::json::Array Types;
561  for (QualType QT : E.ExceptionSpec.Exceptions)
562  Types.push_back(createQualType(QT));
563  JOS.attribute("exceptionTypes", std::move(Types));
564  } break;
565  case EST_MSAny:
566  JOS.attribute("exceptionSpec", "throw");
567  JOS.attribute("throwsAny", true);
568  break;
569  case EST_BasicNoexcept:
570  JOS.attribute("exceptionSpec", "noexcept");
571  break;
572  case EST_NoexceptTrue:
573  case EST_NoexceptFalse:
574  JOS.attribute("exceptionSpec", "noexcept");
575  JOS.attribute("conditionEvaluatesTo",
577  //JOS.attributeWithCall("exceptionSpecExpr",
578  // [this, E]() { Visit(E.ExceptionSpec.NoexceptExpr); });
579  break;
580  case EST_NoThrow:
581  JOS.attribute("exceptionSpec", "nothrow");
582  break;
583  // FIXME: I cannot find a way to trigger these cases while dumping the AST. I
584  // suspect you can only run into them when executing an AST dump from within
585  // the debugger, which is not a use case we worry about for the JSON dumping
586  // feature.
588  case EST_Unevaluated:
589  case EST_Uninstantiated:
590  case EST_Unparsed:
591  case EST_None: break;
592  }
594 }
595 
597  attributeOnlyIfTrue("spelledAsLValue", RT->isSpelledAsLValue());
598 }
599 
601  switch (AT->getSizeModifier()) {
602  case ArrayType::Star:
603  JOS.attribute("sizeModifier", "*");
604  break;
605  case ArrayType::Static:
606  JOS.attribute("sizeModifier", "static");
607  break;
608  case ArrayType::Normal:
609  break;
610  }
611 
613  if (!Str.empty())
614  JOS.attribute("indexTypeQualifiers", Str);
615 }
616 
618  // FIXME: this should use ZExt instead of SExt, but JSON doesn't allow a
619  // narrowing conversion to int64_t so it cannot be expressed.
620  JOS.attribute("size", CAT->getSize().getSExtValue());
621  VisitArrayType(CAT);
622 }
623 
625  const DependentSizedExtVectorType *VT) {
626  JOS.attributeObject(
627  "attrLoc", [VT, this] { writeSourceLocation(VT->getAttributeLoc()); });
628 }
629 
631  JOS.attribute("numElements", VT->getNumElements());
632  switch (VT->getVectorKind()) {
634  break;
636  JOS.attribute("vectorKind", "altivec");
637  break;
639  JOS.attribute("vectorKind", "altivec pixel");
640  break;
642  JOS.attribute("vectorKind", "altivec bool");
643  break;
645  JOS.attribute("vectorKind", "neon");
646  break;
648  JOS.attribute("vectorKind", "neon poly");
649  break;
651  JOS.attribute("vectorKind", "fixed-length sve data vector");
652  break;
654  JOS.attribute("vectorKind", "fixed-length sve predicate vector");
655  break;
656  }
657 }
658 
660  JOS.attribute("decl", createBareDeclRef(UUT->getDecl()));
661 }
662 
664  switch (UTT->getUTTKind()) {
666  JOS.attribute("transformKind", "underlying_type");
667  break;
668  }
669 }
670 
672  JOS.attribute("decl", createBareDeclRef(TT->getDecl()));
673 }
674 
676  const TemplateTypeParmType *TTPT) {
677  JOS.attribute("depth", TTPT->getDepth());
678  JOS.attribute("index", TTPT->getIndex());
679  attributeOnlyIfTrue("isPack", TTPT->isParameterPack());
680  JOS.attribute("decl", createBareDeclRef(TTPT->getDecl()));
681 }
682 
684  JOS.attribute("undeduced", !AT->isDeduced());
685  switch (AT->getKeyword()) {
687  JOS.attribute("typeKeyword", "auto");
688  break;
690  JOS.attribute("typeKeyword", "decltype(auto)");
691  break;
693  JOS.attribute("typeKeyword", "__auto_type");
694  break;
695  }
696 }
697 
699  const TemplateSpecializationType *TST) {
700  attributeOnlyIfTrue("isAlias", TST->isTypeAlias());
701 
702  std::string Str;
703  llvm::raw_string_ostream OS(Str);
704  TST->getTemplateName().print(OS, PrintPolicy);
705  JOS.attribute("templateName", OS.str());
706 }
707 
709  const InjectedClassNameType *ICNT) {
710  JOS.attribute("decl", createBareDeclRef(ICNT->getDecl()));
711 }
712 
714  JOS.attribute("decl", createBareDeclRef(OIT->getDecl()));
715 }
716 
719  JOS.attribute("numExpansions", *N);
720 }
721 
723  if (const NestedNameSpecifier *NNS = ET->getQualifier()) {
724  std::string Str;
725  llvm::raw_string_ostream OS(Str);
726  NNS->print(OS, PrintPolicy, /*ResolveTemplateArgs*/ true);
727  JOS.attribute("qualifier", OS.str());
728  }
729  if (const TagDecl *TD = ET->getOwnedTagDecl())
730  JOS.attribute("ownedTagDecl", createBareDeclRef(TD));
731 }
732 
734  JOS.attribute("macroName", MQT->getMacroIdentifier()->getName());
735 }
736 
738  attributeOnlyIfTrue("isData", MPT->isMemberDataPointer());
739  attributeOnlyIfTrue("isFunction", MPT->isMemberFunctionPointer());
740 }
741 
743  if (ND && ND->getDeclName()) {
744  JOS.attribute("name", ND->getNameAsString());
745  // FIXME: There are likely other contexts in which it makes no sense to ask
746  // for a mangled name.
747  if (!isa<RequiresExprBodyDecl>(ND->getDeclContext())) {
748  std::string MangledName = ASTNameGen.getName(ND);
749  if (!MangledName.empty())
750  JOS.attribute("mangledName", MangledName);
751  }
752  }
753 }
754 
756  VisitNamedDecl(TD);
757  JOS.attribute("type", createQualType(TD->getUnderlyingType()));
758 }
759 
761  VisitNamedDecl(TAD);
762  JOS.attribute("type", createQualType(TAD->getUnderlyingType()));
763 }
764 
766  VisitNamedDecl(ND);
767  attributeOnlyIfTrue("isInline", ND->isInline());
768  if (!ND->isOriginalNamespace())
769  JOS.attribute("originalNamespace",
770  createBareDeclRef(ND->getOriginalNamespace()));
771 }
772 
774  JOS.attribute("nominatedNamespace",
775  createBareDeclRef(UDD->getNominatedNamespace()));
776 }
777 
779  VisitNamedDecl(NAD);
780  JOS.attribute("aliasedNamespace",
781  createBareDeclRef(NAD->getAliasedNamespace()));
782 }
783 
785  std::string Name;
786  if (const NestedNameSpecifier *NNS = UD->getQualifier()) {
787  llvm::raw_string_ostream SOS(Name);
788  NNS->print(SOS, UD->getASTContext().getPrintingPolicy());
789  }
790  Name += UD->getNameAsString();
791  JOS.attribute("name", Name);
792 }
793 
795  JOS.attribute("target", createBareDeclRef(UED->getEnumDecl()));
796 }
797 
799  JOS.attribute("target", createBareDeclRef(USD->getTargetDecl()));
800 }
801 
803  VisitNamedDecl(VD);
804  JOS.attribute("type", createQualType(VD->getType()));
805 
806  StorageClass SC = VD->getStorageClass();
807  if (SC != SC_None)
808  JOS.attribute("storageClass", VarDecl::getStorageClassSpecifierString(SC));
809  switch (VD->getTLSKind()) {
810  case VarDecl::TLS_Dynamic: JOS.attribute("tls", "dynamic"); break;
811  case VarDecl::TLS_Static: JOS.attribute("tls", "static"); break;
812  case VarDecl::TLS_None: break;
813  }
814  attributeOnlyIfTrue("nrvo", VD->isNRVOVariable());
815  attributeOnlyIfTrue("inline", VD->isInline());
816  attributeOnlyIfTrue("constexpr", VD->isConstexpr());
817  attributeOnlyIfTrue("modulePrivate", VD->isModulePrivate());
818  if (VD->hasInit()) {
819  switch (VD->getInitStyle()) {
820  case VarDecl::CInit: JOS.attribute("init", "c"); break;
821  case VarDecl::CallInit: JOS.attribute("init", "call"); break;
822  case VarDecl::ListInit: JOS.attribute("init", "list"); break;
823  }
824  }
825  attributeOnlyIfTrue("isParameterPack", VD->isParameterPack());
826 }
827 
829  VisitNamedDecl(FD);
830  JOS.attribute("type", createQualType(FD->getType()));
831  attributeOnlyIfTrue("mutable", FD->isMutable());
832  attributeOnlyIfTrue("modulePrivate", FD->isModulePrivate());
833  attributeOnlyIfTrue("isBitfield", FD->isBitField());
834  attributeOnlyIfTrue("hasInClassInitializer", FD->hasInClassInitializer());
835 }
836 
838  VisitNamedDecl(FD);
839  JOS.attribute("type", createQualType(FD->getType()));
840  StorageClass SC = FD->getStorageClass();
841  if (SC != SC_None)
842  JOS.attribute("storageClass", VarDecl::getStorageClassSpecifierString(SC));
843  attributeOnlyIfTrue("inline", FD->isInlineSpecified());
844  attributeOnlyIfTrue("virtual", FD->isVirtualAsWritten());
845  attributeOnlyIfTrue("pure", FD->isPure());
846  attributeOnlyIfTrue("explicitlyDeleted", FD->isDeletedAsWritten());
847  attributeOnlyIfTrue("constexpr", FD->isConstexpr());
848  attributeOnlyIfTrue("variadic", FD->isVariadic());
849 
850  if (FD->isDefaulted())
851  JOS.attribute("explicitlyDefaulted",
852  FD->isDeleted() ? "deleted" : "default");
853 }
854 
856  VisitNamedDecl(ED);
857  if (ED->isFixed())
858  JOS.attribute("fixedUnderlyingType", createQualType(ED->getIntegerType()));
859  if (ED->isScoped())
860  JOS.attribute("scopedEnumTag",
861  ED->isScopedUsingClassTag() ? "class" : "struct");
862 }
864  VisitNamedDecl(ECD);
865  JOS.attribute("type", createQualType(ECD->getType()));
866 }
867 
869  VisitNamedDecl(RD);
870  JOS.attribute("tagUsed", RD->getKindName());
871  attributeOnlyIfTrue("completeDefinition", RD->isCompleteDefinition());
872 }
874  VisitRecordDecl(RD);
875 
876  // All other information requires a complete definition.
877  if (!RD->isCompleteDefinition())
878  return;
879 
880  JOS.attribute("definitionData", createCXXRecordDefinitionData(RD));
881  if (RD->getNumBases()) {
882  JOS.attributeArray("bases", [this, RD] {
883  for (const auto &Spec : RD->bases())
884  JOS.value(createCXXBaseSpecifier(Spec));
885  });
886  }
887 }
888 
890  VisitNamedDecl(D);
891  JOS.attribute("tagUsed", D->wasDeclaredWithTypename() ? "typename" : "class");
892  JOS.attribute("depth", D->getDepth());
893  JOS.attribute("index", D->getIndex());
894  attributeOnlyIfTrue("isParameterPack", D->isParameterPack());
895 
896  if (D->hasDefaultArgument())
897  JOS.attributeObject("defaultArg", [=] {
900  D->defaultArgumentWasInherited() ? "inherited from" : "previous");
901  });
902 }
903 
905  const NonTypeTemplateParmDecl *D) {
906  VisitNamedDecl(D);
907  JOS.attribute("type", createQualType(D->getType()));
908  JOS.attribute("depth", D->getDepth());
909  JOS.attribute("index", D->getIndex());
910  attributeOnlyIfTrue("isParameterPack", D->isParameterPack());
911 
912  if (D->hasDefaultArgument())
913  JOS.attributeObject("defaultArg", [=] {
916  D->defaultArgumentWasInherited() ? "inherited from" : "previous");
917  });
918 }
919 
921  const TemplateTemplateParmDecl *D) {
922  VisitNamedDecl(D);
923  JOS.attribute("depth", D->getDepth());
924  JOS.attribute("index", D->getIndex());
925  attributeOnlyIfTrue("isParameterPack", D->isParameterPack());
926 
927  if (D->hasDefaultArgument())
928  JOS.attributeObject("defaultArg", [=] {
929  const auto *InheritedFrom = D->getDefaultArgStorage().getInheritedFrom();
931  InheritedFrom ? InheritedFrom->getSourceRange() : SourceLocation{},
932  InheritedFrom,
933  D->defaultArgumentWasInherited() ? "inherited from" : "previous");
934  });
935 }
936 
938  StringRef Lang;
939  switch (LSD->getLanguage()) {
940  case LinkageSpecDecl::lang_c: Lang = "C"; break;
941  case LinkageSpecDecl::lang_cxx: Lang = "C++"; break;
942  }
943  JOS.attribute("language", Lang);
944  attributeOnlyIfTrue("hasBraces", LSD->hasBraces());
945 }
946 
948  JOS.attribute("access", createAccessSpecifier(ASD->getAccess()));
949 }
950 
952  if (const TypeSourceInfo *T = FD->getFriendType())
953  JOS.attribute("type", createQualType(T->getType()));
954 }
955 
957  VisitNamedDecl(D);
958  JOS.attribute("type", createQualType(D->getType()));
959  attributeOnlyIfTrue("synthesized", D->getSynthesize());
960  switch (D->getAccessControl()) {
961  case ObjCIvarDecl::None: JOS.attribute("access", "none"); break;
962  case ObjCIvarDecl::Private: JOS.attribute("access", "private"); break;
963  case ObjCIvarDecl::Protected: JOS.attribute("access", "protected"); break;
964  case ObjCIvarDecl::Public: JOS.attribute("access", "public"); break;
965  case ObjCIvarDecl::Package: JOS.attribute("access", "package"); break;
966  }
967 }
968 
970  VisitNamedDecl(D);
971  JOS.attribute("returnType", createQualType(D->getReturnType()));
972  JOS.attribute("instance", D->isInstanceMethod());
973  attributeOnlyIfTrue("variadic", D->isVariadic());
974 }
975 
977  VisitNamedDecl(D);
978  JOS.attribute("type", createQualType(D->getUnderlyingType()));
979  attributeOnlyIfTrue("bounded", D->hasExplicitBound());
980  switch (D->getVariance()) {
982  break;
984  JOS.attribute("variance", "covariant");
985  break;
987  JOS.attribute("variance", "contravariant");
988  break;
989  }
990 }
991 
993  VisitNamedDecl(D);
994  JOS.attribute("interface", createBareDeclRef(D->getClassInterface()));
995  JOS.attribute("implementation", createBareDeclRef(D->getImplementation()));
996 
997  llvm::json::Array Protocols;
998  for (const auto* P : D->protocols())
999  Protocols.push_back(createBareDeclRef(P));
1000  if (!Protocols.empty())
1001  JOS.attribute("protocols", std::move(Protocols));
1002 }
1003 
1005  VisitNamedDecl(D);
1006  JOS.attribute("interface", createBareDeclRef(D->getClassInterface()));
1007  JOS.attribute("categoryDecl", createBareDeclRef(D->getCategoryDecl()));
1008 }
1009 
1011  VisitNamedDecl(D);
1012 
1013  llvm::json::Array Protocols;
1014  for (const auto *P : D->protocols())
1015  Protocols.push_back(createBareDeclRef(P));
1016  if (!Protocols.empty())
1017  JOS.attribute("protocols", std::move(Protocols));
1018 }
1019 
1021  VisitNamedDecl(D);
1022  JOS.attribute("super", createBareDeclRef(D->getSuperClass()));
1023  JOS.attribute("implementation", createBareDeclRef(D->getImplementation()));
1024 
1025  llvm::json::Array Protocols;
1026  for (const auto* P : D->protocols())
1027  Protocols.push_back(createBareDeclRef(P));
1028  if (!Protocols.empty())
1029  JOS.attribute("protocols", std::move(Protocols));
1030 }
1031 
1033  const ObjCImplementationDecl *D) {
1034  VisitNamedDecl(D);
1035  JOS.attribute("super", createBareDeclRef(D->getSuperClass()));
1036  JOS.attribute("interface", createBareDeclRef(D->getClassInterface()));
1037 }
1038 
1040  const ObjCCompatibleAliasDecl *D) {
1041  VisitNamedDecl(D);
1042  JOS.attribute("interface", createBareDeclRef(D->getClassInterface()));
1043 }
1044 
1046  VisitNamedDecl(D);
1047  JOS.attribute("type", createQualType(D->getType()));
1048 
1049  switch (D->getPropertyImplementation()) {
1050  case ObjCPropertyDecl::None: break;
1051  case ObjCPropertyDecl::Required: JOS.attribute("control", "required"); break;
1052  case ObjCPropertyDecl::Optional: JOS.attribute("control", "optional"); break;
1053  }
1054 
1056  if (Attrs != ObjCPropertyAttribute::kind_noattr) {
1058  JOS.attribute("getter", createBareDeclRef(D->getGetterMethodDecl()));
1060  JOS.attribute("setter", createBareDeclRef(D->getSetterMethodDecl()));
1061  attributeOnlyIfTrue("readonly",
1063  attributeOnlyIfTrue("assign", Attrs & ObjCPropertyAttribute::kind_assign);
1064  attributeOnlyIfTrue("readwrite",
1066  attributeOnlyIfTrue("retain", Attrs & ObjCPropertyAttribute::kind_retain);
1067  attributeOnlyIfTrue("copy", Attrs & ObjCPropertyAttribute::kind_copy);
1068  attributeOnlyIfTrue("nonatomic",
1070  attributeOnlyIfTrue("atomic", Attrs & ObjCPropertyAttribute::kind_atomic);
1071  attributeOnlyIfTrue("weak", Attrs & ObjCPropertyAttribute::kind_weak);
1072  attributeOnlyIfTrue("strong", Attrs & ObjCPropertyAttribute::kind_strong);
1073  attributeOnlyIfTrue("unsafe_unretained",
1075  attributeOnlyIfTrue("class", Attrs & ObjCPropertyAttribute::kind_class);
1076  attributeOnlyIfTrue("direct", Attrs & ObjCPropertyAttribute::kind_direct);
1077  attributeOnlyIfTrue("nullability",
1079  attributeOnlyIfTrue("null_resettable",
1081  }
1082 }
1083 
1086  JOS.attribute("implKind", D->getPropertyImplementation() ==
1088  ? "synthesize"
1089  : "dynamic");
1090  JOS.attribute("propertyDecl", createBareDeclRef(D->getPropertyDecl()));
1091  JOS.attribute("ivarDecl", createBareDeclRef(D->getPropertyIvarDecl()));
1092 }
1093 
1095  attributeOnlyIfTrue("variadic", D->isVariadic());
1096  attributeOnlyIfTrue("capturesThis", D->capturesCXXThis());
1097 }
1098 
1100  JOS.attribute("encodedType", createQualType(OEE->getEncodedType()));
1101 }
1102 
1104  std::string Str;
1105  llvm::raw_string_ostream OS(Str);
1106 
1107  OME->getSelector().print(OS);
1108  JOS.attribute("selector", OS.str());
1109 
1110  switch (OME->getReceiverKind()) {
1112  JOS.attribute("receiverKind", "instance");
1113  break;
1115  JOS.attribute("receiverKind", "class");
1116  JOS.attribute("classType", createQualType(OME->getClassReceiver()));
1117  break;
1119  JOS.attribute("receiverKind", "super (instance)");
1120  JOS.attribute("superType", createQualType(OME->getSuperType()));
1121  break;
1123  JOS.attribute("receiverKind", "super (class)");
1124  JOS.attribute("superType", createQualType(OME->getSuperType()));
1125  break;
1126  }
1127 
1128  QualType CallReturnTy = OME->getCallReturnType(Ctx);
1129  if (OME->getType() != CallReturnTy)
1130  JOS.attribute("callReturnType", createQualType(CallReturnTy));
1131 }
1132 
1134  if (const ObjCMethodDecl *MD = OBE->getBoxingMethod()) {
1135  std::string Str;
1136  llvm::raw_string_ostream OS(Str);
1137 
1138  MD->getSelector().print(OS);
1139  JOS.attribute("selector", OS.str());
1140  }
1141 }
1142 
1144  std::string Str;
1145  llvm::raw_string_ostream OS(Str);
1146 
1147  OSE->getSelector().print(OS);
1148  JOS.attribute("selector", OS.str());
1149 }
1150 
1152  JOS.attribute("protocol", createBareDeclRef(OPE->getProtocol()));
1153 }
1154 
1156  if (OPRE->isImplicitProperty()) {
1157  JOS.attribute("propertyKind", "implicit");
1158  if (const ObjCMethodDecl *MD = OPRE->getImplicitPropertyGetter())
1159  JOS.attribute("getter", createBareDeclRef(MD));
1160  if (const ObjCMethodDecl *MD = OPRE->getImplicitPropertySetter())
1161  JOS.attribute("setter", createBareDeclRef(MD));
1162  } else {
1163  JOS.attribute("propertyKind", "explicit");
1164  JOS.attribute("property", createBareDeclRef(OPRE->getExplicitProperty()));
1165  }
1166 
1167  attributeOnlyIfTrue("isSuperReceiver", OPRE->isSuperReceiver());
1168  attributeOnlyIfTrue("isMessagingGetter", OPRE->isMessagingGetter());
1169  attributeOnlyIfTrue("isMessagingSetter", OPRE->isMessagingSetter());
1170 }
1171 
1173  const ObjCSubscriptRefExpr *OSRE) {
1174  JOS.attribute("subscriptKind",
1175  OSRE->isArraySubscriptRefExpr() ? "array" : "dictionary");
1176 
1177  if (const ObjCMethodDecl *MD = OSRE->getAtIndexMethodDecl())
1178  JOS.attribute("getter", createBareDeclRef(MD));
1179  if (const ObjCMethodDecl *MD = OSRE->setAtIndexMethodDecl())
1180  JOS.attribute("setter", createBareDeclRef(MD));
1181 }
1182 
1184  JOS.attribute("decl", createBareDeclRef(OIRE->getDecl()));
1185  attributeOnlyIfTrue("isFreeIvar", OIRE->isFreeIvar());
1186  JOS.attribute("isArrow", OIRE->isArrow());
1187 }
1188 
1190  JOS.attribute("value", OBLE->getValue() ? "__objc_yes" : "__objc_no");
1191 }
1192 
1194  JOS.attribute("referencedDecl", createBareDeclRef(DRE->getDecl()));
1195  if (DRE->getDecl() != DRE->getFoundDecl())
1196  JOS.attribute("foundReferencedDecl",
1197  createBareDeclRef(DRE->getFoundDecl()));
1198  switch (DRE->isNonOdrUse()) {
1199  case NOUR_None: break;
1200  case NOUR_Unevaluated: JOS.attribute("nonOdrUseReason", "unevaluated"); break;
1201  case NOUR_Constant: JOS.attribute("nonOdrUseReason", "constant"); break;
1202  case NOUR_Discarded: JOS.attribute("nonOdrUseReason", "discarded"); break;
1203  }
1204 }
1205 
1207  const SYCLUniqueStableNameExpr *E) {
1208  JOS.attribute("typeSourceInfo",
1209  createQualType(E->getTypeSourceInfo()->getType()));
1210 }
1211 
1213  JOS.attribute("name", PredefinedExpr::getIdentKindName(PE->getIdentKind()));
1214 }
1215 
1217  JOS.attribute("isPostfix", UO->isPostfix());
1218  JOS.attribute("opcode", UnaryOperator::getOpcodeStr(UO->getOpcode()));
1219  if (!UO->canOverflow())
1220  JOS.attribute("canOverflow", false);
1221 }
1222 
1224  JOS.attribute("opcode", BinaryOperator::getOpcodeStr(BO->getOpcode()));
1225 }
1226 
1228  const CompoundAssignOperator *CAO) {
1229  VisitBinaryOperator(CAO);
1230  JOS.attribute("computeLHSType", createQualType(CAO->getComputationLHSType()));
1231  JOS.attribute("computeResultType",
1232  createQualType(CAO->getComputationResultType()));
1233 }
1234 
1236  // Note, we always write this Boolean field because the information it conveys
1237  // is critical to understanding the AST node.
1238  ValueDecl *VD = ME->getMemberDecl();
1239  JOS.attribute("name", VD && VD->getDeclName() ? VD->getNameAsString() : "");
1240  JOS.attribute("isArrow", ME->isArrow());
1241  JOS.attribute("referencedMemberDecl", createPointerRepresentation(VD));
1242  switch (ME->isNonOdrUse()) {
1243  case NOUR_None: break;
1244  case NOUR_Unevaluated: JOS.attribute("nonOdrUseReason", "unevaluated"); break;
1245  case NOUR_Constant: JOS.attribute("nonOdrUseReason", "constant"); break;
1246  case NOUR_Discarded: JOS.attribute("nonOdrUseReason", "discarded"); break;
1247  }
1248 }
1249 
1251  attributeOnlyIfTrue("isGlobal", NE->isGlobalNew());
1252  attributeOnlyIfTrue("isArray", NE->isArray());
1253  attributeOnlyIfTrue("isPlacement", NE->getNumPlacementArgs() != 0);
1254  switch (NE->getInitializationStyle()) {
1255  case CXXNewExpr::NoInit: break;
1256  case CXXNewExpr::CallInit: JOS.attribute("initStyle", "call"); break;
1257  case CXXNewExpr::ListInit: JOS.attribute("initStyle", "list"); break;
1258  }
1259  if (const FunctionDecl *FD = NE->getOperatorNew())
1260  JOS.attribute("operatorNewDecl", createBareDeclRef(FD));
1261  if (const FunctionDecl *FD = NE->getOperatorDelete())
1262  JOS.attribute("operatorDeleteDecl", createBareDeclRef(FD));
1263 }
1265  attributeOnlyIfTrue("isGlobal", DE->isGlobalDelete());
1266  attributeOnlyIfTrue("isArray", DE->isArrayForm());
1267  attributeOnlyIfTrue("isArrayAsWritten", DE->isArrayFormAsWritten());
1268  if (const FunctionDecl *FD = DE->getOperatorDelete())
1269  JOS.attribute("operatorDeleteDecl", createBareDeclRef(FD));
1270 }
1271 
1273  attributeOnlyIfTrue("implicit", TE->isImplicit());
1274 }
1275 
1277  JOS.attribute("castKind", CE->getCastKindName());
1278  llvm::json::Array Path = createCastPath(CE);
1279  if (!Path.empty())
1280  JOS.attribute("path", std::move(Path));
1281  // FIXME: This may not be useful information as it can be obtusely gleaned
1282  // from the inner[] array.
1283  if (const NamedDecl *ND = CE->getConversionFunction())
1284  JOS.attribute("conversionFunc", createBareDeclRef(ND));
1285 }
1286 
1288  VisitCastExpr(ICE);
1289  attributeOnlyIfTrue("isPartOfExplicitCast", ICE->isPartOfExplicitCast());
1290 }
1291 
1293  attributeOnlyIfTrue("adl", CE->usesADL());
1294 }
1295 
1297  const UnaryExprOrTypeTraitExpr *TTE) {
1298  JOS.attribute("name", getTraitSpelling(TTE->getKind()));
1299  if (TTE->isArgumentType())
1300  JOS.attribute("argType", createQualType(TTE->getArgumentType()));
1301 }
1302 
1304  VisitNamedDecl(SOPE->getPack());
1305 }
1306 
1308  const UnresolvedLookupExpr *ULE) {
1309  JOS.attribute("usesADL", ULE->requiresADL());
1310  JOS.attribute("name", ULE->getName().getAsString());
1311 
1312  JOS.attributeArray("lookups", [this, ULE] {
1313  for (const NamedDecl *D : ULE->decls())
1314  JOS.value(createBareDeclRef(D));
1315  });
1316 }
1317 
1319  JOS.attribute("name", ALE->getLabel()->getName());
1320  JOS.attribute("labelDeclId", createPointerRepresentation(ALE->getLabel()));
1321 }
1322 
1324  if (CTE->isTypeOperand()) {
1325  QualType Adjusted = CTE->getTypeOperand(Ctx);
1326  QualType Unadjusted = CTE->getTypeOperandSourceInfo()->getType();
1327  JOS.attribute("typeArg", createQualType(Unadjusted));
1328  if (Adjusted != Unadjusted)
1329  JOS.attribute("adjustedTypeArg", createQualType(Adjusted));
1330  }
1331 }
1332 
1334  if (CE->getResultAPValueKind() != APValue::None)
1335  Visit(CE->getAPValueResult(), CE->getType());
1336 }
1337 
1339  if (const FieldDecl *FD = ILE->getInitializedFieldInUnion())
1340  JOS.attribute("field", createBareDeclRef(FD));
1341 }
1342 
1344  const GenericSelectionExpr *GSE) {
1345  attributeOnlyIfTrue("resultDependent", GSE->isResultDependent());
1346 }
1347 
1349  const CXXUnresolvedConstructExpr *UCE) {
1350  if (UCE->getType() != UCE->getTypeAsWritten())
1351  JOS.attribute("typeAsWritten", createQualType(UCE->getTypeAsWritten()));
1352  attributeOnlyIfTrue("list", UCE->isListInitialization());
1353 }
1354 
1356  CXXConstructorDecl *Ctor = CE->getConstructor();
1357  JOS.attribute("ctorType", createQualType(Ctor->getType()));
1358  attributeOnlyIfTrue("elidable", CE->isElidable());
1359  attributeOnlyIfTrue("list", CE->isListInitialization());
1360  attributeOnlyIfTrue("initializer_list", CE->isStdInitListInitialization());
1361  attributeOnlyIfTrue("zeroing", CE->requiresZeroInitialization());
1362  attributeOnlyIfTrue("hadMultipleCandidates", CE->hadMultipleCandidates());
1363 
1364  switch (CE->getConstructionKind()) {
1366  JOS.attribute("constructionKind", "complete");
1367  break;
1369  JOS.attribute("constructionKind", "delegating");
1370  break;
1372  JOS.attribute("constructionKind", "non-virtual base");
1373  break;
1375  JOS.attribute("constructionKind", "virtual base");
1376  break;
1377  }
1378 }
1379 
1381  attributeOnlyIfTrue("cleanupsHaveSideEffects",
1382  EWC->cleanupsHaveSideEffects());
1383  if (EWC->getNumObjects()) {
1384  JOS.attributeArray("cleanups", [this, EWC] {
1385  for (const ExprWithCleanups::CleanupObject &CO : EWC->getObjects())
1386  if (auto *BD = CO.dyn_cast<BlockDecl *>()) {
1387  JOS.value(createBareDeclRef(BD));
1388  } else if (auto *CLE = CO.dyn_cast<CompoundLiteralExpr *>()) {
1389  llvm::json::Object Obj;
1390  Obj["id"] = createPointerRepresentation(CLE);
1391  Obj["kind"] = CLE->getStmtClassName();
1392  JOS.value(std::move(Obj));
1393  } else {
1394  llvm_unreachable("unexpected cleanup object type");
1395  }
1396  });
1397  }
1398 }
1399 
1401  const CXXBindTemporaryExpr *BTE) {
1402  const CXXTemporary *Temp = BTE->getTemporary();
1403  JOS.attribute("temp", createPointerRepresentation(Temp));
1404  if (const CXXDestructorDecl *Dtor = Temp->getDestructor())
1405  JOS.attribute("dtor", createBareDeclRef(Dtor));
1406 }
1407 
1409  const MaterializeTemporaryExpr *MTE) {
1410  if (const ValueDecl *VD = MTE->getExtendingDecl())
1411  JOS.attribute("extendingDecl", createBareDeclRef(VD));
1412 
1413  switch (MTE->getStorageDuration()) {
1414  case SD_Automatic:
1415  JOS.attribute("storageDuration", "automatic");
1416  break;
1417  case SD_Dynamic:
1418  JOS.attribute("storageDuration", "dynamic");
1419  break;
1420  case SD_FullExpression:
1421  JOS.attribute("storageDuration", "full expression");
1422  break;
1423  case SD_Static:
1424  JOS.attribute("storageDuration", "static");
1425  break;
1426  case SD_Thread:
1427  JOS.attribute("storageDuration", "thread");
1428  break;
1429  }
1430 
1431  attributeOnlyIfTrue("boundToLValueRef", MTE->isBoundToLvalueReference());
1432 }
1433 
1435  const CXXDependentScopeMemberExpr *DSME) {
1436  JOS.attribute("isArrow", DSME->isArrow());
1437  JOS.attribute("member", DSME->getMember().getAsString());
1438  attributeOnlyIfTrue("hasTemplateKeyword", DSME->hasTemplateKeyword());
1439  attributeOnlyIfTrue("hasExplicitTemplateArgs",
1440  DSME->hasExplicitTemplateArgs());
1441 
1442  if (DSME->getNumTemplateArgs()) {
1443  JOS.attributeArray("explicitTemplateArgs", [DSME, this] {
1444  for (const TemplateArgumentLoc &TAL : DSME->template_arguments())
1445  JOS.object(
1446  [&TAL, this] { Visit(TAL.getArgument(), TAL.getSourceRange()); });
1447  });
1448  }
1449 }
1450 
1452  if (!RE->isValueDependent())
1453  JOS.attribute("satisfied", RE->isSatisfied());
1454 }
1455 
1457  llvm::SmallString<16> Buffer;
1458  IL->getValue().toString(Buffer,
1459  /*Radix=*/10, IL->getType()->isSignedIntegerType());
1460  JOS.attribute("value", Buffer);
1461 }
1463  // FIXME: This should probably print the character literal as a string,
1464  // rather than as a numerical value. It would be nice if the behavior matched
1465  // what we do to print a string literal; right now, it is impossible to tell
1466  // the difference between 'a' and L'a' in C from the JSON output.
1467  JOS.attribute("value", CL->getValue());
1468 }
1470  JOS.attribute("value", FPL->getValueAsString(/*Radix=*/10));
1471 }
1473  llvm::SmallString<16> Buffer;
1474  FL->getValue().toString(Buffer);
1475  JOS.attribute("value", Buffer);
1476 }
1478  std::string Buffer;
1479  llvm::raw_string_ostream SS(Buffer);
1480  SL->outputString(SS);
1481  JOS.attribute("value", SS.str());
1482 }
1484  JOS.attribute("value", BLE->getValue());
1485 }
1486 
1488  attributeOnlyIfTrue("hasInit", IS->hasInitStorage());
1489  attributeOnlyIfTrue("hasVar", IS->hasVarStorage());
1490  attributeOnlyIfTrue("hasElse", IS->hasElseStorage());
1491  attributeOnlyIfTrue("isConstexpr", IS->isConstexpr());
1492 }
1493 
1495  attributeOnlyIfTrue("hasInit", SS->hasInitStorage());
1496  attributeOnlyIfTrue("hasVar", SS->hasVarStorage());
1497 }
1499  attributeOnlyIfTrue("isGNURange", CS->caseStmtIsGNURange());
1500 }
1501 
1503  JOS.attribute("name", LS->getName());
1504  JOS.attribute("declId", createPointerRepresentation(LS->getDecl()));
1505  attributeOnlyIfTrue("sideEntry", LS->isSideEntry());
1506 }
1508  JOS.attribute("targetLabelDeclId",
1509  createPointerRepresentation(GS->getLabel()));
1510 }
1511 
1513  attributeOnlyIfTrue("hasVar", WS->hasVarStorage());
1514 }
1515 
1517  // FIXME: it would be nice for the ASTNodeTraverser would handle the catch
1518  // parameter the same way for C++ and ObjC rather. In this case, C++ gets a
1519  // null child node and ObjC gets no child node.
1520  attributeOnlyIfTrue("isCatchAll", OACS->getCatchParamDecl() == nullptr);
1521 }
1522 
1524  JOS.attribute("isNull", true);
1525 }
1527  JOS.attribute("type", createQualType(TA.getAsType()));
1528 }
1530  const TemplateArgument &TA) {
1531  JOS.attribute("decl", createBareDeclRef(TA.getAsDecl()));
1532 }
1534  JOS.attribute("isNullptr", true);
1535 }
1537  JOS.attribute("value", TA.getAsIntegral().getSExtValue());
1538 }
1540  // FIXME: cannot just call dump() on the argument, as that doesn't specify
1541  // the output format.
1542 }
1544  const TemplateArgument &TA) {
1545  // FIXME: cannot just call dump() on the argument, as that doesn't specify
1546  // the output format.
1547 }
1549  const TemplateArgument &TA) {
1550  JOS.attribute("isExpr", true);
1551 }
1553  JOS.attribute("isPack", true);
1554 }
1555 
1556 StringRef JSONNodeDumper::getCommentCommandName(unsigned CommandID) const {
1557  if (Traits)
1558  return Traits->getCommandInfo(CommandID)->Name;
1559  if (const comments::CommandInfo *Info =
1561  return Info->Name;
1562  return "<invalid>";
1563 }
1564 
1566  const comments::FullComment *) {
1567  JOS.attribute("text", C->getText());
1568 }
1569 
1572  JOS.attribute("name", getCommentCommandName(C->getCommandID()));
1573 
1574  switch (C->getRenderKind()) {
1576  JOS.attribute("renderKind", "normal");
1577  break;
1579  JOS.attribute("renderKind", "bold");
1580  break;
1582  JOS.attribute("renderKind", "emphasized");
1583  break;
1585  JOS.attribute("renderKind", "monospaced");
1586  break;
1588  JOS.attribute("renderKind", "anchor");
1589  break;
1590  }
1591 
1592  llvm::json::Array Args;
1593  for (unsigned I = 0, E = C->getNumArgs(); I < E; ++I)
1594  Args.push_back(C->getArgText(I));
1595 
1596  if (!Args.empty())
1597  JOS.attribute("args", std::move(Args));
1598 }
1599 
1602  JOS.attribute("name", C->getTagName());
1603  attributeOnlyIfTrue("selfClosing", C->isSelfClosing());
1604  attributeOnlyIfTrue("malformed", C->isMalformed());
1605 
1606  llvm::json::Array Attrs;
1607  for (unsigned I = 0, E = C->getNumAttrs(); I < E; ++I)
1608  Attrs.push_back(
1609  {{"name", C->getAttr(I).Name}, {"value", C->getAttr(I).Value}});
1610 
1611  if (!Attrs.empty())
1612  JOS.attribute("attrs", std::move(Attrs));
1613 }
1614 
1617  JOS.attribute("name", C->getTagName());
1618 }
1619 
1622  JOS.attribute("name", getCommentCommandName(C->getCommandID()));
1623 
1624  llvm::json::Array Args;
1625  for (unsigned I = 0, E = C->getNumArgs(); I < E; ++I)
1626  Args.push_back(C->getArgText(I));
1627 
1628  if (!Args.empty())
1629  JOS.attribute("args", std::move(Args));
1630 }
1631 
1634  switch (C->getDirection()) {
1636  JOS.attribute("direction", "in");
1637  break;
1639  JOS.attribute("direction", "out");
1640  break;
1642  JOS.attribute("direction", "in,out");
1643  break;
1644  }
1645  attributeOnlyIfTrue("explicit", C->isDirectionExplicit());
1646 
1647  if (C->hasParamName())
1648  JOS.attribute("param", C->isParamIndexValid() ? C->getParamName(FC)
1649  : C->getParamNameAsWritten());
1650 
1651  if (C->isParamIndexValid() && !C->isVarArgParam())
1652  JOS.attribute("paramIdx", C->getParamIndex());
1653 }
1654 
1657  if (C->hasParamName())
1658  JOS.attribute("param", C->isPositionValid() ? C->getParamName(FC)
1659  : C->getParamNameAsWritten());
1660  if (C->isPositionValid()) {
1661  llvm::json::Array Positions;
1662  for (unsigned I = 0, E = C->getDepth(); I < E; ++I)
1663  Positions.push_back(C->getIndex(I));
1664 
1665  if (!Positions.empty())
1666  JOS.attribute("positions", std::move(Positions));
1667  }
1668 }
1669 
1672  JOS.attribute("name", getCommentCommandName(C->getCommandID()));
1673  JOS.attribute("closeName", C->getCloseName());
1674 }
1675 
1678  const comments::FullComment *) {
1679  JOS.attribute("text", C->getText());
1680 }
1681 
1684  JOS.attribute("text", C->getText());
1685 }
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:2183
clang::LabelStmt
LabelStmt - Represents a label, which has a substatement.
Definition: Stmt.h:1798
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:3503
clang::ObjCInterfaceDecl
Represents an ObjC class declaration.
Definition: DeclObjC.h:1148
clang::CompoundAssignOperator::getComputationLHSType
QualType getComputationLHSType() const
Definition: Expr.h:4084
clang::JSONNodeDumper::VisitUnaryTransformType
void VisitUnaryTransformType(const UnaryTransformType *UTT)
Definition: JSONNodeDumper.cpp:663
clang::ObjCTypeParamDecl::hasExplicitBound
bool hasExplicitBound() const
Whether this type parameter has an explicitly-written type bound, e.g., "T : NSView".
Definition: DeclObjC.h:639
clang::ObjCSubscriptRefExpr::isArraySubscriptRefExpr
bool isArraySubscriptRefExpr() const
Definition: ExprObjC.h:894
clang::JSONNodeDumper::VisitLinkageSpecDecl
void VisitLinkageSpecDecl(const LinkageSpecDecl *LSD)
Definition: JSONNodeDumper.cpp:937
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:1326
clang::CXXConstructExpr::CK_Complete
@ CK_Complete
Definition: ExprCXX.h:1465
clang::CXXUnresolvedConstructExpr::isListInitialization
bool isListInitialization() const
Determine whether this expression models list-initialization.
Definition: ExprCXX.h:3483
clang::ObjCPropertyImplDecl::getPropertyIvarDecl
ObjCIvarDecl * getPropertyIvarDecl() const
Definition: DeclObjC.h:2814
clang::CaseStmt
CaseStmt - Represent a case statement.
Definition: Stmt.h:1566
clang::ObjCCompatibleAliasDecl
ObjCCompatibleAliasDecl - Represents alias of a class.
Definition: DeclObjC.h:2711
clang::ObjCMessageExpr::getCallReturnType
QualType getCallReturnType(ASTContext &Ctx) const
Definition: ExprObjC.cpp:265
clang::Decl::getASTContext
ASTContext & getASTContext() const LLVM_READONLY
Definition: DeclBase.cpp:414
clang::AccessSpecDecl
Represents an access specifier followed by colon ':'.
Definition: DeclCXX.h:87
clang::comments::VerbatimLineComment
A verbatim line command.
Definition: Comment.h:943
clang::FunctionDecl::isDefaulted
bool isDefaulted() const
Whether this function is defaulted.
Definition: Decl.h:2215
clang::ObjCPropertyRefExpr::getImplicitPropertySetter
ObjCMethodDecl * getImplicitPropertySetter() const
Definition: ExprObjC.h:713
clang::JSONNodeDumper::VisitFieldDecl
void VisitFieldDecl(const FieldDecl *FD)
Definition: JSONNodeDumper.cpp:828
clang::JSONNodeDumper::VisitObjCIvarRefExpr
void VisitObjCIvarRefExpr(const ObjCIvarRefExpr *OIRE)
Definition: JSONNodeDumper.cpp:1183
clang::JSONNodeDumper::VisitObjCBoolLiteralExpr
void VisitObjCBoolLiteralExpr(const ObjCBoolLiteralExpr *OBLE)
Definition: JSONNodeDumper.cpp:1189
clang::SizeOfPackExpr::getPack
NamedDecl * getPack() const
Retrieve the parameter pack.
Definition: ExprCXX.h:4198
clang::UnresolvedLookupExpr::requiresADL
bool requiresADL() const
True if this declaration should be extended by argument-dependent lookup.
Definition: ExprCXX.h:3141
clang::CXXConstructorDecl
Represents a C++ constructor within a class.
Definition: DeclCXX.h:2401
clang::CXXBaseSpecifier::getType
QualType getType() const
Retrieves the type of the base class.
Definition: DeclCXX.h:246
clang::JSONNodeDumper::visitVerbatimLineComment
void visitVerbatimLineComment(const comments::VerbatimLineComment *C, const comments::FullComment *)
Definition: JSONNodeDumper.cpp:1682
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:4228
clang::CaseStmt::caseStmtIsGNURange
bool caseStmtIsGNURange() const
True if this case statement is of the form case LHS ...
Definition: Stmt.h:1635
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:2105
clang::comments::ParamCommandComment::Out
@ Out
Definition: Comment.h:739
Desugar
static QualType Desugar(ASTContext &Context, QualType QT, bool &ShouldAKA)
Definition: ASTDiagnostic.cpp:29
Specifiers.h
clang::VarDecl::getTLSKind
TLSKind getTLSKind() const
Definition: Decl.cpp:2035
clang::JSONNodeDumper::VisitObjCSelectorExpr
void VisitObjCSelectorExpr(const ObjCSelectorExpr *OSE)
Definition: JSONNodeDumper.cpp:1143
clang::NonTypeTemplateParmDecl::getDefaultArgStorage
const DefArgStorage & getDefaultArgStorage() const
Definition: DeclTemplate.h:1455
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:99
clang::JSONNodeDumper::visitParamCommandComment
void visitParamCommandComment(const comments::ParamCommandComment *C, const comments::FullComment *FC)
Definition: JSONNodeDumper.cpp:1632
clang::comments::InlineCommandComment::RenderEmphasized
@ RenderEmphasized
Definition: Comment.h:312
clang::TypeSourceInfo::getType
QualType getType() const
Return the type wrapped by this type source info.
Definition: Type.h:6407
clang::TemplateTemplateParmDecl::hasDefaultArgument
bool hasDefaultArgument() const
Determine whether this template parameter has a default argument.
Definition: DeclTemplate.h:1715
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:1262
clang::TemplateTypeParmDecl::getIndex
unsigned getIndex() const
Retrieve the index of the template parameter.
Definition: DeclTemplate.cpp:680
clang::TemplateTypeParmType::getDecl
TemplateTypeParmDecl * getDecl() const
Definition: Type.h:4810
clang::VectorType::SveFixedLengthPredicateVector
@ SveFixedLengthPredicateVector
is AArch64 SVE fixed-length predicate vector
Definition: Type.h:3254
clang::Type::getTypeClassName
const char * getTypeClassName() const
Definition: Type.cpp:2927
clang::SwitchStmt
SwitchStmt - This represents a 'switch' stmt.
Definition: Stmt.h:2121
clang::GenericSelectionExpr::ConstAssociation
AssociationTy< true > ConstAssociation
Definition: Expr.h:5781
clang::FunctionType::isVolatile
bool isVolatile() const
Definition: Type.h:3828
clang::JSONNodeDumper::VisitObjCProtocolDecl
void VisitObjCProtocolDecl(const ObjCProtocolDecl *D)
Definition: JSONNodeDumper.cpp:1010
clang::LinkageSpecDecl
Represents a linkage specification.
Definition: DeclCXX.h:2797
clang::JSONNodeDumper::VisitObjCBoxedExpr
void VisitObjCBoxedExpr(const ObjCBoxedExpr *OBE)
Definition: JSONNodeDumper.cpp:1133
clang::SourceRange
A trivial tuple used to represent a source range.
Definition: SourceLocation.h:212
clang::IfStmt::hasVarStorage
bool hasVarStorage() const
True if this IfStmt has storage for a variable declaration.
Definition: Stmt.h:1977
string
string(SUBSTRING ${CMAKE_CURRENT_BINARY_DIR} 0 ${PATH_LIB_START} PATH_HEAD) string(SUBSTRING $
Definition: CMakeLists.txt:22
clang::WhileStmt
WhileStmt - This represents a 'while' stmt.
Definition: Stmt.h:2312
clang::JSONNodeDumper::VisitUsingDecl
void VisitUsingDecl(const UsingDecl *UD)
Definition: JSONNodeDumper.cpp:784
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:339
clang::JSONNodeDumper::VisitTemplateTypeParmType
void VisitTemplateTypeParmType(const TemplateTypeParmType *TTPT)
Definition: JSONNodeDumper.cpp:675
clang::TemplateTypeParmDecl::getDefaultArgument
QualType getDefaultArgument() const
Retrieve the default argument, if any.
Definition: DeclTemplate.h:1248
clang::ObjCPropertyDecl::getGetterMethodDecl
ObjCMethodDecl * getGetterMethodDecl() const
Definition: DeclObjC.h:898
clang::JSONNodeDumper::VisitFloatingLiteral
void VisitFloatingLiteral(const FloatingLiteral *FL)
Definition: JSONNodeDumper.cpp:1472
clang::JSONNodeDumper::VisitObjCMessageExpr
void VisitObjCMessageExpr(const ObjCMessageExpr *OME)
Definition: JSONNodeDumper.cpp:1103
clang::NonTypeTemplateParmDecl::getIndex
unsigned getIndex() const
Get the index of the template parameter within its parameter list.
Definition: DeclTemplate.h:1165
clang::NamespaceAliasDecl
Represents a C++ namespace alias.
Definition: DeclCXX.h:2986
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:2536
clang::ConstantArrayType
Represents the canonical version of C arrays with a specified constant size.
Definition: Type.h:2929
clang::FunctionDecl::isConstexpr
bool isConstexpr() const
Whether this is a (C++11) constexpr function or constexpr constructor.
Definition: Decl.h:2283
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:1647
clang::JSONNodeDumper::VisitObjCPropertyRefExpr
void VisitObjCPropertyRefExpr(const ObjCPropertyRefExpr *OPRE)
Definition: JSONNodeDumper.cpp:1155
clang::FunctionDecl::isDeleted
bool isDeleted() const
Whether this function has been deleted.
Definition: Decl.h:2338
clang::UsingDecl::getQualifier
NestedNameSpecifier * getQualifier() const
Retrieve the nested-name-specifier that qualifies the name.
Definition: DeclCXX.h:3416
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:5164
clang::UsingDirectiveDecl
Represents C++ using-directive.
Definition: DeclCXX.h:2882
clang::JSONNodeDumper::VisitCXXNewExpr
void VisitCXXNewExpr(const CXXNewExpr *NE)
Definition: JSONNodeDumper.cpp:1250
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:2952
clang::JSONNodeDumper::VisitInjectedClassNameType
void VisitInjectedClassNameType(const InjectedClassNameType *ICNT)
Definition: JSONNodeDumper.cpp:708
clang::ObjCSubscriptRefExpr::getAtIndexMethodDecl
ObjCMethodDecl * getAtIndexMethodDecl() const
Definition: ExprObjC.h:886
clang::if
if(T->getSizeExpr()) TRY_TO(TraverseStmt(T -> getSizeExpr()))
Definition: RecursiveASTVisitor.h:1002
clang::SourceLocation
Encodes a location in the source.
Definition: SourceLocation.h:88
clang::UnaryTransformType::EnumUnderlyingType
@ EnumUnderlyingType
Definition: Type.h:4534
clang::JSONNodeDumper::VisitDependentSizedExtVectorType
void VisitDependentSizedExtVectorType(const DependentSizedExtVectorType *VT)
Definition: JSONNodeDumper.cpp:624
clang::JSONNodeDumper::VisitObjCIvarDecl
void VisitObjCIvarDecl(const ObjCIvarDecl *D)
Definition: JSONNodeDumper.cpp:956
clang::CXXNewExpr::CallInit
@ CallInit
New-expression has a C++98 paren-delimited initializer.
Definition: ExprCXX.h:2196
clang::TemplateTemplateParmDecl::getIndex
unsigned getIndex() const
Get the index of the template parameter within its parameter list.
Definition: DeclTemplate.h:1165
clang::NamedDecl
This represents a decl that may have a name.
Definition: Decl.h:249
clang::CharacterLiteral::getValue
unsigned getValue() const
Definition: Expr.h:1612
clang::SourceRange::getBegin
SourceLocation getBegin() const
Definition: SourceLocation.h:221
clang::ExprWithCleanups::getNumObjects
unsigned getNumObjects() const
Definition: ExprCXX.h:3375
clang::NOUR_Discarded
@ NOUR_Discarded
This name appears as a potential result of a discarded value expression.
Definition: Specifiers.h:159
clang::JSONNodeDumper::VisitDeclRefExpr
void VisitDeclRefExpr(const DeclRefExpr *DRE)
Definition: JSONNodeDumper.cpp:1193
clang::JSONNodeDumper::VisitIntegralTemplateArgument
void VisitIntegralTemplateArgument(const TemplateArgument &TA)
Definition: JSONNodeDumper.cpp:1536
clang::ConstantExpr::getAPValueResult
APValue getAPValueResult() const
Definition: Expr.cpp:364
clang::WhileStmt::hasVarStorage
bool hasVarStorage() const
True if this WhileStmt has storage for a condition variable.
Definition: Stmt.h:2363
clang::CXXDeleteExpr::isArrayForm
bool isArrayForm() const
Definition: ExprCXX.h:2424
clang::JSONNodeDumper::VisitCXXDependentScopeMemberExpr
void VisitCXXDependentScopeMemberExpr(const CXXDependentScopeMemberExpr *ME)
Definition: JSONNodeDumper.cpp:1434
clang::CXXConstructExpr::requiresZeroInitialization
bool requiresZeroInitialization() const
Whether this construction first requires zero-initialization before the initializer is called.
Definition: ExprCXX.h:1571
clang::VarDecl::TLS_Static
@ TLS_Static
TLS with a known-constant initializer.
Definition: Decl.h:896
clang::QualType
A (possibly-)qualified type.
Definition: Type.h:673
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:3795
clang::NonTypeTemplateParmDecl
NonTypeTemplateParmDecl - Declares a non-type template parameter, e.g., "Size" in.
Definition: DeclTemplate.h:1380
clang::Qualifiers::getAsString
std::string getAsString() const
Definition: TypePrinter.cpp:2103
clang::EST_None
@ EST_None
no exception specification
Definition: ExceptionSpecificationType.h:21
AttributeLangSupport::C
@ C
Definition: SemaDeclAttr.cpp:54
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:1711
clang::ObjCIvarDecl::getAccessControl
AccessControl getAccessControl() const
Definition: DeclObjC.h:1960
clang::CXXTypeidExpr
A C++ typeid expression (C++ [expr.typeid]), which gets the type_info that corresponds to the supplie...
Definition: ExprCXX.h:839
clang::FieldDecl
Represents a member of a struct/union/class.
Definition: Decl.h:2835
clang::VectorType::NeonVector
@ NeonVector
is ARM Neon vector
Definition: Type.h:3245
clang::FunctionProtoType::ExtProtoInfo::RefQualifier
RefQualifierKind RefQualifier
Definition: Type.h:3973
clang::ObjCTypeParamDecl::getVariance
ObjCTypeParamVariance getVariance() const
Determine the variance of this type parameter.
Definition: DeclObjC.h:622
clang::RequiresExpr
C++2a [expr.prim.req]: A requires-expression provides a concise way to express requirements on templa...
Definition: ExprConcepts.h:475
clang::EST_Dynamic
@ EST_Dynamic
throw(T1, T2)
Definition: ExceptionSpecificationType.h:23
clang::JSONNodeDumper::VisitUnaryExprOrTypeTraitExpr
void VisitUnaryExprOrTypeTraitExpr(const UnaryExprOrTypeTraitExpr *TTE)
Definition: JSONNodeDumper.cpp:1296
clang::JSONNodeDumper::VisitNamedDecl
void VisitNamedDecl(const NamedDecl *ND)
Definition: JSONNodeDumper.cpp:742
clang::DeclRefExpr::isNonOdrUse
NonOdrUseReason isNonOdrUse() const
Is this expression a non-odr-use reference, and if so, why?
Definition: Expr.h:1413
clang::ObjCCategoryDecl::getClassInterface
ObjCInterfaceDecl * getClassInterface()
Definition: DeclObjC.h:2309
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:120
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:443
clang::JSONNodeDumper::VisitNamespaceDecl
void VisitNamespaceDecl(const NamespaceDecl *ND)
Definition: JSONNodeDumper.cpp:765
clang::JSONNodeDumper::VisitTypeTemplateArgument
void VisitTypeTemplateArgument(const TemplateArgument &TA)
Definition: JSONNodeDumper.cpp:1526
clang::BinaryOperator::getOpcodeStr
StringRef getOpcodeStr() const
Definition: Expr.h:3868
clang::JSONNodeDumper::VisitCXXUnresolvedConstructExpr
void VisitCXXUnresolvedConstructExpr(const CXXUnresolvedConstructExpr *UCE)
Definition: JSONNodeDumper.cpp:1348
clang::FunctionProtoType::ExtProtoInfo::Variadic
bool Variadic
Definition: Type.h:3970
clang::UsingShadowDecl
Represents a shadow declaration implicitly introduced into a scope by a (resolved) using-declaration ...
Definition: DeclCXX.h:3187
clang::CXXNewExpr
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)".
Definition: ExprCXX.h:2139
clang::TemplateSpecializationType
Represents a type template specialization; the template must be a class template, a type alias templa...
Definition: Type.h:5103
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:1878
clang::IfStmt
IfStmt - This represents an if/then/else.
Definition: Stmt.h:1903
clang::SourceRange::isValid
bool isValid() const
Definition: SourceLocation.h:227
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:1980
clang::JSONNodeDumper::VisitFriendDecl
void VisitFriendDecl(const FriendDecl *FD)
Definition: JSONNodeDumper.cpp:951
clang::JSONNodeDumper::VisitAccessSpecDecl
void VisitAccessSpecDecl(const AccessSpecDecl *ASD)
Definition: JSONNodeDumper.cpp:947
clang::FunctionType::getExtInfo
ExtInfo getExtInfo() const
Definition: Type.h:3821
clang::GotoStmt
GotoStmt - This represents a direct goto.
Definition: Stmt.h:2576
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:4786
clang::ObjCPropertyImplDecl
ObjCPropertyImplDecl - Represents implementation declaration of a property in a class or category imp...
Definition: DeclObjC.h:2741
llvm::Optional< unsigned >
clang::JSONNodeDumper::VisitExpressionTemplateArgument
void VisitExpressionTemplateArgument(const TemplateArgument &TA)
Definition: JSONNodeDumper.cpp:1548
clang::PresumedLoc::getIncludeLoc
SourceLocation getIncludeLoc() const
Return the presumed include location of this location.
Definition: SourceLocation.h:355
clang::RQ_RValue
@ RQ_RValue
An rvalue ref-qualifier was provided (&&).
Definition: Type.h:1449
clang::JSONNodeDumper::visitTextComment
void visitTextComment(const comments::TextComment *C, const comments::FullComment *)
Definition: JSONNodeDumper.cpp:1565
clang::UnaryOperator
UnaryOperator - This represents the unary-expression's (except sizeof and alignof),...
Definition: Expr.h:2157
clang::MemberPointerType::isMemberFunctionPointer
bool isMemberFunctionPointer() const
Returns true if the member type (i.e.
Definition: Type.h:2851
clang::TagType
Definition: Type.h:4589
SourceManager.h
clang::IfStmt::hasInitStorage
bool hasInitStorage() const
True if this IfStmt has the storage for an init statement.
Definition: Stmt.h:1974
clang::NonTypeTemplateParmDecl::hasDefaultArgument
bool hasDefaultArgument() const
Determine whether this template parameter has a default argument.
Definition: DeclTemplate.h:1459
clang::MaterializeTemporaryExpr::getStorageDuration
StorageDuration getStorageDuration() const
Retrieve the storage duration for the materialized temporary.
Definition: ExprCXX.h:4487
clang::SourceManager::getPresumedLoc
PresumedLoc getPresumedLoc(SourceLocation Loc, bool UseLineDirectives=true) const
Returns the "presumed" location of a SourceLocation specifies.
Definition: SourceManager.cpp:1518
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:3248
clang::BinaryOperator::getOpcode
Opcode getOpcode() const
Definition: Expr.h:3847
clang::MaterializeTemporaryExpr::isBoundToLvalueReference
bool isBoundToLvalueReference() const
Determine whether this materialized temporary is bound to an lvalue reference; otherwise,...
Definition: ExprCXX.h:4531
clang::ObjCPropertyDecl::getPropertyImplementation
PropertyControl getPropertyImplementation() const
Definition: DeclObjC.h:909
clang::FunctionDecl::isInlineSpecified
bool isInlineSpecified() const
Determine whether the "inline" keyword was specified for this function.
Definition: Decl.h:2591
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:447
clang::JSONNodeDumper::VisitSizeOfPackExpr
void VisitSizeOfPackExpr(const SizeOfPackExpr *SOPE)
Definition: JSONNodeDumper.cpp:1303
clang::concepts::Requirement::isSatisfied
bool isSatisfied() const
Definition: ExprConcepts.h:178
clang::JSONNodeDumper::VisitMemberPointerType
void VisitMemberPointerType(const MemberPointerType *MPT)
Definition: JSONNodeDumper.cpp:737
clang::comments::HTMLEndTagComment
A closing HTML tag.
Definition: Comment.h:507
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:3082
clang::JSONNodeDumper::VisitDeclarationTemplateArgument
void VisitDeclarationTemplateArgument(const TemplateArgument &TA)
Definition: JSONNodeDumper.cpp:1529
clang::FunctionType
FunctionType - C99 6.7.5.3 - Function Declarators.
Definition: Type.h:3546
clang::SD_Automatic
@ SD_Automatic
Automatic storage duration (most local variables).
Definition: Specifiers.h:299
clang::JSONNodeDumper::VisitWhileStmt
void VisitWhileStmt(const WhileStmt *WS)
Definition: JSONNodeDumper.cpp:1512
clang::comments::CommandInfo
Information about a single command.
Definition: CommentCommandTraits.h:32
clang::ObjCPropertyDecl::Optional
@ Optional
Definition: DeclObjC.h:734
clang::CXXBindTemporaryExpr::getTemporary
CXXTemporary * getTemporary()
Definition: ExprCXX.h:1430
clang::JSONNodeDumper::VisitCXXConstructExpr
void VisitCXXConstructExpr(const CXXConstructExpr *CE)
Definition: JSONNodeDumper.cpp:1355
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:239
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:1059
clang::concepts::Requirement::containsUnexpandedParameterPack
bool containsUnexpandedParameterPack() const
Definition: ExprConcepts.h:196
clang::JSONNodeDumper::VisitUnaryOperator
void VisitUnaryOperator(const UnaryOperator *UO)
Definition: JSONNodeDumper.cpp:1216
clang::comments::InlineCommandComment::RenderMonospaced
@ RenderMonospaced
Definition: Comment.h:311
clang::SD_Dynamic
@ SD_Dynamic
Dynamic storage duration.
Definition: Specifiers.h:302
clang::ArrayType::Normal
@ Normal
Definition: Type.h:2890
clang::ObjCPropertyAttribute::kind_strong
@ kind_strong
Definition: DeclObjCCommon.h:34
clang::ObjCImplDecl::getClassInterface
const ObjCInterfaceDecl * getClassInterface() const
Definition: DeclObjC.h:2424
clang::TemplateArgument::getAsIntegral
llvm::APSInt getAsIntegral() const
Retrieve the template argument as an integral value.
Definition: TemplateBase.h:313
clang::JSONNodeDumper::VisitTemplateExpansionTemplateArgument
void VisitTemplateExpansionTemplateArgument(const TemplateArgument &TA)
Definition: JSONNodeDumper.cpp:1543
clang::RequiresExpr::isSatisfied
bool isSatisfied() const
Whether or not the requires clause is satisfied.
Definition: ExprConcepts.h:524
clang::ArrayType::Star
@ Star
Definition: Type.h:2890
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:3590
clang::Type
The base class of the type hierarchy.
Definition: Type.h:1490
clang::UsingShadowDecl::getTargetDecl
NamedDecl * getTargetDecl() const
Gets the underlying declaration which has been brought into the local scope.
Definition: DeclCXX.h:3251
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:2001
clang::TemplateTypeParmDecl::hasDefaultArgument
bool hasDefaultArgument() const
Determine whether this template parameter has a default argument.
Definition: DeclTemplate.h:1245
clang::comments::InlineCommandComment
A command with word-like arguments that is considered inline content.
Definition: Comment.h:297
clang::TypedefType
Definition: Type.h:4371
clang::Type::containsErrors
bool containsErrors() const
Whether this type is an error type.
Definition: Type.h:2168
clang::FunctionDecl::isVirtualAsWritten
bool isVirtualAsWritten() const
Whether this function is marked as virtual explicitly.
Definition: Decl.h:2181
clang::LinkageSpecDecl::lang_c
@ lang_c
Definition: DeclCXX.h:2806
clang::NamespaceDecl::getOriginalNamespace
NamespaceDecl * getOriginalNamespace()
Get the original (first) namespace declaration.
Definition: DeclCXX.cpp:2872
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:1531
clang::comments::InlineCommandComment::RenderBold
@ RenderBold
Definition: Comment.h:310
clang::Decl::isThisDeclarationReferenced
bool isThisDeclarationReferenced() const
Whether this declaration was referenced.
Definition: DeclBase.h:591
clang::JSONNodeDumper::VisitUsingEnumDecl
void VisitUsingEnumDecl(const UsingEnumDecl *UED)
Definition: JSONNodeDumper.cpp:794
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:863
clang::Decl::getLexicalDeclContext
DeclContext * getLexicalDeclContext()
getLexicalDeclContext - The declaration context where this Decl was lexically declared (LexicalDC).
Definition: DeclBase.h:843
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:1461
clang::VarDecl::isParameterPack
bool isParameterPack() const
Determine whether this variable is actually a function parameter pack or init-capture pack.
Definition: Decl.cpp:2521
clang::comments::ParamCommandComment
Doxygen \param command.
Definition: Comment.h:711
clang::JSONNodeDumper::VisitTemplateTypeParmDecl
void VisitTemplateTypeParmDecl(const TemplateTypeParmDecl *D)
Definition: JSONNodeDumper.cpp:889
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:1287
clang::IntegerLiteral
Definition: Expr.h:1488
clang::VarDecl::hasInit
bool hasInit() const
Definition: Decl.cpp:2266
clang::JSONNodeDumper::VisitSYCLUniqueStableNameExpr
void VisitSYCLUniqueStableNameExpr(const SYCLUniqueStableNameExpr *E)
Definition: JSONNodeDumper.cpp:1206
clang::NonTypeTemplateParmDecl::defaultArgumentWasInherited
bool defaultArgumentWasInherited() const
Determines whether the default argument was inherited from a previous declaration of this template.
Definition: DeclTemplate.h:1469
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:2543
clang::ElaboratedType
Represents a type that was referred to using an elaborated type keyword, e.g., struct S,...
Definition: Type.h:5403
clang::FloatingLiteral
Definition: Expr.h:1633
clang::RecordType
A helper class that allows the use of isa/cast/dyncast to detect TagType objects of structs/unions/cl...
Definition: Type.h:4613
clang::JSONNodeDumper::VisitPredefinedExpr
void VisitPredefinedExpr(const PredefinedExpr *PE)
Definition: JSONNodeDumper.cpp:1212
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:2989
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:5632
clang::VectorType::SveFixedLengthDataVector
@ SveFixedLengthDataVector
is AArch64 SVE fixed-length data vector
Definition: Type.h:3251
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:3073
clang::VarDecl::getStorageClassSpecifierString
static const char * getStorageClassSpecifierString(StorageClass SC)
Return the string used to specify the storage class SC.
Definition: Decl.cpp:1987
clang::Decl::getAccess
AccessSpecifier getAccess() const
Definition: DeclBase.h:478
clang::CXXBoolLiteralExpr::getValue
bool getValue() const
Definition: ExprCXX.h:733
clang::SizeOfPackExpr
Represents an expression that computes the length of a parameter pack.
Definition: ExprCXX.h:4127
clang::JSONNodeDumper::VisitObjCAtCatchStmt
void VisitObjCAtCatchStmt(const ObjCAtCatchStmt *OACS)
Definition: JSONNodeDumper.cpp:1516
clang::JSONNodeDumper::VisitCompoundAssignOperator
void VisitCompoundAssignOperator(const CompoundAssignOperator *CAO)
Definition: JSONNodeDumper.cpp:1227
clang::comments::CommandTraits::getBuiltinCommandInfo
static const CommandInfo * getBuiltinCommandInfo(StringRef Name)
clang::CXXBindTemporaryExpr
Represents binding an expression to a temporary.
Definition: ExprCXX.h:1412
clang::OverloadExpr::decls
llvm::iterator_range< decls_iterator > decls() const
Definition: ExprCXX.h:2978
clang::CXXDependentScopeMemberExpr::getMember
DeclarationName getMember() const
Retrieve the name of the member that this expression refers to.
Definition: ExprCXX.h:3696
clang::BlockDecl
Represents a block literal declaration, which is like an unnamed FunctionDecl.
Definition: Decl.h:4153
clang::JSONNodeDumper::VisitAutoType
void VisitAutoType(const AutoType *AT)
Definition: JSONNodeDumper.cpp:683
clang::Decl::getKind
Kind getKind() const
Definition: DeclBase.h:433
clang::ObjCInterfaceDecl::getImplementation
ObjCImplementationDecl * getImplementation() const
Definition: DeclObjC.cpp:1584
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:3803
clang::OMPClause
This is a basic class for representing single OpenMP clause.
Definition: OpenMPClause.h:54
clang::TemplateTypeParmType::getIndex
unsigned getIndex() const
Definition: Type.h:4807
clang::JSONNodeDumper::VisitObjCTypeParamDecl
void VisitObjCTypeParamDecl(const ObjCTypeParamDecl *D)
Definition: JSONNodeDumper.cpp:976
clang::ObjCInterfaceDecl::protocols
protocol_range protocols() const
Definition: DeclObjC.h:1342
clang::Type::isFromAST
bool isFromAST() const
Whether this type comes from an AST file.
Definition: Type.h:1861
clang::MacroQualifiedType::getMacroIdentifier
const IdentifierInfo * getMacroIdentifier() const
Definition: Type.h:4406
clang::MemberExpr::isArrow
bool isArrow() const
Definition: Expr.h:3346
clang::JSONNodeDumper::VisitPackExpansionType
void VisitPackExpansionType(const PackExpansionType *PET)
Definition: JSONNodeDumper.cpp:717
clang::PresumedLoc::getFilename
const char * getFilename() const
Return the presumed filename of this location.
Definition: SourceLocation.h:326
createCopyAssignmentDefinitionData
static llvm::json::Object createCopyAssignmentDefinitionData(const CXXRecordDecl *RD)
Definition: JSONNodeDumper.cpp:425
clang::FunctionType::ExtInfo::getNoReturn
bool getNoReturn() const
Definition: Type.h:3705
clang::CallExpr::usesADL
bool usesADL() const
Definition: Expr.h:2955
clang::SourceRange::getEnd
SourceLocation getEnd() const
Definition: SourceLocation.h:222
clang::CXXDependentScopeMemberExpr::template_arguments
ArrayRef< TemplateArgumentLoc > template_arguments() const
Definition: ExprCXX.h:3759
clang::JSONNodeDumper::VisitCharacterLiteral
void VisitCharacterLiteral(const CharacterLiteral *CL)
Definition: JSONNodeDumper.cpp:1462
clang::JSONNodeDumper::VisitObjCCompatibleAliasDecl
void VisitObjCCompatibleAliasDecl(const ObjCCompatibleAliasDecl *D)
Definition: JSONNodeDumper.cpp:1039
clang::VectorType
Represents a GCC generic vector type.
Definition: Type.h:3229
clang::ObjCPropertyImplDecl::Synthesize
@ Synthesize
Definition: DeclObjC.h:2744
clang::ObjCPropertyAttribute::kind_weak
@ kind_weak
Definition: DeclObjCCommon.h:33
clang::JSONNodeDumper::VisitObjCPropertyImplDecl
void VisitObjCPropertyImplDecl(const ObjCPropertyImplDecl *D)
Definition: JSONNodeDumper.cpp:1084
clang::MaterializeTemporaryExpr::getExtendingDecl
ValueDecl * getExtendingDecl()
Get the declaration which triggered the lifetime-extension of this temporary, if any.
Definition: ExprCXX.h:4512
clang::MaterializeTemporaryExpr
Represents a prvalue temporary that is written into memory so that a reference can bind to it.
Definition: ExprCXX.h:4462
clang::ReferenceType::isSpelledAsLValue
bool isSpelledAsLValue() const
Definition: Type.h:2764
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:2883
clang::ObjCPropertyDecl::getSetterMethodDecl
ObjCMethodDecl * getSetterMethodDecl() const
Definition: DeclObjC.h:901
clang::UnaryOperator::getOpcodeStr
static StringRef getOpcodeStr(Opcode Op)
getOpcodeStr - Turn an Opcode enum value into the punctuation char it corresponds to,...
Definition: Expr.cpp:1334
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:2589
clang::ObjCPropertyAttribute::kind_null_resettable
@ kind_null_resettable
Definition: DeclObjCCommon.h:39
clang::ExprWithCleanups::getObjects
ArrayRef< CleanupObject > getObjects() const
Definition: ExprCXX.h:3370
clang::Type::getAs
const T * getAs() const
Member-template getAs<specific type>'.
Definition: Type.h:7162
clang::CXXBaseSpecifier::getAccessSpecifier
AccessSpecifier getAccessSpecifier() const
Returns the access specifier for this base specifier.
Definition: DeclCXX.h:227
clang::FunctionProtoType::ExceptionSpecInfo::Exceptions
ArrayRef< QualType > Exceptions
Explicitly-specified list of exception types.
Definition: Type.h:3947
clang::comments::ParamCommandComment::In
@ In
Definition: Comment.h:738
clang::CXXRecordDecl::getNumBases
unsigned getNumBases() const
Retrieves the number of base classes of this class.
Definition: DeclCXX.h:583
clang::Decl::isInvalidDecl
bool isInvalidDecl() const
Definition: DeclBase.h:558
clang::ExprWithCleanups::CleanupObject
llvm::PointerUnion< BlockDecl *, CompoundLiteralExpr * > CleanupObject
The type of objects that are kept in the cleanup.
Definition: ExprCXX.h:3352
createMoveAssignmentDefinitionData
static llvm::json::Object createMoveAssignmentDefinitionData(const CXXRecordDecl *RD)
Definition: JSONNodeDumper.cpp:441
clang::AutoType::getKeyword
AutoTypeKeyword getKeyword() const
Definition: Type.h:5026
clang::TemplateArgument
Represents a template argument.
Definition: TemplateBase.h:62
clang::JSONNodeDumper::VisitObjCProtocolExpr
void VisitObjCProtocolExpr(const ObjCProtocolExpr *OPE)
Definition: JSONNodeDumper.cpp:1151
clang::ObjCCategoryDecl::getImplementation
ObjCCategoryImplDecl * getImplementation() const
Definition: DeclObjC.cpp:2076
clang::concepts::Requirement
A static requirement that can be used in a requires-expression to check properties of types and expre...
Definition: ExprConcepts.h:149
clang::EST_DynamicNone
@ EST_DynamicNone
throw()
Definition: ExceptionSpecificationType.h:22
clang::JSONNodeDumper::VisitIntegerLiteral
void VisitIntegerLiteral(const IntegerLiteral *IL)
Definition: JSONNodeDumper.cpp:1456
clang::VarDecl::isNRVOVariable
bool isNRVOVariable() const
Determine whether this local variable can be used with the named return value optimization (NRVO).
Definition: Decl.h:1422
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:1400
clang::Attr::getKind
attr::Kind getKind() const
Definition: Attr.h:86
clang::JSONNodeDumper::VisitObjCInterfaceDecl
void VisitObjCInterfaceDecl(const ObjCInterfaceDecl *D)
Definition: JSONNodeDumper.cpp:1020
clang::CXXRecordDecl::needsOverloadResolutionForMoveConstructor
bool needsOverloadResolutionForMoveConstructor() const
Determine whether we need to eagerly declare a defaulted move constructor for this class.
Definition: DeclCXX.h:876
clang::QualType::getSplitDesugaredType
SplitQualType getSplitDesugaredType() const
Definition: Type.h:983
clang::ObjCMessageExpr::getReceiverKind
ReceiverKind getReceiverKind() const
Determine the kind of receiver that this message is being sent to.
Definition: ExprObjC.h:1224
clang::MacroQualifiedType
Sugar type that represents a type that was qualified by a qualifier written as a macro invocation.
Definition: Type.h:4391
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:1091
clang::TypedefNameDecl::getUnderlyingType
QualType getUnderlyingType() const
Definition: Decl.h:3235
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:1501
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:3386
clang::ObjCIvarDecl::getSynthesize
bool getSynthesize() const
Definition: DeclObjC.h:1967
clang::CXXDestructorDecl
Represents a C++ destructor within a class.
Definition: DeclCXX.h:2668
clang::JSONNodeDumper::VisitIfStmt
void VisitIfStmt(const IfStmt *IS)
Definition: JSONNodeDumper.cpp:1487
clang::AutoType
Represents a C++11 auto or C++14 decltype(auto) type, possibly constrained by a type-constraint.
Definition: Type.h:4980
clang::CXXBaseSpecifier::isVirtual
bool isVirtual() const
Determines whether the base class is a virtual base class (or not).
Definition: DeclCXX.h:200
clang::DeclRefExpr::getDecl
ValueDecl * getDecl()
Definition: Expr.h:1289
clang::TemplateArgumentLoc
Location wrapper for a TemplateArgument.
Definition: TemplateBase.h:458
clang::Selector::print
void print(llvm::raw_ostream &OS) const
Prints the full selector name (e.g. "foo:bar:").
Definition: IdentifierTable.cpp:542
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:2975
clang::JSONNodeDumper::VisitNonTypeTemplateParmDecl
void VisitNonTypeTemplateParmDecl(const NonTypeTemplateParmDecl *D)
Definition: JSONNodeDumper.cpp:904
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:1597
clang::JSONNodeDumper::VisitExprWithCleanups
void VisitExprWithCleanups(const ExprWithCleanups *EWC)
Definition: JSONNodeDumper.cpp:1380
clang::ImplicitCastExpr::isPartOfExplicitCast
bool isPartOfExplicitCast() const
Definition: Expr.h:3651
clang::JSONNodeDumper::VisitMaterializeTemporaryExpr
void VisitMaterializeTemporaryExpr(const MaterializeTemporaryExpr *MTE)
Definition: JSONNodeDumper.cpp:1408
clang::JSONNodeDumper::VisitElaboratedType
void VisitElaboratedType(const ElaboratedType *ET)
Definition: JSONNodeDumper.cpp:722
clang::VarDecl
Represents a variable declaration or definition.
Definition: Decl.h:876
clang::TemplateArgumentLoc::getArgument
const TemplateArgument & getArgument() const
Definition: TemplateBase.h:507
clang::ObjCMethodDecl::getReturnType
QualType getReturnType() const
Definition: DeclObjC.h:332
clang::CompoundAssignOperator::getComputationResultType
QualType getComputationResultType() const
Definition: Expr.h:4087
clang::CXXConstructExpr::CK_Delegating
@ CK_Delegating
Definition: ExprCXX.h:1468
clang::UnresolvedUsingType
Represents the dependent type named by a dependently-scoped typename using declaration,...
Definition: Type.h:4341
clang::QualType::getAsString
std::string getAsString() const
Definition: TypePrinter.cpp:2238
clang::JSONNodeDumper::VisitObjCEncodeExpr
void VisitObjCEncodeExpr(const ObjCEncodeExpr *OEE)
Definition: JSONNodeDumper.cpp:1099
clang::comments::BlockCommandComment
A command that has zero or more word-like arguments (number of word-like arguments depends on command...
Definition: Comment.h:596
Category
int Category
Definition: Format.cpp:2336
clang::TagDecl
Represents the declaration of a struct/union/class/enum.
Definition: Decl.h:3328
clang::CXXDeleteExpr::getOperatorDelete
FunctionDecl * getOperatorDelete() const
Definition: ExprCXX.h:2437
clang::ObjCIvarDecl::Private
@ Private
Definition: DeclObjC.h:1926
clang::StringLiteral
StringLiteral - This represents a string literal expression, e.g.
Definition: Expr.h:1761
clang::SD_FullExpression
@ SD_FullExpression
Full-expression storage duration (for temporaries).
Definition: Specifiers.h:298
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:760
clang::CXXConstructExpr::getConstructor
CXXConstructorDecl * getConstructor() const
Get the constructor that this expression will (ultimately) call.
Definition: ExprCXX.h:1532
clang::ExprWithCleanups
Represents an expression – generally a full-expression – that introduces cleanups to be run at the en...
Definition: ExprCXX.h:3342
clang::ObjCCategoryImplDecl
ObjCCategoryImplDecl - An object of this class encapsulates a category @implementation declaration.
Definition: DeclObjC.h:2483
clang::PresumedLoc::getColumn
unsigned getColumn() const
Return the presumed column number of this location.
Definition: SourceLocation.h:347
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:612
clang::RQ_None
@ RQ_None
No ref-qualifier was provided.
Definition: Type.h:1443
clang::Type::isVariablyModifiedType
bool isVariablyModifiedType() const
Whether this type is a variably-modified type (C99 6.7.5).
Definition: Type.h:2192
clang::UnaryOperator::canOverflow
bool canOverflow() const
Returns true if the unary operator can cause an overflow.
Definition: Expr.h:2217
clang::CXXRecordDecl::bases
base_class_range bases()
Definition: DeclCXX.h:589
clang::JSONNodeDumper::VisitObjCCategoryDecl
void VisitObjCCategoryDecl(const ObjCCategoryDecl *D)
Definition: JSONNodeDumper.cpp:992
clang::MemberPointerType::isMemberDataPointer
bool isMemberDataPointer() const
Returns true if the member type (i.e.
Definition: Type.h:2857
clang::CXXTemporary
Represents a C++ temporary.
Definition: ExprCXX.h:1380
clang::JSONNodeDumper::VisitCaseStmt
void VisitCaseStmt(const CaseStmt *CS)
Definition: JSONNodeDumper.cpp:1498
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:3050
clang::DependentSizedExtVectorType::getAttributeLoc
SourceLocation getAttributeLoc() const
Definition: Type.h:3206
clang::JSONNodeDumper::visitVerbatimBlockComment
void visitVerbatimBlockComment(const comments::VerbatimBlockComment *C, const comments::FullComment *)
Definition: JSONNodeDumper.cpp:1670
clang::comments::ParamCommandComment::InOut
@ InOut
Definition: Comment.h:740
Base
clang::EnumDecl::isScopedUsingClassTag
bool isScopedUsingClassTag() const
Returns true if this is a C++11 scoped enumeration.
Definition: Decl.h:3789
clang::JSONNodeDumper::VisitArrayType
void VisitArrayType(const ArrayType *AT)
Definition: JSONNodeDumper.cpp:600
Label
std::string Label
Definition: UsingDeclarationsSorter.cpp:69
clang::ObjCEncodeExpr
ObjCEncodeExpr, used for @encode in Objective-C.
Definition: ExprObjC.h:409
clang::ObjCPropertyDecl::getType
QualType getType() const
Definition: DeclObjC.h:801
clang::LabelStmt::isSideEntry
bool isSideEntry() const
Definition: Stmt.h:1837
clang::TagDecl::isCompleteDefinition
bool isCompleteDefinition() const
Return true if this decl has its body fully specified.
Definition: Decl.h:3433
clang::JSONNodeDumper::VisitRecordDecl
void VisitRecordDecl(const RecordDecl *RD)
Definition: JSONNodeDumper.cpp:868
clang::ElaboratedType::getQualifier
NestedNameSpecifier * getQualifier() const
Retrieve the qualification on this type.
Definition: Type.h:5444
clang::VectorType::GenericVector
@ GenericVector
not a target-specific vector type
Definition: Type.h:3233
clang::JSONNodeDumper::VisitNullPtrTemplateArgument
void VisitNullPtrTemplateArgument(const TemplateArgument &TA)
Definition: JSONNodeDumper.cpp:1533
clang::CXXConstructExpr::hadMultipleCandidates
bool hadMultipleCandidates() const
Whether the referred constructor was resolved from an overloaded set having size greater than 1.
Definition: ExprCXX.h:1543
clang::VarDecl::TLS_None
@ TLS_None
Not a TLS variable.
Definition: Decl.h:893
clang::VectorType::AltiVecPixel
@ AltiVecPixel
is AltiVec 'vector Pixel'
Definition: Type.h:3239
clang::NamespaceDecl::isOriginalNamespace
bool isOriginalNamespace() const
Return true if this declaration is an original (first) declaration of the namespace.
Definition: DeclCXX.cpp:2886
clang::concepts::Requirement::RK_Compound
@ RK_Compound
Definition: ExprConcepts.h:153
clang::ConstantExpr
ConstantExpr - An expression that occurs in a constant context and optionally the result of evaluatin...
Definition: Expr.h:1026
clang::TemplateTypeParmDecl
Declaration of a template type parameter.
Definition: DeclTemplate.h:1174
clang::concepts::Requirement::RK_Simple
@ RK_Simple
Definition: ExprConcepts.h:153
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:544
clang::SourceManager::getDecomposedLoc
std::pair< FileID, unsigned > getDecomposedLoc(SourceLocation Loc) const
Decompose the specified location into a raw FileID + Offset pair.
Definition: SourceManager.h:1236
clang::Decl::isImplicit
bool isImplicit() const
isImplicit - Indicates whether the declaration was implicitly generated by the implementation.
Definition: DeclBase.h:563
clang::ObjCImplementationDecl::getSuperClass
const ObjCInterfaceDecl * getSuperClass() const
Definition: DeclObjC.h:2671
clang::MemberExpr::getMemberDecl
ValueDecl * getMemberDecl() const
Retrieve the member declaration to which this expression refers.
Definition: Expr.h:3245
clang::FieldDecl::isMutable
bool isMutable() const
Determines whether this field is mutable (C++ only).
Definition: Decl.h:2910
clang::QualType::split
SplitQualType split() const
Divides a QualType into its unqualified type and a set of local qualifiers.
Definition: Type.h:6433
clang::TagType::getDecl
TagDecl * getDecl() const
Definition: Type.cpp:3489
clang::VectorType::getVectorKind
VectorKind getVectorKind() const
Definition: Type.h:3276
clang::NodeStreamer::JOS
llvm::json::OStream JOS
Definition: JSONNodeDumper.h:39
clang::APIntStorage::getValue
llvm::APInt getValue() const
Definition: Expr.h:1472
clang::UsingDecl
Represents a C++ using-declaration.
Definition: DeclCXX.h:3379
clang::FunctionType::isRestrict
bool isRestrict() const
Definition: Type.h:3829
clang::JSONNodeDumper::VisitTemplateSpecializationType
void VisitTemplateSpecializationType(const TemplateSpecializationType *TST)
Definition: JSONNodeDumper.cpp:698
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:6528
clang::GenericSelectionExpr::isResultDependent
bool isResultDependent() const
Whether this generic selection is result-dependent.
Definition: Expr.h:5801
clang::ObjCCategoryDecl
ObjCCategoryDecl - Represents a category declaration.
Definition: DeclObjC.h:2264
clang::UnaryTransformType
A unary type transform, which is a type constructed from another.
Definition: Type.h:4531
clang::DeducedType::isDeduced
bool isDeduced() const
Definition: Type.h:4968
clang::TemplateTypeParmType
Definition: Type.h:4765
clang::PredefinedExpr::getIdentKindName
StringRef getIdentKindName() const
Definition: Expr.h:2021
clang::FixedPointLiteral::getValueAsString
std::string getValueAsString(unsigned Radix) const
Definition: Expr.cpp:927
clang::comments::HTMLStartTagComment
An opening HTML tag with attributes.
Definition: Comment.h:413
clang::CharacterLiteral
Definition: Expr.h:1578
clang::ArrayType::getIndexTypeQualifiers
Qualifiers getIndexTypeQualifiers() const
Definition: Type.h:2910
clang::TemplateTypeParmDecl::wasDeclaredWithTypename
bool wasDeclaredWithTypename() const
Whether this template type parameter was declared with the 'typename' keyword.
Definition: DeclTemplate.h:1237
clang::VK_LValue
@ VK_LValue
An l-value expression is a reference to an object with independent storage.
Definition: Specifiers.h:115
clang::ArrayType::getSizeModifier
ArraySizeModifier getSizeModifier() const
Definition: Type.h:2906
clang::CompoundLiteralExpr
CompoundLiteralExpr - [C99 6.5.2.5].
Definition: Expr.h:3403
clang::AccessSpecifier
AccessSpecifier
A C++ access specifier (public, private, protected), plus the special value "none" which means differ...
Definition: Specifiers.h:99
clang::JSONNodeDumper::VisitCXXBoolLiteralExpr
void VisitCXXBoolLiteralExpr(const CXXBoolLiteralExpr *BLE)
Definition: JSONNodeDumper.cpp:1483
clang::Decl::getSourceRange
virtual SourceRange getSourceRange() const LLVM_READONLY
Source range that this declaration covers.
Definition: DeclBase.h:418
clang::UnaryExprOrTypeTraitExpr::isArgumentType
bool isArgumentType() const
Definition: Expr.h:2585
clang::PresumedLoc::isInvalid
bool isInvalid() const
Return true if this object is invalid or uninitialized.
Definition: SourceLocation.h:320
clang::UsingEnumDecl
Represents a C++ using-enum-declaration.
Definition: DeclCXX.h:3579
clang::VarDecl::ListInit
@ ListInit
Direct list-initialization (C++11)
Definition: Decl.h:887
clang::JSONNodeDumper::VisitFixedPointLiteral
void VisitFixedPointLiteral(const FixedPointLiteral *FPL)
Definition: JSONNodeDumper.cpp:1469
clang::TemplateTemplateParmDecl::defaultArgumentWasInherited
bool defaultArgumentWasInherited() const
Determines whether the default argument was inherited from a previous declaration of this template.
Definition: DeclTemplate.h:1728
clang::CXXRecordDecl
Represents a C++ struct/union/class.
Definition: DeclCXX.h:255
clang::LinkageSpecDecl::getLanguage
LanguageIDs getLanguage() const
Return the language specified by this linkage specification.
Definition: DeclCXX.h:2826
clang::FunctionType::ExtInfo::getHasRegParm
bool getHasRegParm() const
Definition: Type.h:3710
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::Attr::isInherited
bool isInherited() const
Definition: Attr.h:95
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:2174
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:2182
clang::VK_PRValue
@ VK_PRValue
A pr-value expression (in the C++11 taxonomy) produces a temporary value.
Definition: Specifiers.h:111
clang::JSONNodeDumper::VisitObjCInterfaceType
void VisitObjCInterfaceType(const ObjCInterfaceType *OIT)
Definition: JSONNodeDumper.cpp:713
clang::FunctionType::getNameForCallConv
static StringRef getNameForCallConv(CallingConv CC)
Definition: Type.cpp:3132
clang::VectorType::AltiVecVector
@ AltiVecVector
is AltiVec vector
Definition: Type.h:3236
clang::CXXRecordDecl::needsOverloadResolutionForCopyConstructor
bool needsOverloadResolutionForCopyConstructor() const
Determine whether we need to eagerly declare a defaulted copy constructor for this class.
Definition: DeclCXX.h:786
clang::AttributeCommonInfo::getRange
SourceRange getRange() const
Definition: AttributeCommonInfo.h:130
clang::UnaryExprOrTypeTraitExpr::getArgumentType
QualType getArgumentType() const
Definition: Expr.h:2586
clang::FieldDecl::isBitField
bool isBitField() const
Determines whether this field is a bitfield.
Definition: Decl.h:2913
clang::EnumDecl::isScoped
bool isScoped() const
Returns true if this is a C++11 scoped enumeration.
Definition: Decl.h:3786
clang::ObjCEncodeExpr::getEncodedType
QualType getEncodedType() const
Definition: ExprObjC.h:428
clang::CXXTemporary::getDestructor
const CXXDestructorDecl * getDestructor() const
Definition: ExprCXX.h:1391
clang::NonTypeTemplateParmDecl::getDefaultArgument
Expr * getDefaultArgument() const
Retrieve the default argument, if any.
Definition: DeclTemplate.h:1462
clang::JSONNodeDumper::VisitVectorType
void VisitVectorType(const VectorType *VT)
Definition: JSONNodeDumper.cpp:630
clang::JSONNodeDumper::VisitBinaryOperator
void VisitBinaryOperator(const BinaryOperator *BO)
Definition: JSONNodeDumper.cpp:1223
clang::TypedefType::getDecl
TypedefNameDecl * getDecl() const
Definition: Type.h:4381
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:3719
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:676
clang::VarDecl::getStorageClass
StorageClass getStorageClass() const
Returns the storage class as written in the source.
Definition: Decl.h:1085
clang::CXXRecordDecl::needsOverloadResolutionForDestructor
bool needsOverloadResolutionForDestructor() const
Determine whether we need to eagerly declare a destructor for this class.
Definition: DeclCXX.h:987
clang::JSONNodeDumper::VisitUsingDirectiveDecl
void VisitUsingDirectiveDecl(const UsingDirectiveDecl *UDD)
Definition: JSONNodeDumper.cpp:773
clang::JSONNodeDumper::VisitUnresolvedUsingType
void VisitUnresolvedUsingType(const UnresolvedUsingType *UUT)
Definition: JSONNodeDumper.cpp:659
clang::JSONNodeDumper::visitHTMLStartTagComment
void visitHTMLStartTagComment(const comments::HTMLStartTagComment *C, const comments::FullComment *)
Definition: JSONNodeDumper.cpp:1600
clang::FunctionProtoType
Represents a prototype with parameter type info, e.g.
Definition: Type.h:3885
clang::ObjCProtocolExpr
ObjCProtocolExpr used for protocol expression in Objective-C.
Definition: ExprObjC.h:504
clang::ObjCCategoryDecl::protocols
protocol_range protocols() const
Definition: DeclObjC.h:2340
clang::ObjCCompatibleAliasDecl::getClassInterface
const ObjCInterfaceDecl * getClassInterface() const
Definition: DeclObjC.h:2729
clang::ASTContext::getPrintingPolicy
const clang::PrintingPolicy & getPrintingPolicy() const
Definition: ASTContext.h:686
clang::LabelStmt::getName
const char * getName() const
Definition: Stmt.cpp:412
clang::NOUR_None
@ NOUR_None
This is an odr-use.
Definition: Specifiers.h:151
clang::JSONNodeDumper::VisitUsingShadowDecl
void VisitUsingShadowDecl(const UsingShadowDecl *USD)
Definition: JSONNodeDumper.cpp:798
clang::JSONNodeDumper::VisitMemberExpr
void VisitMemberExpr(const MemberExpr *ME)
Definition: JSONNodeDumper.cpp:1235
clang::CXXDeleteExpr
Represents a delete expression for memory deallocation and destructor calls, e.g.
Definition: ExprCXX.h:2398
clang::QualType::isNull
bool isNull() const
Return true if this QualType doesn't point to a type yet.
Definition: Type.h:738
clang::comments::TParamCommandComment
Doxygen \tparam command, describes a template parameter.
Definition: Comment.h:799
clang::ObjCPropertyDecl::None
@ None
Definition: DeclObjC.h:734
FIELD1
#define FIELD1(Flag)
Definition: JSONNodeDumper.cpp:372
Lexer.h
Value
Value
Definition: UninitializedValues.cpp:102
clang::Decl
Decl - This represents one declaration (or definition), e.g.
Definition: DeclBase.h:89
clang::JSONNodeDumper::VisitVarDecl
void VisitVarDecl(const VarDecl *VD)
Definition: JSONNodeDumper.cpp:802
clang::CXXTypeidExpr::isTypeOperand
bool isTypeOperand() const
Definition: ExprCXX.h:875
clang::FunctionDecl::isPure
bool isPure() const
Whether this virtual function is pure, i.e.
Definition: Decl.h:2190
clang::AddrLabelExpr
AddrLabelExpr - The GNU address of label extension, representing &&label.
Definition: Expr.h:4300
clang::ObjCPropertyDecl
Represents one property declaration in an Objective-C interface.
Definition: DeclObjC.h:729
clang::JSONNodeDumper::VisitUnresolvedLookupExpr
void VisitUnresolvedLookupExpr(const UnresolvedLookupExpr *ULE)
Definition: JSONNodeDumper.cpp:1307
clang::LinkageSpecDecl::lang_cxx
@ lang_cxx
Definition: DeclCXX.h:2806
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:1570
clang::ConstantExpr::getResultAPValueKind
APValue::ValueKind getResultAPValueKind() const
Definition: Expr.h:1098
clang::JSONNodeDumper::VisitTemplateTemplateArgument
void VisitTemplateTemplateArgument(const TemplateArgument &TA)
Definition: JSONNodeDumper.cpp:1539
clang::ObjCCategoryImplDecl::getCategoryDecl
ObjCCategoryDecl * getCategoryDecl() const
Definition: DeclObjC.cpp:2120
clang::JSONNodeDumper::VisitCXXDeleteExpr
void VisitCXXDeleteExpr(const CXXDeleteExpr *DE)
Definition: JSONNodeDumper.cpp:1264
clang::SD_Static
@ SD_Static
Static storage duration.
Definition: Specifiers.h:301
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:1157
clang::EST_MSAny
@ EST_MSAny
Microsoft throw(...) extension.
Definition: ExceptionSpecificationType.h:24
clang::ObjCInterfaceDecl::getSuperClass
ObjCInterfaceDecl * getSuperClass() const
Definition: DeclObjC.cpp:339
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:2006
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:5256
clang::CXXDependentScopeMemberExpr
Represents a C++ member access expression where the actual member referenced could not be resolved be...
Definition: ExprCXX.h:3550
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:5457
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:2810
clang::CompoundAssignOperator
CompoundAssignOperator - For compound assignments (e.g.
Definition: Expr.h:4050
clang::CXXTypeidExpr::getTypeOperandSourceInfo
TypeSourceInfo * getTypeOperandSourceInfo() const
Retrieve source information for the type operand.
Definition: ExprCXX.h:882
clang::NOUR_Unevaluated
@ NOUR_Unevaluated
This name appears in an unevaluated operand.
Definition: Specifiers.h:153
clang::FunctionType::ExtInfo
A class which abstracts out some details necessary for making a call.
Definition: Type.h:3657
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:612
clang::ArrayType::Static
@ Static
Definition: Type.h:2890
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:3428
clang::EST_NoThrow
@ EST_NoThrow
Microsoft __declspec(nothrow) extension.
Definition: ExceptionSpecificationType.h:25
clang::JSONNodeDumper::VisitBlockDecl
void VisitBlockDecl(const BlockDecl *D)
Definition: JSONNodeDumper.cpp:1094
clang::TypedefDecl
Represents the declaration of a typedef-name via the 'typedef' type specifier.
Definition: Decl.h:3282
clang::JSONNodeDumper::VisitObjCSubscriptRefExpr
void VisitObjCSubscriptRefExpr(const ObjCSubscriptRefExpr *OSRE)
Definition: JSONNodeDumper.cpp:1172
clang::VectorType::AltiVecBool
@ AltiVecBool
is AltiVec 'vector bool ...'
Definition: Type.h:3242
clang::JSONNodeDumper::VisitTypedefDecl
void VisitTypedefDecl(const TypedefDecl *TD)
Definition: JSONNodeDumper.cpp:755
clang::ObjCPropertyImplDecl::getPropertyDecl
ObjCPropertyDecl * getPropertyDecl() const
Definition: DeclObjC.h:2805
clang::JSONNodeDumper::VisitFunctionType
void VisitFunctionType(const FunctionType *T)
Definition: JSONNodeDumper.cpp:535
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:292
clang::TemplateTypeParmDecl::isParameterPack
bool isParameterPack() const
Returns whether this is a parameter pack.
Definition: DeclTemplate.cpp:684
clang::MemberPointerType
A pointer to member type per C++ 8.3.3 - Pointers to members.
Definition: Type.h:2831
clang::ObjCPropertyAttribute::Kind
Kind
Definition: DeclObjCCommon.h:22
clang::TemplateTypeParmDecl::getDefaultArgStorage
const DefArgStorage & getDefaultArgStorage() const
Definition: DeclTemplate.h:1241
clang::ObjCTypeParamDecl
Represents the declaration of an Objective-C type parameter.
Definition: DeclObjC.h:579
clang::SwitchStmt::hasInitStorage
bool hasInitStorage() const
True if this SwitchStmt has storage for an init statement.
Definition: Stmt.h:2180
clang::JSONNodeDumper::visitTParamCommandComment
void visitTParamCommandComment(const comments::TParamCommandComment *C, const comments::FullComment *FC)
Definition: JSONNodeDumper.cpp:1655
clang::FunctionProtoType::ExceptionSpecInfo::Type
ExceptionSpecificationType Type
The kind of exception specification this is.
Definition: Type.h:3944
clang::JSONNodeDumper::VisitAddrLabelExpr
void VisitAddrLabelExpr(const AddrLabelExpr *ALE)
Definition: JSONNodeDumper.cpp:1318
clang::JSONNodeDumper::VisitLabelStmt
void VisitLabelStmt(const LabelStmt *LS)
Definition: JSONNodeDumper.cpp:1502
clang::FunctionProtoType::ExtProtoInfo::ExceptionSpec
ExceptionSpecInfo ExceptionSpec
Definition: Type.h:3974
clang::CXXThisExpr
Represents the this expression in C++.
Definition: ExprCXX.h:1142
clang::TemplateArgument::getAsDecl
ValueDecl * getAsDecl() const
Retrieve the declaration for a declaration non-type template argument.
Definition: TemplateBase.h:276
clang::UnresolvedUsingType::getDecl
UnresolvedUsingTypenameDecl * getDecl() const
Definition: Type.h:4352
clang::JSONNodeDumper::VisitConstantExpr
void VisitConstantExpr(const ConstantExpr *CE)
Definition: JSONNodeDumper.cpp:1333
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:1953
clang::LinkageSpecDecl::hasBraces
bool hasBraces() const
Determines whether this linkage specification had braces in its syntactic form.
Definition: DeclCXX.h:2835
clang::PresumedLoc::isValid
bool isValid() const
Definition: SourceLocation.h:321
clang::JSONNodeDumper::VisitInitListExpr
void VisitInitListExpr(const InitListExpr *ILE)
Definition: JSONNodeDumper.cpp:1338
clang::comments::TextComment
Plain text.
Definition: Comment.h:261
clang::JSONNodeDumper::VisitGotoStmt
void VisitGotoStmt(const GotoStmt *GS)
Definition: JSONNodeDumper.cpp:1507
clang::interp::NE
bool NE(InterpState &S, CodePtr OpPC)
Definition: Interp.h:225
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:207
clang::UnaryExprOrTypeTraitExpr::getKind
UnaryExprOrTypeTrait getKind() const
Definition: Expr.h:2575
clang::CXXConstructExpr::CK_NonVirtualBase
@ CK_NonVirtualBase
Definition: ExprCXX.h:1466
clang::VarDecl::CInit
@ CInit
C-style initialization with assignment.
Definition: Decl.h:881
clang::TemplateName::print
void print(raw_ostream &OS, const PrintingPolicy &Policy, Qualified Qual=Qualified::AsWritten) const
Print the template name.
Definition: TemplateName.cpp:223
clang::VarDecl::TLS_Dynamic
@ TLS_Dynamic
TLS with a dynamic initializer.
Definition: Decl.h:899
clang::FunctionType::ExtInfo::getRegParm
unsigned getRegParm() const
Definition: Type.h:3712
clang::IdentifierInfo::getName
StringRef getName() const
Return the actual identifier string.
Definition: IdentifierTable.h:175
clang::IfStmt::isConstexpr
bool isConstexpr() const
Definition: Stmt.h:2080
clang::FunctionProtoType::ExtProtoInfo
Extra information about a function prototype.
Definition: Type.h:3968
clang::TemplateTemplateParmDecl::getDefaultArgument
const TemplateArgumentLoc & getDefaultArgument() const
Retrieve the default argument, if any.
Definition: DeclTemplate.h:1718
clang::TemplateTypeParmType::getDepth
unsigned getDepth() const
Definition: Type.h:4806
clang::JSONNodeDumper::VisitCastExpr
void VisitCastExpr(const CastExpr *CE)
Definition: JSONNodeDumper.cpp:1276
clang
Definition: CalledOnceCheck.h:17
clang::ObjCPropertyDecl::Required
@ Required
Definition: DeclObjC.h:734
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:596
clang::InitListExpr::getInitializedFieldInUnion
FieldDecl * getInitializedFieldInUnion()
If this initializes a union, specifies which field in the union to initialize.
Definition: Expr.h:4900
clang::UnaryOperator::isPostfix
static bool isPostfix(Opcode Op)
isPostfix - Return true if this is a postfix operation, like x++.
Definition: Expr.h:2233
clang::FunctionProtoType::ExtProtoInfo::HasTrailingReturn
bool HasTrailingReturn
Definition: Type.h:3971
clang::JSONNodeDumper::VisitGenericSelectionExpr
void VisitGenericSelectionExpr(const GenericSelectionExpr *GSE)
Definition: JSONNodeDumper.cpp:1343
clang::JSONNodeDumper::VisitSwitchStmt
void VisitSwitchStmt(const SwitchStmt *SS)
Definition: JSONNodeDumper.cpp:1494
clang::JSONNodeDumper::visitVerbatimBlockLineComment
void visitVerbatimBlockLineComment(const comments::VerbatimBlockLineComment *C, const comments::FullComment *)
Definition: JSONNodeDumper.cpp:1676
clang::NonTypeTemplateParmDecl::isParameterPack
bool isParameterPack() const
Whether this parameter is a non-type template parameter pack.
Definition: DeclTemplate.h:1494
clang::Stmt
Stmt - This represents one statement.
Definition: Stmt.h:68
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:1552
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:1479
clang::UnaryOperator::getOpcode
Opcode getOpcode() const
Definition: Expr.h:2199
clang::CXXConstructExpr::CK_VirtualBase
@ CK_VirtualBase
Definition: ExprCXX.h:1467
clang::JSONNodeDumper::VisitMacroQualifiedType
void VisitMacroQualifiedType(const MacroQualifiedType *MQT)
Definition: JSONNodeDumper.cpp:733
clang::ObjCPropertyAttribute::kind_nonatomic
@ kind_nonatomic
Definition: DeclObjCCommon.h:30
clang::comments::VerbatimBlockComment
A verbatim block command (e.
Definition: Comment.h:891
clang::GenericSelectionExpr
Represents a C11 generic selection.
Definition: Expr.h:5623
clang::EnumDecl::getIntegerType
QualType getIntegerType() const
Return the integer type this enum decl corresponds to.
Definition: Decl.h:3746
clang::ObjCProtocolDecl
Represents an Objective-C protocol declaration.
Definition: DeclObjC.h:2040
clang::Expr::getType
QualType getType() const
Definition: Expr.h:141
clang::JSONNodeDumper::VisitRequiresExpr
void VisitRequiresExpr(const RequiresExpr *RE)
Definition: JSONNodeDumper.cpp:1451
clang::tok::isLiteral
bool isLiteral(TokenKind K)
Return true if this is a "literal" kind, like a numeric constant, string, etc.
Definition: TokenKinds.h:86
clang::CXXBaseSpecifier
Represents a base class of a C++ class.
Definition: DeclCXX.h:147
clang::Attr
Attr - This represents one attribute.
Definition: Attr.h:46
clang::TypeSourceInfo
A container of type source information.
Definition: Type.h:6396
clang::CXXDependentScopeMemberExpr::getNumTemplateArgs
unsigned getNumTemplateArgs() const
Retrieve the number of template arguments provided as part of this template-id.
Definition: ExprCXX.h:3752
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:1620
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:2199
clang::RQ_LValue
@ RQ_LValue
An lvalue ref-qualifier was provided (&).
Definition: Type.h:1446
clang::SD_Thread
@ SD_Thread
Thread storage duration.
Definition: Specifiers.h:300
clang::JSONNodeDumper::VisitTagType
void VisitTagType(const TagType *TT)
Definition: JSONNodeDumper.cpp:671
clang::JSONNodeDumper::VisitObjCCategoryImplDecl
void VisitObjCCategoryImplDecl(const ObjCCategoryImplDecl *D)
Definition: JSONNodeDumper.cpp:1004
clang::CXXNewExpr::NoInit
@ NoInit
New-expression has no initializer as written.
Definition: ExprCXX.h:2193
clang::JSONNodeDumper::VisitObjCPropertyDecl
void VisitObjCPropertyDecl(const ObjCPropertyDecl *D)
Definition: JSONNodeDumper.cpp:1045
clang::JSONNodeDumper::VisitCXXTypeidExpr
void VisitCXXTypeidExpr(const CXXTypeidExpr *CTE)
Definition: JSONNodeDumper.cpp:1323
FIELD2
#define FIELD2(Name, Flag)
Definition: JSONNodeDumper.cpp:371
clang::FunctionDecl::isVariadic
bool isVariadic() const
Whether this function is variadic.
Definition: Decl.cpp:2903
clang::JSONNodeDumper::VisitEnumConstantDecl
void VisitEnumConstantDecl(const EnumConstantDecl *ECD)
Definition: JSONNodeDumper.cpp:863
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:1816
clang::SYCLUniqueStableNameExpr::getTypeSourceInfo
TypeSourceInfo * getTypeSourceInfo()
Definition: Expr.h:2067
clang::JSONNodeDumper::VisitCallExpr
void VisitCallExpr(const CallExpr *CE)
Definition: JSONNodeDumper.cpp:1292
clang::ObjCBoolLiteralExpr::getValue
bool getValue() const
Definition: ExprObjC.h:101
clang::ImplicitCastExpr
ImplicitCastExpr - Allows us to explicitly represent implicit type conversions, which have no direct ...
Definition: Expr.h:3618
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:3162
clang::UnaryTransformType::getUTTKind
UTTKind getUTTKind() const
Definition: Type.h:4559
clang::JSONNodeDumper::VisitCXXRecordDecl
void VisitCXXRecordDecl(const CXXRecordDecl *RD)
Definition: JSONNodeDumper.cpp:873
clang::RecordType::getDecl
RecordDecl * getDecl() const
Definition: Type.h:4623
clang::QualType::getAsOpaquePtr
void * getAsOpaquePtr() const
Definition: Type.h:718
clang::FunctionType::isConst
bool isConst() const
Definition: Type.h:3827
clang::CXXDependentScopeMemberExpr::isArrow
bool isArrow() const
Determine whether this member expression used the '->' operator; otherwise, it used the '.
Definition: ExprCXX.h:3657
clang::ReferenceType
Base for LValueReferenceType and RValueReferenceType.
Definition: Type.h:2751
clang::ObjCPropertyAttribute::kind_getter
@ kind_getter
Definition: DeclObjCCommon.h:25
clang::concepts::Requirement::getKind
RequirementKind getKind() const
Definition: ExprConcepts.h:176
clang::SourceManager::getExpansionLoc
SourceLocation getExpansionLoc(SourceLocation Loc) const
Given a SourceLocation object Loc, return the expansion location referenced by the ID.
Definition: SourceManager.h:1158
clang::comments::InlineCommandComment::RenderNormal
@ RenderNormal
Definition: Comment.h:309
clang::CXXDeleteExpr::isGlobalDelete
bool isGlobalDelete() const
Definition: ExprCXX.h:2423
clang::VectorType::getNumElements
unsigned getNumElements() const
Definition: Type.h:3271
clang::JSONNodeDumper::VisitTemplateTemplateParmDecl
void VisitTemplateTemplateParmDecl(const TemplateTemplateParmDecl *D)
Definition: JSONNodeDumper.cpp:920
clang::CXXDependentScopeMemberExpr::hasExplicitTemplateArgs
bool hasExplicitTemplateArgs() const
Determines whether this member expression actually had a C++ template argument list explicitly specif...
Definition: ExprCXX.h:3731
clang::getAccessSpelling
llvm::StringRef getAccessSpelling(AccessSpecifier AS)
Definition: Specifiers.h:369
clang::JSONNodeDumper::VisitNamespaceAliasDecl
void VisitNamespaceAliasDecl(const NamespaceAliasDecl *NAD)
Definition: JSONNodeDumper.cpp:778
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:1146
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:6573
clang::PresumedLoc
Represents an unpacked "presumed" location which can be presented to the user.
Definition: SourceLocation.h:304
clang::JSONNodeDumper::VisitEnumDecl
void VisitEnumDecl(const EnumDecl *ED)
Definition: JSONNodeDumper.cpp:855
clang::concepts::Requirement::RK_Nested
@ RK_Nested
Definition: ExprConcepts.h:153
clang::DefaultArgStorage::getInheritedFrom
const ParmDecl * getInheritedFrom() const
Get the parameter from which we inherit the default argument, if any.
Definition: DeclTemplate.h:359
clang::SourceManager::getSpellingLineNumber
unsigned getSpellingLineNumber(SourceLocation Loc, bool *Invalid=nullptr) const
Definition: SourceManager.cpp:1444
clang::JSONNodeDumper::VisitConstantArrayType
void VisitConstantArrayType(const ConstantArrayType *CAT)
Definition: JSONNodeDumper.cpp:617
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:1376
clang::TypeAliasDecl
Represents the declaration of a typedef-name via a C++11 alias-declaration.
Definition: Decl.h:3302
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:3382
clang::SC_None
@ SC_None
Definition: Specifiers.h:226
clang::ValueDecl::getType
QualType getType() const
Definition: Decl.h:687
clang::InjectedClassNameType::getDecl
CXXRecordDecl * getDecl() const
Definition: Type.cpp:3581
clang::CastExpr::getConversionFunction
NamedDecl * getConversionFunction() const
If this cast applies a user-defined conversion, retrieve the conversion function that it invokes.
Definition: Expr.cpp:1935
clang::PackExpansionType::getNumExpansions
Optional< unsigned > getNumExpansions() const
Retrieve the number of expansions that this pack expansion will generate, if known.
Definition: Type.h:5657
clang::SourceManager::getExpansionLineNumber
unsigned getExpansionLineNumber(SourceLocation Loc, bool *Invalid=nullptr) const
Definition: SourceManager.cpp:1450
clang::CXXConstructExpr::isListInitialization
bool isListInitialization() const
Whether this constructor call was written as list-initialization.
Definition: ExprCXX.h:1551
clang::ObjCIvarRefExpr::isFreeIvar
bool isFreeIvar() const
Definition: ExprObjC.h:585
clang::comments::InlineCommandComment::RenderAnchor
@ RenderAnchor
Definition: Comment.h:313
clang::TemplateTypeParmType::isParameterPack
bool isParameterPack() const
Definition: Type.h:4808
clang::CXXDeleteExpr::isArrayFormAsWritten
bool isArrayFormAsWritten() const
Definition: ExprCXX.h:2425
clang::CXXCtorInitializer
Represents a C++ base or member initializer.
Definition: DeclCXX.h:2172
clang::JSONNodeDumper::visitHTMLEndTagComment
void visitHTMLEndTagComment(const comments::HTMLEndTagComment *C, const comments::FullComment *)
Definition: JSONNodeDumper.cpp:1615
clang::BlockDecl::Capture
A class which contains all the information about a particular captured value.
Definition: Decl.h:4159
clang::JSONNodeDumper::VisitObjCMethodDecl
void VisitObjCMethodDecl(const ObjCMethodDecl *D)
Definition: JSONNodeDumper.cpp:969
clang::concepts::Requirement::RK_Type
@ RK_Type
Definition: ExprConcepts.h:153
clang::FunctionDecl::isDeletedAsWritten
bool isDeletedAsWritten() const
Definition: Decl.h:2342
clang::CastExpr::getCastKindName
static const char * getCastKindName(CastKind CK)
Definition: Expr.cpp:1886
clang::FunctionProtoType::getExtProtoInfo
ExtProtoInfo getExtProtoInfo() const
Definition: Type.h:4106
clang::ObjCPropertyDecl::getPropertyAttributes
ObjCPropertyAttribute::Kind getPropertyAttributes() const
Definition: DeclObjC.h:812
clang::CastExpr
CastExpr - Base class for type casts, including both implicit casts (ImplicitCastExpr) and explicit c...
Definition: Expr.h:3473
clang::ObjCInterfaceType::getDecl
ObjCInterfaceDecl * getDecl() const
Get the declaration of this interface.
Definition: Type.h:6030
clang::DependentSizedExtVectorType
Represents an extended vector type where either the type or size is dependent.
Definition: Type.h:3189
clang::CXXThisExpr::isImplicit
bool isImplicit() const
Definition: ExprCXX.h:1159
clang::TemplateTemplateParmDecl::getDepth
unsigned getDepth() const
Get the nesting depth of the template parameter.
Definition: DeclTemplate.h:1157
clang::Decl::getLocation
SourceLocation getLocation() const
Definition: DeclBase.h:430
clang::SplitQualType::Quals
Qualifiers Quals
The local qualifiers.
Definition: Type.h:617
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:589
clang::DeclRefExpr
A reference to a declared variable, function, enum, etc.
Definition: Expr.h:1217
clang::AddrLabelExpr::getLabel
LabelDecl * getLabel() const
Definition: Expr.h:4323
clang::NamespaceDecl
Represent a C++ namespace.
Definition: Decl.h:542
clang::FunctionDecl
Represents a function declaration or definition.
Definition: Decl.h:1856
clang::JSONNodeDumper::VisitNullTemplateArgument
void VisitNullTemplateArgument(const TemplateArgument &TA)
Definition: JSONNodeDumper.cpp:1523
clang::TemplateTypeParmDecl::getDepth
unsigned getDepth() const
Retrieve the depth of the template parameter.
Definition: DeclTemplate.cpp:676
clang::BlockDecl::capturesCXXThis
bool capturesCXXThis() const
Definition: Decl.h:4285
clang::RecordDecl
Represents a struct/union/class.
Definition: Decl.h:3859
JSONNodeDumper.h
clang::CallExpr
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
Definition: Expr.h:2795
clang::FunctionType::ExtInfo::getProducesResult
bool getProducesResult() const
Definition: Type.h:3706
clang::FunctionDecl::getStorageClass
StorageClass getStorageClass() const
Returns the storage class as written in the source.
Definition: Decl.h:2580
clang::ObjCInterfaceType
Interfaces are the core concept in Objective-C for object oriented design.
Definition: Type.h:6016
clang::NamespaceDecl::isInline
bool isInline() const
Returns true if this is an inline namespace declaration.
Definition: Decl.h:603
clang::CXXConstructExpr
Represents a call to a C++ constructor.
Definition: ExprCXX.h:1460
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:1580
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:156
clang::concepts::Requirement::isDependent
bool isDependent() const
Definition: ExprConcepts.h:191
clang::JSONNodeDumper::VisitCXXThisExpr
void VisitCXXThisExpr(const CXXThisExpr *TE)
Definition: JSONNodeDumper.cpp:1272
clang::ASTContext::getLangOpts
const LangOptions & getLangOpts() const
Definition: ASTContext.h:757
clang::JSONNodeDumper::VisitObjCImplementationDecl
void VisitObjCImplementationDecl(const ObjCImplementationDecl *D)
Definition: JSONNodeDumper.cpp:1032
clang::JSONNodeDumper::VisitFunctionDecl
void VisitFunctionDecl(const FunctionDecl *FD)
Definition: JSONNodeDumper.cpp:837
clang::UsingDirectiveDecl::getNominatedNamespace
NamespaceDecl * getNominatedNamespace()
Returns the namespace nominated by this using-directive.
Definition: DeclCXX.cpp:2841
clang::JSONNodeDumper::VisitStringLiteral
void VisitStringLiteral(const StringLiteral *SL)
Definition: JSONNodeDumper.cpp:1477
clang::ObjCMethodDecl::isVariadic
bool isVariadic() const
Definition: DeclObjC.h:436
clang::CXXConstructExpr::isElidable
bool isElidable() const
Whether this construction is elidable.
Definition: ExprCXX.h:1538
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:3609
clang::CXXDependentScopeMemberExpr::hasTemplateKeyword
bool hasTemplateKeyword() const
Determines whether the member name was preceded by the template keyword.
Definition: ExprCXX.h:3727
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:1562
clang::CXXUnresolvedConstructExpr::getTypeAsWritten
QualType getTypeAsWritten() const
Retrieve the type that is being constructed, as specified in the source code.
Definition: ExprCXX.h:3464
clang::TemplateArgument::getAsType
QualType getAsType() const
Retrieve the type for a type template argument.
Definition: TemplateBase.h:269
clang::VarDecl::CallInit
@ CallInit
Call-style initialization (C++98)
Definition: Decl.h:884
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:1666
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:439
clang::TemplateSpecializationType::getTemplateName
TemplateName getTemplateName() const
Retrieve the name of the template that we are specializing.
Definition: Type.h:5179
clang::SYCLUniqueStableNameExpr
Definition: Expr.h:2050
clang::SourceManager::getSpellingLoc
SourceLocation getSpellingLoc(SourceLocation Loc) const
Given a SourceLocation object, return the spelling location referenced by the ID.
Definition: SourceManager.h:1206
clang::StorageClass
StorageClass
Storage classes.
Definition: Specifiers.h:224
clang::NamedDecl::getName
StringRef getName() const
Get the name of identifier for this declaration as a StringRef.
Definition: Decl.h:276
clang::AutoTypeKeyword::DecltypeAuto
@ DecltypeAuto
decltype(auto)