6#include "llvm/ADT/StringExtras.h" 
   10void JSONNodeDumper::addPreviousDeclaration(
const Decl *D) {
 
   12#define DECL(DERIVED, BASE)                                                    \ 
   14    return writePreviousDeclImpl(cast<DERIVED##Decl>(D)); 
   15#define ABSTRACT_DECL(DECL) 
   16#include "clang/AST/DeclNodes.inc" 
   20  llvm_unreachable(
"Decl that isn't part of DeclNodes.inc!");
 
   24  const char *AttrName = 
nullptr;
 
   28    AttrName = #X"Attr";                                                       \ 
   30#include "clang/Basic/AttrList.inc" 
   33  JOS.attribute(
"id", createPointerRepresentation(A));
 
   34  JOS.attribute(
"kind", AttrName);
 
   35  JOS.attributeObject(
"range", [A, 
this] { writeSourceRange(A->
getRange()); });
 
   37  attributeOnlyIfTrue(
"implicit", A->
isImplicit());
 
 
   52  JOS.attribute(
"id", createPointerRepresentation(S));
 
   54  JOS.attributeObject(
"range",
 
   57  if (
const auto *E = dyn_cast<Expr>(S)) {
 
   58    JOS.attribute(
"type", createQualType(E->getType()));
 
   59    const char *Category = 
nullptr;
 
   60    switch (E->getValueKind()) {
 
   61    case VK_LValue: Category = 
"lvalue"; 
break;
 
   62    case VK_XValue: Category = 
"xvalue"; 
break;
 
   67    JOS.attribute(
"valueCategory", Category);
 
 
   73  JOS.attribute(
"id", createPointerRepresentation(
T));
 
   78  JOS.attribute(
"kind", (llvm::Twine(
T->getTypeClassName()) + 
"Type").str());
 
   79  JOS.attribute(
"type", createQualType(
QualType(
T, 0), 
false));
 
   80  attributeOnlyIfTrue(
"containsErrors", 
T->containsErrors());
 
   81  attributeOnlyIfTrue(
"isDependent", 
T->isDependentType());
 
   82  attributeOnlyIfTrue(
"isInstantiationDependent",
 
   83                      T->isInstantiationDependentType());
 
   84  attributeOnlyIfTrue(
"isVariablyModified", 
T->isVariablyModifiedType());
 
   85  attributeOnlyIfTrue(
"containsUnexpandedPack",
 
   86                      T->containsUnexpandedParameterPack());
 
   87  attributeOnlyIfTrue(
"isImported", 
T->isFromAST());
 
 
   92  JOS.attribute(
"id", createPointerRepresentation(
T.getAsOpaquePtr()));
 
   93  JOS.attribute(
"kind", 
"QualType");
 
   94  JOS.attribute(
"type", createQualType(
T));
 
   95  JOS.attribute(
"qualifiers", 
T.split().Quals.getAsString());
 
 
  101  JOS.attribute(
"kind",
 
  107  JOS.attribute(
"type",
 
  109  JOS.attributeObject(
"range",
 
 
  114  JOS.attribute(
"id", createPointerRepresentation(D));
 
  120  JOS.attributeObject(
"loc",
 
  121                      [D, 
this] { writeSourceLocation(D->
getLocation()); });
 
  122  JOS.attributeObject(
"range",
 
  124  attributeOnlyIfTrue(
"isImplicit", D->
isImplicit());
 
  128    JOS.attribute(
"isUsed", 
true);
 
  130    JOS.attribute(
"isReferenced", 
true);
 
  132  if (
const auto *ND = dyn_cast<NamedDecl>(D))
 
  133    attributeOnlyIfTrue(
"isHidden", !ND->isUnconditionallyVisible());
 
  139    const auto *ParentDeclContextDecl = dyn_cast<Decl>(D->
getDeclContext());
 
  140    JOS.attribute(
"parentDeclContextId",
 
  141                  createPointerRepresentation(ParentDeclContextDecl));
 
  144  addPreviousDeclaration(D);
 
 
  153  JOS.attribute(
"id", createPointerRepresentation(
C));
 
  154  JOS.attribute(
"kind", 
C->getCommentKindName());
 
  155  JOS.attributeObject(
"loc",
 
  156                      [
C, 
this] { writeSourceLocation(
C->getLocation()); });
 
  157  JOS.attributeObject(
"range",
 
  158                      [
C, 
this] { writeSourceRange(
C->getSourceRange()); });
 
 
  164                           const Decl *From, StringRef Label) {
 
  165  JOS.attribute(
"kind", 
"TemplateArgument");
 
  167    JOS.attributeObject(
"range", [R, 
this] { writeSourceRange(R); });
 
  170    JOS.attribute(Label.empty() ? 
"fromDecl" : Label, createBareDeclRef(From));
 
 
  176  JOS.attribute(
"kind", 
"CXXCtorInitializer");
 
  177  if (
Init->isAnyMemberInitializer())
 
  178    JOS.attribute(
"anyInit", createBareDeclRef(
Init->getAnyMember()));
 
  179  else if (
Init->isBaseInitializer())
 
  180    JOS.attribute(
"baseInit",
 
  182  else if (
Init->isDelegatingInitializer())
 
  183    JOS.attribute(
"delegatingInit",
 
  184                  createQualType(
Init->getTypeSourceInfo()->getType()));
 
  186    llvm_unreachable(
"Unknown initializer type");
 
 
  194  JOS.attribute(
"kind", 
"Capture");
 
  195  attributeOnlyIfTrue(
"byref", 
C.isByRef());
 
  196  attributeOnlyIfTrue(
"nested", 
C.isNested());
 
  198    JOS.attribute(
"var", createBareDeclRef(
C.getVariable()));
 
 
  202  JOS.attribute(
"associationKind", A.getTypeSourceInfo() ? 
"case" : 
"default");
 
  203  attributeOnlyIfTrue(
"selected", A.isSelected());
 
 
  212    JOS.attribute(
"kind", 
"TypeRequirement");
 
  215    JOS.attribute(
"kind", 
"SimpleRequirement");
 
  218    JOS.attribute(
"kind", 
"CompoundRequirement");
 
  221    JOS.attribute(
"kind", 
"NestedRequirement");
 
  225  if (
auto *ER = dyn_cast<concepts::ExprRequirement>(R))
 
  226    attributeOnlyIfTrue(
"noexcept", ER->hasNoexceptRequirement());
 
  228  attributeOnlyIfTrue(
"isDependent", R->
isDependent());
 
  231  attributeOnlyIfTrue(
"containsUnexpandedPack",
 
 
  237  llvm::raw_string_ostream OS(Str);
 
  238  Value.printPretty(OS, Ctx, Ty);
 
  239  JOS.attribute(
"value", Str);
 
 
  243  JOS.attribute(
"kind", 
"ConceptReference");
 
  246    JOS.attributeArray(
"templateArgsAsWritten", [Args, 
this] {
 
  249            [&TAL, 
this] { 
Visit(TAL.getArgument(), TAL.getSourceRange()); });
 
  252  JOS.attributeObject(
"loc",
 
  253                      [CR, 
this] { writeSourceLocation(CR->
getLocation()); });
 
  254  JOS.attributeObject(
"range",
 
 
  258void JSONNodeDumper::writeIncludeStack(
PresumedLoc Loc, 
bool JustFirst) {
 
  262  JOS.attributeBegin(
"includedFrom");
 
  277  PresumedLoc Presumed = SM.getPresumedLoc(Loc);
 
  278  unsigned ActualLine = IsSpelling ? SM.getSpellingLineNumber(Loc)
 
  279                                   : SM.getExpansionLineNumber(Loc);
 
  280  StringRef ActualFile = SM.getBufferName(Loc);
 
  283    JOS.attribute(
"offset", SM.getDecomposedLoc(Loc).second);
 
  284    if (LastLocFilename != ActualFile) {
 
  285      JOS.attribute(
"file", ActualFile);
 
  286      JOS.attribute(
"line", ActualLine);
 
  287    } 
else if (LastLocLine != ActualLine)
 
  288      JOS.attribute(
"line", ActualLine);
 
  291    if (PresumedFile != ActualFile && LastLocPresumedFilename != PresumedFile)
 
  292      JOS.attribute(
"presumedFile", PresumedFile);
 
  294    unsigned PresumedLine = Presumed.
getLine();
 
  295    if (ActualLine != PresumedLine && LastLocPresumedLine != PresumedLine)
 
  296      JOS.attribute(
"presumedLine", PresumedLine);
 
  299    JOS.attribute(
"tokLen",
 
  301    LastLocFilename = ActualFile;
 
  302    LastLocPresumedFilename = PresumedFile;
 
  303    LastLocPresumedLine = PresumedLine;
 
  304    LastLocLine = ActualLine;
 
  309    writeIncludeStack(SM.getPresumedLoc(Presumed.
getIncludeLoc()),
 
  315  SourceLocation Spelling = SM.getSpellingLoc(Loc);
 
  316  SourceLocation Expansion = SM.getExpansionLoc(Loc);
 
  318  if (Expansion != Spelling) {
 
  321    JOS.attributeObject(
"spellingLoc", [Spelling, 
this] {
 
  322      writeBareSourceLocation(Spelling,  
true);
 
  324    JOS.attributeObject(
"expansionLoc", [Expansion, Loc, 
this] {
 
  325      writeBareSourceLocation(Expansion,  
false);
 
  328      if (SM.isMacroArgExpansion(Loc))
 
  329        JOS.attribute(
"isMacroArgExpansion", 
true);
 
  332    writeBareSourceLocation(Spelling,  
true);
 
  335void JSONNodeDumper::writeSourceRange(
SourceRange R) {
 
  336  JOS.attributeObject(
"begin",
 
  337                      [R, 
this] { writeSourceLocation(R.
getBegin()); });
 
  338  JOS.attributeObject(
"end", [R, 
this] { writeSourceLocation(R.
getEnd()); });
 
  341std::string JSONNodeDumper::createPointerRepresentation(
const void *Ptr) {
 
  345  return "0x" + llvm::utohexstr(
reinterpret_cast<uint64_t>(Ptr), 
true);
 
  348llvm::json::Object JSONNodeDumper::createQualType(
QualType QT, 
bool Desugar) {
 
  349  SplitQualType SQT = QT.
split();
 
  351  llvm::json::Object 
Ret{{
"qualType", SQTS}};
 
  353  if (Desugar && !QT.
isNull()) {
 
  358        Ret[
"desugaredQualType"] = DSQTS;
 
  360    if (
const auto *TT = QT->
getAs<TypedefType>())
 
  361      Ret[
"typeAliasDeclId"] = createPointerRepresentation(TT->getDecl());
 
  366void JSONNodeDumper::writeBareDeclRef(
const Decl *D) {
 
  367  JOS.attribute(
"id", createPointerRepresentation(D));
 
  372  if (
const auto *ND = dyn_cast<NamedDecl>(D))
 
  373    JOS.attribute(
"name", ND->getDeclName().getAsString());
 
  374  if (
const auto *VD = dyn_cast<ValueDecl>(D))
 
  375    JOS.attribute(
"type", createQualType(VD->getType()));
 
  378llvm::json::Object JSONNodeDumper::createBareDeclRef(
const Decl *D) {
 
  379  llvm::json::Object 
Ret{{
"id", createPointerRepresentation(D)}};
 
  384  if (
const auto *ND = dyn_cast<NamedDecl>(D))
 
  385    Ret[
"name"] = ND->getDeclName().getAsString();
 
  386  if (
const auto *VD = dyn_cast<ValueDecl>(D))
 
  387    Ret[
"type"] = createQualType(VD->getType());
 
  391llvm::json::Array JSONNodeDumper::createCastPath(
const CastExpr *
C) {
 
  392  llvm::json::Array 
Ret;
 
  396  for (
auto I = 
C->path_begin(), E = 
C->path_end(); I != E; ++I) {
 
  397    const CXXBaseSpecifier *
Base = *I;
 
  399        Base->getType()->castAsCanonical<RecordType>()->getDecl());
 
  401    llvm::json::Object Val{{
"name", RD->getName()}};
 
  402    if (
Base->isVirtual())
 
  403      Val[
"isVirtual"] = 
true;
 
  404    Ret.push_back(std::move(Val));
 
  409#define FIELD2(Name, Flag)  if (RD->Flag()) Ret[Name] = true 
  410#define FIELD1(Flag)        FIELD2(#Flag, Flag) 
  412static llvm::json::Object
 
  414  llvm::json::Object Ret;
 
  416  FIELD2(
"exists", hasDefaultConstructor);
 
  417  FIELD2(
"trivial", hasTrivialDefaultConstructor);
 
  418  FIELD2(
"nonTrivial", hasNonTrivialDefaultConstructor);
 
  419  FIELD2(
"userProvided", hasUserProvidedDefaultConstructor);
 
  420  FIELD2(
"isConstexpr", hasConstexprDefaultConstructor);
 
  421  FIELD2(
"needsImplicit", needsImplicitDefaultConstructor);
 
  422  FIELD2(
"defaultedIsConstexpr", defaultedDefaultConstructorIsConstexpr);
 
 
  427static llvm::json::Object
 
  429  llvm::json::Object Ret;
 
  431  FIELD2(
"simple", hasSimpleCopyConstructor);
 
  432  FIELD2(
"trivial", hasTrivialCopyConstructor);
 
  433  FIELD2(
"nonTrivial", hasNonTrivialCopyConstructor);
 
  434  FIELD2(
"userDeclared", hasUserDeclaredCopyConstructor);
 
  435  FIELD2(
"hasConstParam", hasCopyConstructorWithConstParam);
 
  436  FIELD2(
"implicitHasConstParam", implicitCopyConstructorHasConstParam);
 
  437  FIELD2(
"needsImplicit", needsImplicitCopyConstructor);
 
  438  FIELD2(
"needsOverloadResolution", needsOverloadResolutionForCopyConstructor);
 
  440    FIELD2(
"defaultedIsDeleted", defaultedCopyConstructorIsDeleted);
 
 
  445static llvm::json::Object
 
  447  llvm::json::Object Ret;
 
  449  FIELD2(
"exists", hasMoveConstructor);
 
  450  FIELD2(
"simple", hasSimpleMoveConstructor);
 
  451  FIELD2(
"trivial", hasTrivialMoveConstructor);
 
  452  FIELD2(
"nonTrivial", hasNonTrivialMoveConstructor);
 
  453  FIELD2(
"userDeclared", hasUserDeclaredMoveConstructor);
 
  454  FIELD2(
"needsImplicit", needsImplicitMoveConstructor);
 
  455  FIELD2(
"needsOverloadResolution", needsOverloadResolutionForMoveConstructor);
 
  457    FIELD2(
"defaultedIsDeleted", defaultedMoveConstructorIsDeleted);
 
 
  462static llvm::json::Object
 
  464  llvm::json::Object Ret;
 
  466  FIELD2(
"simple", hasSimpleCopyAssignment);
 
  467  FIELD2(
"trivial", hasTrivialCopyAssignment);
 
  468  FIELD2(
"nonTrivial", hasNonTrivialCopyAssignment);
 
  469  FIELD2(
"hasConstParam", hasCopyAssignmentWithConstParam);
 
  470  FIELD2(
"implicitHasConstParam", implicitCopyAssignmentHasConstParam);
 
  471  FIELD2(
"userDeclared", hasUserDeclaredCopyAssignment);
 
  472  FIELD2(
"needsImplicit", needsImplicitCopyAssignment);
 
  473  FIELD2(
"needsOverloadResolution", needsOverloadResolutionForCopyAssignment);
 
 
  478static llvm::json::Object
 
  480  llvm::json::Object Ret;
 
  482  FIELD2(
"exists", hasMoveAssignment);
 
  483  FIELD2(
"simple", hasSimpleMoveAssignment);
 
  484  FIELD2(
"trivial", hasTrivialMoveAssignment);
 
  485  FIELD2(
"nonTrivial", hasNonTrivialMoveAssignment);
 
  486  FIELD2(
"userDeclared", hasUserDeclaredMoveAssignment);
 
  487  FIELD2(
"needsImplicit", needsImplicitMoveAssignment);
 
  488  FIELD2(
"needsOverloadResolution", needsOverloadResolutionForMoveAssignment);
 
 
  493static llvm::json::Object
 
  495  llvm::json::Object Ret;
 
  497  FIELD2(
"simple", hasSimpleDestructor);
 
  498  FIELD2(
"irrelevant", hasIrrelevantDestructor);
 
  499  FIELD2(
"trivial", hasTrivialDestructor);
 
  500  FIELD2(
"nonTrivial", hasNonTrivialDestructor);
 
  501  FIELD2(
"userDeclared", hasUserDeclaredDestructor);
 
  502  FIELD2(
"needsImplicit", needsImplicitDestructor);
 
  503  FIELD2(
"needsOverloadResolution", needsOverloadResolutionForDestructor);
 
  505    FIELD2(
"defaultedIsDeleted", defaultedDestructorIsDeleted);
 
 
  511JSONNodeDumper::createCXXRecordDefinitionData(
const CXXRecordDecl *RD) {
 
  512  llvm::json::Object 
Ret;
 
  520  FIELD1(isTriviallyCopyable);
 
  527  FIELD1(hasUserDeclaredConstructor);
 
  528  FIELD1(hasConstexprNonCopyMoveConstructor);
 
  530  FIELD1(hasVariantMembers);
 
  531  FIELD2(
"canConstDefaultInit", allowConstDefaultInit);
 
  548  if (AccessSpelling.empty())
 
  550  return AccessSpelling.str();
 
  555  llvm::json::Object 
Ret;
 
  559  Ret[
"writtenAccess"] =
 
  562    Ret[
"isVirtual"] = 
true;
 
  564    Ret[
"isPackExpansion"] = 
true;
 
  570  JOS.attribute(
"aliasee", AA->getAliasee());
 
 
  574  JOS.attribute(
"cleanup_function", createBareDeclRef(CA->getFunctionDecl()));
 
 
  578  if (!DA->getMessage().empty())
 
  579    JOS.attribute(
"message", DA->getMessage());
 
  580  if (!DA->getReplacement().empty())
 
  581    JOS.attribute(
"replacement", DA->getReplacement());
 
 
  585  if (!UA->getMessage().empty())
 
  586    JOS.attribute(
"message", UA->getMessage());
 
 
  590  JOS.attribute(
"section_name", SA->getName());
 
 
  594  JOS.attribute(
"visibility", VisibilityAttr::ConvertVisibilityTypeToStr(
 
  595                                  VA->getVisibility()));
 
 
  599  JOS.attribute(
"tls_model", TA->getModel());
 
 
  603  JOS.attribute(
"decl", createBareDeclRef(TT->
getDecl()));
 
  605    JOS.attribute(
"type", createQualType(TT->
desugar()));
 
 
  609  JOS.attribute(
"decl", createBareDeclRef(TT->
getDecl()));
 
  610  JOS.attribute(
"type", createQualType(TT->
desugar()));
 
 
  625  attributeOnlyIfTrue(
"const", 
T->isConst());
 
  626  attributeOnlyIfTrue(
"volatile", 
T->isVolatile());
 
  627  attributeOnlyIfTrue(
"restrict", 
T->isRestrict());
 
  628  attributeOnlyIfTrue(
"variadic", E.
Variadic);
 
  630  case RQ_LValue: 
JOS.attribute(
"refQualifier", 
"&"); 
break;
 
  631  case RQ_RValue: 
JOS.attribute(
"refQualifier", 
"&&"); 
break;
 
  637    JOS.attribute(
"exceptionSpec", 
"throw");
 
  638    llvm::json::Array Types;
 
  640      Types.push_back(createQualType(QT));
 
  641    JOS.attribute(
"exceptionTypes", std::move(Types));
 
  644    JOS.attribute(
"exceptionSpec", 
"throw");
 
  645    JOS.attribute(
"throwsAny", 
true);
 
  648    JOS.attribute(
"exceptionSpec", 
"noexcept");
 
  652    JOS.attribute(
"exceptionSpec", 
"noexcept");
 
  653    JOS.attribute(
"conditionEvaluatesTo",
 
  659    JOS.attribute(
"exceptionSpec", 
"nothrow");
 
 
  681    JOS.attribute(
"sizeModifier", 
"*");
 
  684    JOS.attribute(
"sizeModifier", 
"static");
 
  692    JOS.attribute(
"indexTypeQualifiers", Str);
 
 
  705      "attrLoc", [VT, 
this] { writeSourceLocation(VT->
getAttributeLoc()); });
 
 
  714    JOS.attribute(
"vectorKind", 
"altivec");
 
  717    JOS.attribute(
"vectorKind", 
"altivec pixel");
 
  720    JOS.attribute(
"vectorKind", 
"altivec bool");
 
  723    JOS.attribute(
"vectorKind", 
"neon");
 
  726    JOS.attribute(
"vectorKind", 
"neon poly");
 
  729    JOS.attribute(
"vectorKind", 
"fixed-length sve data vector");
 
  732    JOS.attribute(
"vectorKind", 
"fixed-length sve predicate vector");
 
  735    JOS.attribute(
"vectorKind", 
"fixed-length rvv data vector");
 
  741    JOS.attribute(
"vectorKind", 
"fixed-length rvv mask vector");
 
 
  747  JOS.attribute(
"decl", createBareDeclRef(UUT->
getDecl()));
 
 
  751  switch (UTT->getUTTKind()) {
 
  752#define TRANSFORM_TYPE_TRAIT_DEF(Enum, Trait)                                  \ 
  753  case UnaryTransformType::Enum:                                               \ 
  754    JOS.attribute("transformKind", #Trait);                                    \ 
  756#include "clang/Basic/TransformTypeTraits.def" 
 
  763    llvm::raw_string_ostream OS(Str);
 
  764    Qualifier.print(OS, PrintPolicy, 
true);
 
  765    JOS.attribute(
"qualifier", Str);
 
  767  JOS.attribute(
"decl", createBareDeclRef(TT->getDecl()));
 
  768  if (TT->isTagOwned())
 
  769    JOS.attribute(
"isTagOwned", 
true);
 
 
  773    const TemplateTypeParmType *TTPT) {
 
  774  JOS.attribute(
"depth", TTPT->getDepth());
 
  775  JOS.attribute(
"index", TTPT->getIndex());
 
  776  attributeOnlyIfTrue(
"isPack", TTPT->isParameterPack());
 
  777  JOS.attribute(
"decl", createBareDeclRef(TTPT->getDecl()));
 
 
  781    const SubstTemplateTypeParmType *STTPT) {
 
  782  JOS.attribute(
"index", STTPT->getIndex());
 
  783  if (
auto PackIndex = STTPT->getPackIndex())
 
  784    JOS.attribute(
"pack_index", *PackIndex);
 
 
  788    const SubstTemplateTypeParmPackType *
T) {
 
  789  JOS.attribute(
"index", 
T->getIndex());
 
 
  793  JOS.attribute(
"undeduced", !AT->isDeduced());
 
  794  switch (AT->getKeyword()) {
 
  796    JOS.attribute(
"typeKeyword", 
"auto");
 
  799    JOS.attribute(
"typeKeyword", 
"decltype(auto)");
 
  802    JOS.attribute(
"typeKeyword", 
"__auto_type");
 
 
  808    const TemplateSpecializationType *TST) {
 
  809  attributeOnlyIfTrue(
"isAlias", TST->isTypeAlias());
 
  812  llvm::raw_string_ostream OS(Str);
 
  813  TST->getTemplateName().print(OS, PrintPolicy);
 
  814  JOS.attribute(
"templateName", Str);
 
 
  818    const InjectedClassNameType *ICNT) {
 
  819  JOS.attribute(
"decl", createBareDeclRef(ICNT->getDecl()));
 
 
  823  JOS.attribute(
"decl", createBareDeclRef(OIT->
getDecl()));
 
 
  828    JOS.attribute(
"numExpansions", *N);
 
 
  856    auto *VD = dyn_cast<VarDecl>(ND);
 
  857    if (VD && VD->hasLocalStorage())
 
  864    std::string MangledName = ASTNameGen.getName(ND);
 
  865    if (!MangledName.empty())
 
  866      JOS.attribute(
"mangledName", MangledName);
 
 
  882  attributeOnlyIfTrue(
"isInline", ND->
isInline());
 
  883  attributeOnlyIfTrue(
"isNested", ND->
isNested());
 
  885    JOS.attribute(
"originalNamespace", createBareDeclRef(ND->
getFirstDecl()));
 
 
  889  JOS.attribute(
"nominatedNamespace",
 
 
  895  JOS.attribute(
"aliasedNamespace",
 
 
  902    llvm::raw_string_ostream SOS(Name);
 
  906  JOS.attribute(
"name", Name);
 
 
  919  JOS.attribute(
"type", createQualType(VD->
getType()));
 
  920  if (
const auto *
P = dyn_cast<ParmVarDecl>(VD))
 
  921    attributeOnlyIfTrue(
"explicitObjectParameter",
 
  922                        P->isExplicitObjectParameter());
 
  933  attributeOnlyIfTrue(
"inline", VD->
isInline());
 
  934  attributeOnlyIfTrue(
"constexpr", VD->
isConstexpr());
 
  942      JOS.attribute(
"init", 
"paren-list");
 
  948    JOS.attribute(
"TemplateInstantiationPattern",
 
  949                  createPointerRepresentation(Instance));
 
 
  954  JOS.attribute(
"type", createQualType(FD->
getType()));
 
  955  attributeOnlyIfTrue(
"mutable", FD->
isMutable());
 
  957  attributeOnlyIfTrue(
"isBitfield", FD->
isBitField());
 
 
  963  JOS.attribute(
"type", createQualType(FD->
getType()));
 
  971  attributeOnlyIfTrue(
"constexpr", FD->
isConstexpr());
 
  972  attributeOnlyIfTrue(
"variadic", FD->
isVariadic());
 
  976    JOS.attribute(
"explicitlyDefaulted",
 
  977                  FD->
isDeleted() ? 
"deleted" : 
"default");
 
  980    JOS.attribute(
"deletedMessage", Msg->getString());
 
  983    JOS.attribute(
"TemplateInstantiationPattern",
 
  984                  createPointerRepresentation(Instance));
 
 
  992    JOS.attribute(
"scopedEnumTag",
 
  995    JOS.attribute(
"TemplateInstantiationPattern",
 
  996                  createPointerRepresentation(Instance));
 
 
 1000  JOS.attribute(
"type", createQualType(ECD->
getType()));
 
 
 1011  if (
const auto *CTSD = dyn_cast<ClassTemplateSpecializationDecl>(RD)) {
 
 1012    if (CTSD->hasStrictPackMatch())
 
 1013      JOS.attribute(
"strict-pack-match", 
true);
 
 1017    JOS.attribute(
"TemplateInstantiationPattern",
 
 1018                  createPointerRepresentation(Instance));
 
 1024  JOS.attribute(
"definitionData", createCXXRecordDefinitionData(RD));
 
 1026    JOS.attributeArray(
"bases", [
this, RD] {
 
 1027      for (
const auto &Spec : RD->
bases())
 
 1028        JOS.value(createCXXBaseSpecifier(Spec));
 
 
 1035  JOS.attribute(
"bufferKind", D->
isCBuffer() ? 
"cbuffer" : 
"tbuffer");
 
 
 1046    JOS.attributeObject(
"defaultArg", [=] {
 
 
 1056  JOS.attribute(
"type", createQualType(D->
getType()));
 
 1062    JOS.attributeObject(
"defaultArg", [=] {
 
 
 1077    JOS.attributeObject(
"defaultArg", [=] {
 
 1080            InheritedFrom ? InheritedFrom->getSourceRange() : 
SourceLocation{},
 
 
 1096  JOS.attribute(
"language", Lang);
 
 1097  attributeOnlyIfTrue(
"hasBraces", LSD->
hasBraces());
 
 
 1101  JOS.attribute(
"access", createAccessSpecifier(ASD->
getAccess()));
 
 
 1106    JOS.attribute(
"type", createQualType(
T->getType()));
 
 
 1112  JOS.attribute(
"type", createQualType(D->
getType()));
 
 
 1127  attributeOnlyIfTrue(
"variadic", D->
isVariadic());
 
 
 1138    JOS.attribute(
"variance", 
"covariant");
 
 1141    JOS.attribute(
"variance", 
"contravariant");
 
 
 1151  llvm::json::Array Protocols;
 
 1153    Protocols.push_back(createBareDeclRef(
P));
 
 1154  if (!Protocols.empty())
 
 1155    JOS.attribute(
"protocols", std::move(Protocols));
 
 
 1167  llvm::json::Array Protocols;
 
 1169    Protocols.push_back(createBareDeclRef(
P));
 
 1170  if (!Protocols.empty())
 
 1171    JOS.attribute(
"protocols", std::move(Protocols));
 
 
 1179  llvm::json::Array Protocols;
 
 1181    Protocols.push_back(createBareDeclRef(
P));
 
 1182  if (!Protocols.empty())
 
 1183    JOS.attribute(
"protocols", std::move(Protocols));
 
 
 1201  JOS.attribute(
"type", createQualType(D->
getType()));
 
 1215    attributeOnlyIfTrue(
"readonly",
 
 1218    attributeOnlyIfTrue(
"readwrite",
 
 1222    attributeOnlyIfTrue(
"nonatomic",
 
 1227    attributeOnlyIfTrue(
"unsafe_unretained",
 
 1231    attributeOnlyIfTrue(
"nullability",
 
 1233    attributeOnlyIfTrue(
"null_resettable",
 
 
 1249  attributeOnlyIfTrue(
"variadic", D->
isVariadic());
 
 
 1263  llvm::raw_string_ostream OS(Str);
 
 1266  JOS.attribute(
"selector", Str);
 
 1270    JOS.attribute(
"receiverKind", 
"instance");
 
 1273    JOS.attribute(
"receiverKind", 
"class");
 
 1277    JOS.attribute(
"receiverKind", 
"super (instance)");
 
 1281    JOS.attribute(
"receiverKind", 
"super (class)");
 
 1287  if (OME->
getType() != CallReturnTy)
 
 1288    JOS.attribute(
"callReturnType", createQualType(CallReturnTy));
 
 
 1294    llvm::raw_string_ostream OS(Str);
 
 1296    MD->getSelector().print(OS);
 
 1297    JOS.attribute(
"selector", Str);
 
 
 1303  llvm::raw_string_ostream OS(Str);
 
 1306  JOS.attribute(
"selector", Str);
 
 
 1310  JOS.attribute(
"protocol", createBareDeclRef(OPE->
getProtocol()));
 
 
 1315    JOS.attribute(
"propertyKind", 
"implicit");
 
 1317      JOS.attribute(
"getter", createBareDeclRef(MD));
 
 1319      JOS.attribute(
"setter", createBareDeclRef(MD));
 
 1321    JOS.attribute(
"propertyKind", 
"explicit");
 
 
 1332  JOS.attribute(
"subscriptKind",
 
 1336    JOS.attribute(
"getter", createBareDeclRef(MD));
 
 1338    JOS.attribute(
"setter", createBareDeclRef(MD));
 
 
 1342  JOS.attribute(
"decl", createBareDeclRef(OIRE->
getDecl()));
 
 1343  attributeOnlyIfTrue(
"isFreeIvar", OIRE->
isFreeIvar());
 
 
 1348  JOS.attribute(
"value", OBLE->
getValue() ? 
"__objc_yes" : 
"__objc_no");
 
 
 1352  JOS.attribute(
"referencedDecl", createBareDeclRef(DRE->
getDecl()));
 
 1354    JOS.attribute(
"foundReferencedDecl",
 
 
 1367  JOS.attribute(
"typeSourceInfo",
 
 
 1385    JOS.attribute(
"canOverflow", 
false);
 
 
 1396  JOS.attribute(
"computeResultType",
 
 
 1406  JOS.attribute(
"referencedMemberDecl", createPointerRepresentation(VD));
 
 
 1416  attributeOnlyIfTrue(
"isGlobal", NE->isGlobalNew());
 
 1417  attributeOnlyIfTrue(
"isArray", NE->isArray());
 
 1418  attributeOnlyIfTrue(
"isPlacement", NE->getNumPlacementArgs() != 0);
 
 1419  switch (NE->getInitializationStyle()) {
 
 1423    JOS.attribute(
"initStyle", 
"call");
 
 1426    JOS.attribute(
"initStyle", 
"list");
 
 1430    JOS.attribute(
"operatorNewDecl", createBareDeclRef(FD));
 
 1432    JOS.attribute(
"operatorDeleteDecl", createBareDeclRef(FD));
 
 
 1436  attributeOnlyIfTrue(
"isArray", DE->
isArrayForm());
 
 1439    JOS.attribute(
"operatorDeleteDecl", createBareDeclRef(FD));
 
 
 1443  attributeOnlyIfTrue(
"implicit", TE->
isImplicit());
 
 
 1448  llvm::json::Array Path = createCastPath(CE);
 
 1450    JOS.attribute(
"path", std::move(Path));
 
 1454    JOS.attribute(
"conversionFunc", createBareDeclRef(ND));
 
 
 1463  attributeOnlyIfTrue(
"adl", CE->
usesADL());
 
 
 1482  JOS.attributeArray(
"lookups", [
this, ULE] {
 
 1484      JOS.value(createBareDeclRef(D));
 
 
 1490  JOS.attribute(
"labelDeclId", createPointerRepresentation(ALE->
getLabel()));
 
 
 1497    JOS.attribute(
"typeArg", createQualType(Unadjusted));
 
 1498    if (Adjusted != Unadjusted)
 
 1499      JOS.attribute(
"adjustedTypeArg", createQualType(Adjusted));
 
 
 1510    JOS.attribute(
"field", createBareDeclRef(FD));
 
 
 1527  JOS.attribute(
"ctorType", createQualType(Ctor->
getType()));
 
 1528  attributeOnlyIfTrue(
"elidable", CE->
isElidable());
 
 1537    JOS.attribute(
"constructionKind", 
"complete");
 
 1540    JOS.attribute(
"constructionKind", 
"delegating");
 
 1543    JOS.attribute(
"constructionKind", 
"non-virtual base");
 
 1546    JOS.attribute(
"constructionKind", 
"virtual base");
 
 
 1552  attributeOnlyIfTrue(
"cleanupsHaveSideEffects",
 
 1555    JOS.attributeArray(
"cleanups", [
this, EWC] {
 
 1557        if (
auto *BD = dyn_cast<BlockDecl *>(CO)) {
 
 1558          JOS.value(createBareDeclRef(BD));
 
 1559        } 
else if (
auto *CLE = dyn_cast<CompoundLiteralExpr *>(CO)) {
 
 1560          llvm::json::Object Obj;
 
 1561          Obj[
"id"] = createPointerRepresentation(CLE);
 
 1562          Obj[
"kind"] = CLE->getStmtClassName();
 
 1563          JOS.value(std::move(Obj));
 
 1565          llvm_unreachable(
"unexpected cleanup object type");
 
 
 1574  JOS.attribute(
"temp", createPointerRepresentation(Temp));
 
 1576    JOS.attribute(
"dtor", createBareDeclRef(Dtor));
 
 
 1582    JOS.attribute(
"extendingDecl", createBareDeclRef(VD));
 
 1586    JOS.attribute(
"storageDuration", 
"automatic");
 
 1589    JOS.attribute(
"storageDuration", 
"dynamic");
 
 1592    JOS.attribute(
"storageDuration", 
"full expression");
 
 1595    JOS.attribute(
"storageDuration", 
"static");
 
 1598    JOS.attribute(
"storageDuration", 
"thread");
 
 
 1618  attributeOnlyIfTrue(
"hasExplicitTemplateArgs",
 
 1622    JOS.attributeArray(
"explicitTemplateArgs", [DSME, 
this] {
 
 1625            [&TAL, 
this] { 
Visit(TAL.getArgument(), TAL.getSourceRange()); });
 
 
 1639  JOS.attribute(
"value", Buffer);
 
 
 1646  JOS.attribute(
"value", 
CL->getValue());
 
 
 1654  JOS.attribute(
"value", Buffer);
 
 
 1658  llvm::raw_string_ostream SS(Buffer);
 
 1660  JOS.attribute(
"value", Buffer);
 
 
 1670  attributeOnlyIfTrue(
"isConstexpr", IS->
isConstexpr());
 
 1671  attributeOnlyIfTrue(
"isConsteval", IS->
isConsteval());
 
 
 1685  JOS.attribute(
"declId", createPointerRepresentation(LS->
getDecl()));
 
 1686  attributeOnlyIfTrue(
"sideEntry", LS->
isSideEntry());
 
 
 1691    JOS.attribute(
"targetLabelDeclId",
 
 
 1696  JOS.attribute(
"targetLabelDeclId",
 
 1697                createPointerRepresentation(GS->
getLabel()));
 
 
 1712  JOS.attribute(
"isNull", 
true);
 
 
 1719  JOS.attribute(
"decl", createBareDeclRef(TA.
getAsDecl()));
 
 
 1722  JOS.attribute(
"isNullptr", 
true);
 
 
 1742  JOS.attribute(
"isExpr", 
true);
 
 1744    JOS.attribute(
"isCanonical", 
true);
 
 
 1747  JOS.attribute(
"isPack", 
true);
 
 
 1750StringRef JSONNodeDumper::getCommentCommandName(
unsigned CommandID)
 const {
 
 1752    return Traits->getCommandInfo(CommandID)->Name;
 
 1761  JOS.attribute(
"text", 
C->getText());
 
 
 1766  JOS.attribute(
"name", getCommentCommandName(
C->getCommandID()));
 
 1768  switch (
C->getRenderKind()) {
 
 1770    JOS.attribute(
"renderKind", 
"normal");
 
 1773    JOS.attribute(
"renderKind", 
"bold");
 
 1776    JOS.attribute(
"renderKind", 
"emphasized");
 
 1779    JOS.attribute(
"renderKind", 
"monospaced");
 
 1782    JOS.attribute(
"renderKind", 
"anchor");
 
 1786  llvm::json::Array Args;
 
 1787  for (
unsigned I = 0, E = 
C->getNumArgs(); I < E; ++I)
 
 1788    Args.push_back(
C->getArgText(I));
 
 1791    JOS.attribute(
"args", std::move(Args));
 
 
 1796  JOS.attribute(
"name", 
C->getTagName());
 
 1797  attributeOnlyIfTrue(
"selfClosing", 
C->isSelfClosing());
 
 1798  attributeOnlyIfTrue(
"malformed", 
C->isMalformed());
 
 1800  llvm::json::Array Attrs;
 
 1801  for (
unsigned I = 0, E = 
C->getNumAttrs(); I < E; ++I)
 
 1803        {{
"name", 
C->getAttr(I).Name}, {
"value", 
C->getAttr(I).Value}});
 
 1806    JOS.attribute(
"attrs", std::move(Attrs));
 
 
 1811  JOS.attribute(
"name", 
C->getTagName());
 
 
 1816  JOS.attribute(
"name", getCommentCommandName(
C->getCommandID()));
 
 1818  llvm::json::Array Args;
 
 1819  for (
unsigned I = 0, E = 
C->getNumArgs(); I < E; ++I)
 
 1820    Args.push_back(
C->getArgText(I));
 
 1823    JOS.attribute(
"args", std::move(Args));
 
 
 1828  switch (
C->getDirection()) {
 
 1830    JOS.attribute(
"direction", 
"in");
 
 1833    JOS.attribute(
"direction", 
"out");
 
 1836    JOS.attribute(
"direction", 
"in,out");
 
 1839  attributeOnlyIfTrue(
"explicit", 
C->isDirectionExplicit());
 
 1841  if (
C->hasParamName())
 
 1842    JOS.attribute(
"param", 
C->isParamIndexValid() ? 
C->getParamName(FC)
 
 1843                                                  : 
C->getParamNameAsWritten());
 
 1845  if (
C->isParamIndexValid() && !
C->isVarArgParam())
 
 1846    JOS.attribute(
"paramIdx", 
C->getParamIndex());
 
 
 1851  if (
C->hasParamName())
 
 1852    JOS.attribute(
"param", 
C->isPositionValid() ? 
C->getParamName(FC)
 
 1853                                                : 
C->getParamNameAsWritten());
 
 1854  if (
C->isPositionValid()) {
 
 1855    llvm::json::Array Positions;
 
 1856    for (
unsigned I = 0, E = 
C->getDepth(); I < E; ++I)
 
 1857      Positions.push_back(
C->getIndex(I));
 
 1859    if (!Positions.empty())
 
 1860      JOS.attribute(
"positions", std::move(Positions));
 
 
 1866  JOS.attribute(
"name", getCommentCommandName(
C->getCommandID()));
 
 1867  JOS.attribute(
"closeName", 
C->getCloseName());
 
 
 1873  JOS.attribute(
"text", 
C->getText());
 
 
 1878  JOS.attribute(
"text", 
C->getText());
 
 
 1882  llvm::json::Object Ret;
 
 1883#define FP_OPTION(NAME, TYPE, WIDTH, PREVIOUS)                                 \ 
 1884  if (FPO.has##NAME##Override())                                               \ 
 1885    Ret.try_emplace(#NAME, static_cast<unsigned>(FPO.get##NAME##Override())); 
 1886#include "clang/Basic/FPOptions.def" 
static bool isTrivial(ASTContext &Ctx, const Expr *E)
Checks if the expression is constant or does not have non-trivial function calls.
 
static llvm::json::Object createMoveAssignmentDefinitionData(const CXXRecordDecl *RD)
 
#define FIELD2(Name, Flag)
 
static llvm::json::Object createCopyAssignmentDefinitionData(const CXXRecordDecl *RD)
 
static llvm::json::Object createCopyConstructorDefinitionData(const CXXRecordDecl *RD)
 
static llvm::json::Object createDestructorDefinitionData(const CXXRecordDecl *RD)
 
static llvm::json::Object createDefaultConstructorDefinitionData(const CXXRecordDecl *RD)
 
static llvm::json::Object createMoveConstructorDefinitionData(const CXXRecordDecl *RD)
 
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....
 
Defines the SourceManager interface.
 
Defines various enumerations that describe declaration and type specifiers.
 
C Language Family Type Representation.
 
llvm::APInt getValue() const
 
APValue - This class implements a discriminated union of [uninitialized] [APSInt] [APFloat],...
 
@ None
There is no such object (it's outside its lifetime).
 
const clang::PrintingPolicy & getPrintingPolicy() const
 
Represents an access specifier followed by colon ':'.
 
AddrLabelExpr - The GNU address of label extension, representing &&label.
 
LabelDecl * getLabel() const
 
Represents an array type, per C99 6.7.5.2 - Array Declarators.
 
ArraySizeModifier getSizeModifier() const
 
Qualifiers getIndexTypeQualifiers() const
 
AtomicExpr - Variadic atomic builtins: __atomic_exchange, __atomic_fetch_*, __atomic_load,...
 
StringRef getOpAsString() const
 
Attr - This represents one attribute.
 
attr::Kind getKind() const
 
bool isImplicit() const
Returns true if the attribute has been implicitly created instead of explicitly written by the user.
 
SourceRange getRange() const
 
A builtin binary operation expression such as "x + y" or "x <= y".
 
static StringRef getOpcodeStr(Opcode Op)
getOpcodeStr - Turn an Opcode enum value into the punctuation char it corresponds to,...
 
A class which contains all the information about a particular captured value.
 
Represents a block literal declaration, which is like an unnamed FunctionDecl.
 
bool capturesCXXThis() const
 
Represents a base class of a C++ class.
 
AccessSpecifier getAccessSpecifierAsWritten() const
Retrieves the access specifier as written in the source code (which may mean that no access specifier...
 
bool isVirtual() const
Determines whether the base class is a virtual base class (or not).
 
QualType getType() const
Retrieves the type of the base class.
 
bool isPackExpansion() const
Determine whether this base specifier is a pack expansion.
 
AccessSpecifier getAccessSpecifier() const
Returns the access specifier for this base specifier.
 
Represents binding an expression to a temporary.
 
CXXTemporary * getTemporary()
 
A boolean literal, per ([C++ lex.bool] Boolean literals).
 
Represents a call to a C++ constructor.
 
bool isElidable() const
Whether this construction is elidable.
 
bool hadMultipleCandidates() const
Whether the referred constructor was resolved from an overloaded set having size greater than 1.
 
bool isStdInitListInitialization() const
Whether this constructor call was written as list-initialization, but was interpreted as forming a st...
 
bool isImmediateEscalating() const
 
bool requiresZeroInitialization() const
Whether this construction first requires zero-initialization before the initializer is called.
 
CXXConstructorDecl * getConstructor() const
Get the constructor that this expression will (ultimately) call.
 
bool isListInitialization() const
Whether this constructor call was written as list-initialization.
 
CXXConstructionKind getConstructionKind() const
Determine whether this constructor is actually constructing a base class (rather than a complete obje...
 
Represents a C++ constructor within a class.
 
Represents a C++ base or member initializer.
 
A default argument (C++ [dcl.fct.default]).
 
bool hasRewrittenInit() const
 
A use of a default initializer in a constructor or in aggregate initialization.
 
bool hasRewrittenInit() const
 
Represents a delete expression for memory deallocation and destructor calls, e.g.
 
FunctionDecl * getOperatorDelete() const
 
bool isGlobalDelete() const
 
bool isArrayFormAsWritten() const
 
Represents a C++ member access expression where the actual member referenced could not be resolved be...
 
bool isArrow() const
Determine whether this member expression used the '->' operator; otherwise, it used the '.
 
unsigned getNumTemplateArgs() const
Retrieve the number of template arguments provided as part of this template-id.
 
bool hasExplicitTemplateArgs() const
Determines whether this member expression actually had a C++ template argument list explicitly specif...
 
DeclarationName getMember() const
Retrieve the name of the member that this expression refers to.
 
bool hasTemplateKeyword() const
Determines whether the member name was preceded by the template keyword.
 
ArrayRef< TemplateArgumentLoc > template_arguments() const
 
Represents a C++ destructor within a class.
 
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)".
 
Represents a C++ struct/union/class.
 
unsigned getNumBases() const
Retrieves the number of base classes of this class.
 
const CXXRecordDecl * getTemplateInstantiationPattern() const
Retrieve the record declaration from which this record could be instantiated.
 
bool needsOverloadResolutionForMoveConstructor() const
Determine whether we need to eagerly declare a defaulted move constructor for this class.
 
bool needsOverloadResolutionForDestructor() const
Determine whether we need to eagerly declare a destructor for this class.
 
bool needsOverloadResolutionForCopyConstructor() const
Determine whether we need to eagerly declare a defaulted copy constructor for this class.
 
Represents a C++ temporary.
 
const CXXDestructorDecl * getDestructor() const
 
Represents the this expression in C++.
 
A C++ typeid expression (C++ [expr.typeid]), which gets the type_info that corresponds to the supplie...
 
bool isTypeOperand() const
 
QualType getTypeOperand(const ASTContext &Context) const
Retrieves the type operand of this typeid() expression after various required adjustments (removing r...
 
TypeSourceInfo * getTypeOperandSourceInfo() const
Retrieve source information for the type operand.
 
Describes an explicit type conversion that uses functional notion but could not be resolved because o...
 
bool isListInitialization() const
Determine whether this expression models list-initialization.
 
QualType getTypeAsWritten() const
Retrieve the type that is being constructed, as specified in the source code.
 
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
 
CaseStmt - Represent a case statement.
 
bool caseStmtIsGNURange() const
True if this case statement is of the form case LHS ... RHS, which is a GNU extension.
 
CastExpr - Base class for type casts, including both implicit casts (ImplicitCastExpr) and explicit c...
 
NamedDecl * getConversionFunction() const
If this cast applies a user-defined conversion, retrieve the conversion function that it invokes.
 
static const char * getCastKindName(CastKind CK)
 
CompoundAssignOperator - For compound assignments (e.g.
 
QualType getComputationLHSType() const
 
QualType getComputationResultType() const
 
CompoundStmt - This represents a group of statements like { stmt stmt }.
 
FPOptionsOverride getStoredFPFeatures() const
Get FPOptionsOverride from trailing storage.
 
bool hasStoredFPFeatures() const
 
A reference to a concept and its template args, as it appears in the code.
 
SourceRange getSourceRange() const LLVM_READONLY
 
SourceLocation getLocation() const
 
const ASTTemplateArgumentListInfo * getTemplateArgsAsWritten() const
 
TemplateDecl * getNamedConcept() const
 
Represents the canonical version of C arrays with a specified constant size.
 
int64_t getSExtSize() const
Return the size sign-extended as a uint64_t.
 
ConstantExpr - An expression that occurs in a constant context and optionally the result of evaluatin...
 
APValue getAPValueResult() const
 
APValue::ValueKind getResultAPValueKind() const
 
A reference to a declared variable, function, enum, etc.
 
NamedDecl * getFoundDecl()
Get the NamedDecl through which this reference occurred.
 
NonOdrUseReason isNonOdrUse() const
Is this expression a non-odr-use reference, and if so, why?
 
bool isImmediateEscalating() const
 
Decl - This represents one declaration (or definition), e.g.
 
ASTContext & getASTContext() const LLVM_READONLY
 
bool isImplicit() const
isImplicit - Indicates whether the declaration was implicitly generated by the implementation.
 
bool isTemplated() const
Determine whether this declaration is a templated entity (whether it is.
 
bool isInvalidDecl() const
 
SourceLocation getLocation() const
 
const char * getDeclKindName() const
 
bool isThisDeclarationReferenced() const
Whether this declaration was referenced.
 
bool isUsed(bool CheckUsedAttr=true) const
Whether any (re-)declaration of the entity was used, meaning that a definition is required.
 
DeclContext * getDeclContext()
 
AccessSpecifier getAccess() const
 
DeclContext * getLexicalDeclContext()
getLexicalDeclContext - The declaration context where this Decl was lexically declared (LexicalDC).
 
virtual SourceRange getSourceRange() const LLVM_READONLY
Source range that this declaration covers.
 
std::string getAsString() const
Retrieve the human-readable string for this name.
 
const ParmDecl * getInheritedFrom() const
Get the parameter from which we inherit the default argument, if any.
 
Represents an extended vector type where either the type or size is dependent.
 
SourceLocation getAttributeLoc() const
 
An instance of this object exists for each enum constant that is defined.
 
bool isScoped() const
Returns true if this is a C++11 scoped enumeration.
 
bool isScopedUsingClassTag() const
Returns true if this is a C++11 scoped enumeration.
 
bool isFixed() const
Returns true if this is an Objective-C, C++11, or Microsoft-style enumeration with a fixed underlying...
 
QualType getIntegerType() const
Return the integer type this enum decl corresponds to.
 
EnumDecl * getTemplateInstantiationPattern() const
Retrieve the enum definition from which this enumeration could be instantiated, if it is an instantia...
 
Represents an expression – generally a full-expression – that introduces cleanups to be run at the en...
 
bool cleanupsHaveSideEffects() const
 
ArrayRef< CleanupObject > getObjects() const
 
unsigned getNumObjects() const
 
llvm::PointerUnion< BlockDecl *, CompoundLiteralExpr * > CleanupObject
The type of objects that are kept in the cleanup.
 
bool isValueDependent() const
Determines whether the value of this expression depends on.
 
Represents difference between two FPOptions values.
 
Represents a member of a struct/union/class.
 
bool isMutable() const
Determines whether this field is mutable (C++ only).
 
bool isBitField() const
Determines whether this field is a bitfield.
 
bool hasInClassInitializer() const
Determine whether this member has a C++11 default member initializer.
 
std::string getValueAsString(unsigned Radix) const
 
llvm::APFloat getValue() const
 
FriendDecl - Represents the declaration of a friend entity, which can be a function,...
 
TypeSourceInfo * getFriendType() const
If this friend declaration names an (untemplated but possibly dependent) type, return the type; other...
 
bool isPackExpansion() const
 
Represents a function declaration or definition.
 
bool isImmediateFunction() const
 
StringLiteral * getDeletedMessage() const
Get the message that indicates why this function was deleted.
 
FunctionDecl * getTemplateInstantiationPattern(bool ForDefinition=true) const
Retrieve the function declaration from which this function could be instantiated, if it is an instant...
 
bool isVariadic() const
Whether this function is variadic.
 
bool isDeleted() const
Whether this function has been deleted.
 
StorageClass getStorageClass() const
Returns the storage class as written in the source.
 
bool isConstexpr() const
Whether this is a (C++11) constexpr function or constexpr constructor.
 
bool isDeletedAsWritten() const
 
bool isPureVirtual() const
Whether this virtual function is pure, i.e.
 
bool isDefaulted() const
Whether this function is defaulted.
 
bool isVirtualAsWritten() const
Whether this function is marked as virtual explicitly.
 
bool isInlineSpecified() const
Determine whether the "inline" keyword was specified for this function.
 
Represents a prototype with parameter type info, e.g.
 
A class which abstracts out some details necessary for making a call.
 
CallingConv getCC() const
 
unsigned getRegParm() const
 
bool getHasRegParm() const
 
bool getProducesResult() const
 
FunctionType - C99 6.7.5.3 - Function Declarators.
 
static StringRef getNameForCallConv(CallingConv CC)
 
Represents a C11 generic selection.
 
AssociationTy< true > ConstAssociation
 
bool isResultDependent() const
Whether this generic selection is result-dependent.
 
GotoStmt - This represents a direct goto.
 
LabelDecl * getLabel() const
 
HLSLBufferDecl - Represent a cbuffer or tbuffer declaration.
 
StringRef getName() const
Return the actual identifier string.
 
IfStmt - This represents an if/then/else.
 
bool hasElseStorage() const
True if this IfStmt has storage for an else statement.
 
bool hasVarStorage() const
True if this IfStmt has storage for a variable declaration.
 
bool hasInitStorage() const
True if this IfStmt has the storage for an init statement.
 
bool isNegatedConsteval() const
 
ImplicitCastExpr - Allows us to explicitly represent implicit type conversions, which have no direct ...
 
bool isPartOfExplicitCast() const
 
Describes an C or C++ initializer list.
 
FieldDecl * getInitializedFieldInUnion()
If this initializes a union, specifies which field in the union to initialize.
 
void VisitObjCSubscriptRefExpr(const ObjCSubscriptRefExpr *OSRE)
 
void VisitObjCInterfaceDecl(const ObjCInterfaceDecl *D)
 
void VisitUnresolvedLookupExpr(const UnresolvedLookupExpr *ULE)
 
void VisitCleanupAttr(const CleanupAttr *CA)
 
void VisitCaseStmt(const CaseStmt *CS)
 
void VisitImplicitCastExpr(const ImplicitCastExpr *ICE)
 
void VisitNamespaceAliasDecl(const NamespaceAliasDecl *NAD)
 
void VisitFunctionProtoType(const FunctionProtoType *T)
 
void VisitObjCImplementationDecl(const ObjCImplementationDecl *D)
 
void VisitVectorType(const VectorType *VT)
 
void VisitFunctionDecl(const FunctionDecl *FD)
 
void VisitObjCProtocolExpr(const ObjCProtocolExpr *OPE)
 
void VisitUsingDecl(const UsingDecl *UD)
 
void VisitEnumConstantDecl(const EnumConstantDecl *ECD)
 
void VisitOpenACCRoutineDecl(const OpenACCRoutineDecl *D)
 
void VisitConstantExpr(const ConstantExpr *CE)
 
void VisitRequiresExpr(const RequiresExpr *RE)
 
void VisitExprWithCleanups(const ExprWithCleanups *EWC)
 
void VisitCXXBoolLiteralExpr(const CXXBoolLiteralExpr *BLE)
 
void VisitTagType(const TagType *TT)
 
void Visit(const Attr *A)
 
void VisitLabelStmt(const LabelStmt *LS)
 
void VisitRValueReferenceType(const ReferenceType *RT)
 
void VisitObjCInterfaceType(const ObjCInterfaceType *OIT)
 
void VisitCXXConstructExpr(const CXXConstructExpr *CE)
 
void VisitObjCEncodeExpr(const ObjCEncodeExpr *OEE)
 
void VisitCXXDependentScopeMemberExpr(const CXXDependentScopeMemberExpr *ME)
 
void VisitStringLiteral(const StringLiteral *SL)
 
void VisitBlockDecl(const BlockDecl *D)
 
void VisitCXXDefaultInitExpr(const CXXDefaultInitExpr *Node)
 
void VisitSizeOfPackExpr(const SizeOfPackExpr *SOPE)
 
void VisitCXXUnresolvedConstructExpr(const CXXUnresolvedConstructExpr *UCE)
 
void VisitCXXTypeidExpr(const CXXTypeidExpr *CTE)
 
void VisitObjCPropertyImplDecl(const ObjCPropertyImplDecl *D)
 
void VisitAccessSpecDecl(const AccessSpecDecl *ASD)
 
void VisitDeprecatedAttr(const DeprecatedAttr *DA)
 
void VisitMemberPointerType(const MemberPointerType *MPT)
 
void VisitMemberExpr(const MemberExpr *ME)
 
void visitBlockCommandComment(const comments::BlockCommandComment *C, const comments::FullComment *)
 
void VisitCXXRecordDecl(const CXXRecordDecl *RD)
 
void VisitTemplateTemplateParmDecl(const TemplateTemplateParmDecl *D)
 
void VisitSwitchStmt(const SwitchStmt *SS)
 
void visitHTMLEndTagComment(const comments::HTMLEndTagComment *C, const comments::FullComment *)
 
void VisitBinaryOperator(const BinaryOperator *BO)
 
void visitVerbatimBlockLineComment(const comments::VerbatimBlockLineComment *C, const comments::FullComment *)
 
void VisitNonTypeTemplateParmDecl(const NonTypeTemplateParmDecl *D)
 
void VisitTemplateTypeParmDecl(const TemplateTypeParmDecl *D)
 
void VisitLinkageSpecDecl(const LinkageSpecDecl *LSD)
 
void VisitTypedefDecl(const TypedefDecl *TD)
 
void VisitTypedefType(const TypedefType *TT)
 
void VisitUnresolvedUsingType(const UnresolvedUsingType *UUT)
 
void VisitSubstTemplateTypeParmPackType(const SubstTemplateTypeParmPackType *T)
 
void VisitUnaryTransformType(const UnaryTransformType *UTT)
 
void VisitCallExpr(const CallExpr *CE)
 
void VisitVisibilityAttr(const VisibilityAttr *VA)
 
void VisitOpenACCDeclareDecl(const OpenACCDeclareDecl *D)
 
void VisitCompoundAssignOperator(const CompoundAssignOperator *CAO)
 
void visitParamCommandComment(const comments::ParamCommandComment *C, const comments::FullComment *FC)
 
void visitVerbatimBlockComment(const comments::VerbatimBlockComment *C, const comments::FullComment *)
 
void VisitAtomicExpr(const AtomicExpr *AE)
 
void VisitLoopControlStmt(const LoopControlStmt *LS)
 
void VisitUsingShadowDecl(const UsingShadowDecl *USD)
 
void VisitFloatingLiteral(const FloatingLiteral *FL)
 
void VisitTemplateTypeParmType(const TemplateTypeParmType *TTPT)
 
void VisitUsingDirectiveDecl(const UsingDirectiveDecl *UDD)
 
void VisitTemplateSpecializationType(const TemplateSpecializationType *TST)
 
void VisitWhileStmt(const WhileStmt *WS)
 
void VisitDeclarationTemplateArgument(const TemplateArgument &TA)
 
void VisitVarDecl(const VarDecl *VD)
 
void VisitEnumDecl(const EnumDecl *ED)
 
void VisitPackTemplateArgument(const TemplateArgument &TA)
 
void VisitTemplateExpansionTemplateArgument(const TemplateArgument &TA)
 
void visitTextComment(const comments::TextComment *C, const comments::FullComment *)
 
void VisitFieldDecl(const FieldDecl *FD)
 
void VisitCXXBindTemporaryExpr(const CXXBindTemporaryExpr *BTE)
 
void VisitIntegralTemplateArgument(const TemplateArgument &TA)
 
void VisitObjCSelectorExpr(const ObjCSelectorExpr *OSE)
 
void VisitSYCLUniqueStableNameExpr(const SYCLUniqueStableNameExpr *E)
 
void VisitDeclRefExpr(const DeclRefExpr *DRE)
 
void VisitNullPtrTemplateArgument(const TemplateArgument &TA)
 
void VisitNamespaceDecl(const NamespaceDecl *ND)
 
void VisitObjCIvarRefExpr(const ObjCIvarRefExpr *OIRE)
 
void visitVerbatimLineComment(const comments::VerbatimLineComment *C, const comments::FullComment *)
 
void VisitAutoType(const AutoType *AT)
 
void VisitObjCIvarDecl(const ObjCIvarDecl *D)
 
void VisitUnavailableAttr(const UnavailableAttr *UA)
 
void VisitMacroQualifiedType(const MacroQualifiedType *MQT)
 
void VisitObjCPropertyDecl(const ObjCPropertyDecl *D)
 
void VisitObjCMethodDecl(const ObjCMethodDecl *D)
 
void VisitStructuralValueTemplateArgument(const TemplateArgument &TA)
 
void visitTParamCommandComment(const comments::TParamCommandComment *C, const comments::FullComment *FC)
 
void VisitAddrLabelExpr(const AddrLabelExpr *ALE)
 
void VisitPredefinedExpr(const PredefinedExpr *PE)
 
void VisitAliasAttr(const AliasAttr *AA)
 
void VisitObjCCategoryImplDecl(const ObjCCategoryImplDecl *D)
 
void VisitPackExpansionType(const PackExpansionType *PET)
 
void VisitDependentSizedExtVectorType(const DependentSizedExtVectorType *VT)
 
void visitHTMLStartTagComment(const comments::HTMLStartTagComment *C, const comments::FullComment *)
 
void VisitSectionAttr(const SectionAttr *SA)
 
void VisitUsingType(const UsingType *TT)
 
void VisitSubstTemplateTypeParmType(const SubstTemplateTypeParmType *STTPT)
 
void VisitArrayType(const ArrayType *AT)
 
void VisitTypeTemplateArgument(const TemplateArgument &TA)
 
void VisitObjCBoxedExpr(const ObjCBoxedExpr *OBE)
 
void VisitObjCTypeParamDecl(const ObjCTypeParamDecl *D)
 
void VisitGenericSelectionExpr(const GenericSelectionExpr *GSE)
 
void VisitTemplateTemplateArgument(const TemplateArgument &TA)
 
void VisitCXXDefaultArgExpr(const CXXDefaultArgExpr *Node)
 
void VisitObjCBoolLiteralExpr(const ObjCBoolLiteralExpr *OBLE)
 
void VisitFixedPointLiteral(const FixedPointLiteral *FPL)
 
void VisitGotoStmt(const GotoStmt *GS)
 
void VisitCharacterLiteral(const CharacterLiteral *CL)
 
void VisitInitListExpr(const InitListExpr *ILE)
 
void VisitObjCProtocolDecl(const ObjCProtocolDecl *D)
 
void VisitTLSModelAttr(const TLSModelAttr *TA)
 
void VisitCompoundStmt(const CompoundStmt *IS)
 
void VisitHLSLBufferDecl(const HLSLBufferDecl *D)
 
void VisitCXXThisExpr(const CXXThisExpr *TE)
 
void VisitObjCPropertyRefExpr(const ObjCPropertyRefExpr *OPRE)
 
void VisitConstantArrayType(const ConstantArrayType *CAT)
 
void VisitObjCCompatibleAliasDecl(const ObjCCompatibleAliasDecl *D)
 
void VisitCXXNewExpr(const CXXNewExpr *NE)
 
void VisitOpenACCAsteriskSizeExpr(const OpenACCAsteriskSizeExpr *E)
 
void VisitObjCAtCatchStmt(const ObjCAtCatchStmt *OACS)
 
void VisitNullTemplateArgument(const TemplateArgument &TA)
 
void VisitCastExpr(const CastExpr *CE)
 
void VisitInjectedClassNameType(const InjectedClassNameType *ICNT)
 
void VisitIfStmt(const IfStmt *IS)
 
void VisitUnaryOperator(const UnaryOperator *UO)
 
void visitInlineCommandComment(const comments::InlineCommandComment *C, const comments::FullComment *)
 
void VisitUnaryExprOrTypeTraitExpr(const UnaryExprOrTypeTraitExpr *TTE)
 
void VisitIntegerLiteral(const IntegerLiteral *IL)
 
void VisitUsingEnumDecl(const UsingEnumDecl *UED)
 
void VisitObjCMessageExpr(const ObjCMessageExpr *OME)
 
void VisitFunctionType(const FunctionType *T)
 
void VisitRecordDecl(const RecordDecl *RD)
 
void VisitTypeAliasDecl(const TypeAliasDecl *TAD)
 
void VisitExpressionTemplateArgument(const TemplateArgument &TA)
 
void VisitNamedDecl(const NamedDecl *ND)
 
void VisitObjCCategoryDecl(const ObjCCategoryDecl *D)
 
void VisitFriendDecl(const FriendDecl *FD)
 
void VisitCXXDeleteExpr(const CXXDeleteExpr *DE)
 
void VisitMaterializeTemporaryExpr(const MaterializeTemporaryExpr *MTE)
 
LabelStmt - Represents a label, which has a substatement.
 
LabelDecl * getDecl() const
 
const char * getName() const
 
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 ...
 
Represents a linkage specification.
 
LinkageSpecLanguageIDs getLanguage() const
Return the language specified by this linkage specification.
 
bool hasBraces() const
Determines whether this linkage specification had braces in its syntactic form.
 
Base class for BreakStmt and ContinueStmt.
 
LabelDecl * getLabelDecl()
 
bool hasLabelTarget() const
 
Sugar type that represents a type that was qualified by a qualifier written as a macro invocation.
 
const IdentifierInfo * getMacroIdentifier() const
 
Represents a prvalue temporary that is written into memory so that a reference can bind to it.
 
StorageDuration getStorageDuration() const
Retrieve the storage duration for the materialized temporary.
 
bool isBoundToLvalueReference() const
Determine whether this materialized temporary is bound to an lvalue reference; otherwise,...
 
ValueDecl * getExtendingDecl()
Get the declaration which triggered the lifetime-extension of this temporary, if any.
 
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
 
ValueDecl * getMemberDecl() const
Retrieve the member declaration to which this expression refers.
 
NonOdrUseReason isNonOdrUse() const
Is this expression a non-odr-use reference, and if so, why?
 
A pointer to member type per C++ 8.3.3 - Pointers to members.
 
bool isMemberFunctionPointer() const
Returns true if the member type (i.e.
 
bool isMemberDataPointer() const
Returns true if the member type (i.e.
 
This represents a decl that may have a name.
 
bool isModulePrivate() const
Whether this declaration was marked as being private to the module in which it was defined.
 
StringRef getName() const
Get the name of identifier for this declaration as a StringRef.
 
DeclarationName getDeclName() const
Get the actual, stored name of the declaration, which may be a special name.
 
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...
 
Represents a C++ namespace alias.
 
NamespaceBaseDecl * getAliasedNamespace() const
Retrieve the namespace that this alias refers to, which may either be a NamespaceDecl or a NamespaceA...
 
Represent a C++ namespace.
 
bool isFirstDecl() const
True if this is the first declaration in its redeclaration chain.
 
bool isInline() const
Returns true if this is an inline namespace declaration.
 
bool isNested() const
Returns true if this is a nested namespace declaration.
 
Represents a C++ nested name specifier, such as "\::std::vector<int>::".
 
NonTypeTemplateParmDecl - Declares a non-type template parameter, e.g., "Size" in.
 
const DefArgStorage & getDefaultArgStorage() const
 
bool hasDefaultArgument() const
Determine whether this template parameter has a default argument.
 
bool defaultArgumentWasInherited() const
Determines whether the default argument was inherited from a previous declaration of this template.
 
const TemplateArgumentLoc & getDefaultArgument() const
Retrieve the default argument, if any.
 
bool isParameterPack() const
Whether this parameter is a non-type template parameter pack.
 
unsigned getIndex() const
Get the index of the template parameter within its parameter list.
 
unsigned getDepth() const
Get the nesting depth of the template parameter.
 
This is a basic class for representing single OpenMP clause.
 
Represents Objective-C's @catch statement.
 
const VarDecl * getCatchParamDecl() const
 
ObjCBoolLiteralExpr - Objective-C Boolean Literal.
 
ObjCBoxedExpr - used for generalized expression boxing.
 
ObjCMethodDecl * getBoxingMethod() const
 
ObjCCategoryDecl - Represents a category declaration.
 
ObjCCategoryImplDecl * getImplementation() const
 
ObjCInterfaceDecl * getClassInterface()
 
protocol_range protocols() const
 
ObjCCategoryImplDecl - An object of this class encapsulates a category @implementation declaration.
 
ObjCCategoryDecl * getCategoryDecl() const
 
ObjCCompatibleAliasDecl - Represents alias of a class.
 
const ObjCInterfaceDecl * getClassInterface() const
 
ObjCEncodeExpr, used for @encode in Objective-C.
 
QualType getEncodedType() const
 
const ObjCInterfaceDecl * getClassInterface() const
 
ObjCImplementationDecl - Represents a class definition - this is where method definitions are specifi...
 
const ObjCInterfaceDecl * getSuperClass() const
 
Represents an ObjC class declaration.
 
protocol_range protocols() const
 
ObjCImplementationDecl * getImplementation() const
 
ObjCInterfaceDecl * getSuperClass() const
 
Represents typeof(type), a C23 feature and GCC extension, or `typeof_unqual(type),...
 
ObjCInterfaceDecl * getDecl() const
Get the declaration of this interface.
 
ObjCIvarDecl - Represents an ObjC instance variable.
 
AccessControl getAccessControl() const
 
bool getSynthesize() const
 
ObjCIvarRefExpr - A reference to an ObjC instance variable.
 
An expression that sends a message to the given Objective-C object or class.
 
QualType getCallReturnType(ASTContext &Ctx) const
 
Selector getSelector() const
 
@ SuperInstance
The receiver is the instance of the superclass object.
 
@ Instance
The receiver is an object instance.
 
@ SuperClass
The receiver is a superclass.
 
@ Class
The receiver is a class.
 
QualType getClassReceiver() const
Returns the type of a class message send, or NULL if the message is not a class message.
 
QualType getSuperType() const
Retrieve the type referred to by 'super'.
 
ReceiverKind getReceiverKind() const
Determine the kind of receiver that this message is being sent to.
 
ObjCMethodDecl - Represents an instance or class method declaration.
 
bool isInstanceMethod() const
 
QualType getReturnType() const
 
Represents one property declaration in an Objective-C interface.
 
ObjCMethodDecl * getGetterMethodDecl() const
 
ObjCMethodDecl * getSetterMethodDecl() const
 
ObjCPropertyAttribute::Kind getPropertyAttributes() const
 
PropertyControl getPropertyImplementation() const
 
ObjCPropertyImplDecl - Represents implementation declaration of a property in a class or category imp...
 
ObjCIvarDecl * getPropertyIvarDecl() const
 
Kind getPropertyImplementation() const
 
ObjCPropertyDecl * getPropertyDecl() const
 
ObjCPropertyRefExpr - A dot-syntax expression to access an ObjC property.
 
bool isMessagingGetter() const
True if the property reference will result in a message to the getter.
 
ObjCPropertyDecl * getExplicitProperty() const
 
bool isMessagingSetter() const
True if the property reference will result in a message to the setter.
 
ObjCMethodDecl * getImplicitPropertyGetter() const
 
bool isImplicitProperty() const
 
ObjCMethodDecl * getImplicitPropertySetter() const
 
bool isSuperReceiver() const
 
Represents an Objective-C protocol declaration.
 
protocol_range protocols() const
 
ObjCProtocolExpr used for protocol expression in Objective-C.
 
ObjCProtocolDecl * getProtocol() const
 
ObjCSelectorExpr used for @selector in Objective-C.
 
Selector getSelector() const
 
ObjCSubscriptRefExpr - used for array and dictionary subscripting.
 
bool isArraySubscriptRefExpr() const
 
ObjCMethodDecl * getAtIndexMethodDecl() const
 
ObjCMethodDecl * setAtIndexMethodDecl() const
 
Represents the declaration of an Objective-C type parameter.
 
bool hasExplicitBound() const
Whether this type parameter has an explicitly-written type bound, e.g., "T : NSView".
 
ObjCTypeParamVariance getVariance() const
Determine the variance of this type parameter.
 
This expression type represents an asterisk in an OpenACC Size-Expr, used in the 'tile' and 'gang' cl...
 
This is the base type for all OpenACC Clauses.
 
llvm::iterator_range< decls_iterator > decls() const
 
DeclarationName getName() const
Gets the name looked up.
 
[C99 6.4.2.2] - A predefined identifier such as func.
 
PredefinedIdentKind getIdentKind() const
 
static StringRef getIdentKindName(PredefinedIdentKind IK)
 
Represents an unpacked "presumed" location which can be presented to the user.
 
unsigned getColumn() const
Return the presumed column number of this location.
 
const char * getFilename() const
Return the presumed filename of this location.
 
unsigned getLine() const
Return the presumed line number of this location.
 
bool isInvalid() const
Return true if this object is invalid or uninitialized.
 
SourceLocation getIncludeLoc() const
Return the presumed include location of this location.
 
A (possibly-)qualified type.
 
bool isNull() const
Return true if this QualType doesn't point to a type yet.
 
SplitQualType getSplitDesugaredType() const
 
SplitQualType split() const
Divides a QualType into its unqualified type and a set of local qualifiers.
 
std::string getAsString() const
 
std::string getAsString() const
 
Represents a struct/union/class.
 
decl_type * getFirstDecl()
Return the first declaration of this declaration or itself if this is the only declaration.
 
Base for LValueReferenceType and RValueReferenceType.
 
bool isSpelledAsLValue() const
 
C++2a [expr.prim.req]: A requires-expression provides a concise way to express requirements on templa...
 
bool isSatisfied() const
Whether or not the requires clause is satisfied.
 
TypeSourceInfo * getTypeSourceInfo()
 
void print(llvm::raw_ostream &OS) const
Prints the full selector name (e.g. "foo:bar:").
 
Represents an expression that computes the length of a parameter pack.
 
NamedDecl * getPack() const
Retrieve the parameter pack.
 
Encodes a location in the source.
 
A trivial tuple used to represent a source range.
 
SourceLocation getEnd() const
 
SourceLocation getBegin() const
 
RetTy Visit(PTR(Stmt) S, ParamTys... P)
 
Stmt - This represents one statement.
 
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation tokens are not useful in isolation - they are low level value objects created/interpre...
 
const char * getStmtClassName() const
 
StringLiteral - This represents a string literal expression, e.g.
 
void outputString(raw_ostream &OS) const
 
SwitchStmt - This represents a 'switch' stmt.
 
bool hasVarStorage() const
True if this SwitchStmt has storage for a condition variable.
 
bool hasInitStorage() const
True if this SwitchStmt has storage for an init statement.
 
StringRef getKindName() const
 
bool isCompleteDefinition() const
Return true if this decl has its body fully specified.
 
Location wrapper for a TemplateArgument.
 
const TemplateArgument & getArgument() const
 
Represents a template argument.
 
QualType getStructuralValueType() const
Get the type of a StructuralValue.
 
QualType getAsType() const
Retrieve the type for a type template argument.
 
llvm::APSInt getAsIntegral() const
Retrieve the template argument as an integral value.
 
ValueDecl * getAsDecl() const
Retrieve the declaration for a declaration non-type template argument.
 
bool isCanonicalExpr() const
 
const APValue & getAsStructuralValue() const
Get the value of a StructuralValue.
 
TemplateTemplateParmDecl - Declares a template template parameter, e.g., "T" in.
 
const DefArgStorage & getDefaultArgStorage() const
 
const TemplateArgumentLoc & getDefaultArgument() const
Retrieve the default argument, if any.
 
bool isParameterPack() const
Whether this template template parameter is a template parameter pack.
 
unsigned getIndex() const
Get the index of the template parameter within its parameter list.
 
bool defaultArgumentWasInherited() const
Determines whether the default argument was inherited from a previous declaration of this template.
 
unsigned getDepth() const
Get the nesting depth of the template parameter.
 
bool hasDefaultArgument() const
Determine whether this template parameter has a default argument.
 
Declaration of a template type parameter.
 
bool wasDeclaredWithTypename() const
Whether this template type parameter was declared with the 'typename' keyword.
 
const TemplateArgumentLoc & getDefaultArgument() const
Retrieve the default argument, if any.
 
unsigned getIndex() const
Retrieve the index of the template parameter.
 
bool hasDefaultArgument() const
Determine whether this template parameter has a default argument.
 
bool defaultArgumentWasInherited() const
Determines whether the default argument was inherited from a previous declaration of this template.
 
bool isParameterPack() const
Returns whether this is a parameter pack.
 
unsigned getDepth() const
Retrieve the depth of the template parameter.
 
const DefArgStorage & getDefaultArgStorage() const
 
Represents the declaration of a typedef-name via a C++11 alias-declaration.
 
Base wrapper for a particular "section" of type source info.
 
QualType getType() const
Get the type for which this source info wrapper provides information.
 
SourceRange getSourceRange() const LLVM_READONLY
Get the full source range.
 
TypeLocClass getTypeLocClass() const
 
const Type * getTypePtr() const
 
A container of type source information.
 
QualType getType() const
Return the type wrapped by this type source info.
 
void Visit(const Type *T)
 
The base class of the type hierarchy.
 
bool isSignedIntegerType() const
Return true if this is an integer type that is signed, according to C99 6.2.5p4 [char,...
 
const char * getTypeClassName() const
 
const T * getAs() const
Member-template getAs<specific type>'.
 
Represents the declaration of a typedef-name via the 'typedef' type specifier.
 
QualType getUnderlyingType() const
 
TypedefNameDecl * getDecl() const
 
bool typeMatchesDecl() const
 
UnaryExprOrTypeTraitExpr - expression with either a type or (unevaluated) expression operand.
 
QualType getArgumentType() const
 
bool isArgumentType() const
 
UnaryExprOrTypeTrait getKind() const
 
UnaryOperator - This represents the unary-expression's (except sizeof and alignof),...
 
static bool isPostfix(Opcode Op)
isPostfix - Return true if this is a postfix operation, like x++.
 
static StringRef getOpcodeStr(Opcode Op)
getOpcodeStr - Turn an Opcode enum value into the punctuation char it corresponds to,...
 
bool canOverflow() const
Returns true if the unary operator can cause an overflow.
 
A reference to a name which we were able to look up during parsing but could not resolve to a specifi...
 
bool requiresADL() const
True if this declaration should be extended by argument-dependent lookup.
 
Represents the dependent type named by a dependently-scoped typename using declaration,...
 
UnresolvedUsingTypenameDecl * getDecl() const
 
Represents a C++ using-declaration.
 
NestedNameSpecifier getQualifier() const
Retrieve the nested-name-specifier that qualifies the name.
 
Represents C++ using-directive.
 
NamespaceDecl * getNominatedNamespace()
Returns the namespace nominated by this using-directive.
 
Represents a C++ using-enum-declaration.
 
EnumDecl * getEnumDecl() const
 
Represents a shadow declaration implicitly introduced into a scope by a (resolved) using-declaration ...
 
NamedDecl * getTargetDecl() const
Gets the underlying declaration which has been brought into the local scope.
 
UsingShadowDecl * getDecl() const
 
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
 
bool isParameterPack() const
Determine whether this value is actually a function parameter pack, init-capture pack,...
 
Represents a variable declaration or definition.
 
bool isConstexpr() const
Whether this variable is (C++11) constexpr.
 
TLSKind getTLSKind() const
 
InitializationStyle getInitStyle() const
The style of initialization for this declaration.
 
static const char * getStorageClassSpecifierString(StorageClass SC)
Return the string used to specify the storage class SC.
 
@ ListInit
Direct list-initialization (C++11)
 
@ CInit
C-style initialization with assignment.
 
@ ParenListInit
Parenthesized list-initialization (C++20)
 
@ CallInit
Call-style initialization (C++98)
 
VarDecl * getTemplateInstantiationPattern() const
Retrieve the variable declaration from which this variable could be instantiated, if it is an instant...
 
bool isNRVOVariable() const
Determine whether this local variable can be used with the named return value optimization (NRVO).
 
bool isInline() const
Whether this variable is (C++1z) inline.
 
@ TLS_Static
TLS with a known-constant initializer.
 
@ TLS_Dynamic
TLS with a dynamic initializer.
 
@ TLS_None
Not a TLS variable.
 
StorageClass getStorageClass() const
Returns the storage class as written in the source.
 
Represents a GCC generic vector type.
 
unsigned getNumElements() const
 
VectorKind getVectorKind() const
 
WhileStmt - This represents a 'while' stmt.
 
bool hasVarStorage() const
True if this WhileStmt has storage for a condition variable.
 
A static requirement that can be used in a requires-expression to check properties of types and expre...
 
RequirementKind getKind() const
 
bool containsUnexpandedParameterPack() const
 
RetTy Visit(REF(TemplateArgument) TA, ParamTys... P)
 
@ kind_nullability
Indicates that the nullability of the type was spelled with a property attribute rather than a type q...
 
bool Ret(InterpState &S, CodePtr &PC)
 
The JSON file list parser is used to communicate input to InstallAPI.
 
bool isa(CodeGen::Address addr)
 
@ GNUAutoType
__auto_type (GNU extension)
 
@ DecltypeAuto
decltype(auto)
 
llvm::StringRef getAccessSpelling(AccessSpecifier AS)
 
@ RQ_None
No ref-qualifier was provided.
 
@ RQ_LValue
An lvalue ref-qualifier was provided (&).
 
@ RQ_RValue
An rvalue ref-qualifier was provided (&&).
 
AccessSpecifier
A C++ access specifier (public, private, protected), plus the special value "none" which means differ...
 
StorageClass
Storage classes.
 
@ SD_Thread
Thread storage duration.
 
@ SD_Static
Static storage duration.
 
@ SD_FullExpression
Full-expression storage duration (for temporaries).
 
@ SD_Automatic
Automatic storage duration (most local variables).
 
@ SD_Dynamic
Dynamic storage duration.
 
const FunctionProtoType * T
 
@ VK_PRValue
A pr-value expression (in the C++11 taxonomy) produces a temporary value.
 
@ VK_XValue
An x-value expression is a reference to an object with independent storage but which can be "moved",...
 
@ VK_LValue
An l-value expression is a reference to an object with independent storage.
 
const char * getTraitSpelling(ExpressionTrait T) LLVM_READONLY
Return the spelling of the type trait TT. Never null.
 
@ Invariant
The parameter is invariant: must match exactly.
 
@ Contravariant
The parameter is contravariant, e.g., X<T> is a subtype of X when the type parameter is covariant and...
 
@ Covariant
The parameter is covariant, e.g., X<T> is a subtype of X when the type parameter is covariant and T i...
 
@ AltiVecBool
is AltiVec 'vector bool ...'
 
@ SveFixedLengthData
is AArch64 SVE fixed-length data vector
 
@ AltiVecVector
is AltiVec vector
 
@ AltiVecPixel
is AltiVec 'vector Pixel'
 
@ Generic
not a target-specific vector type
 
@ RVVFixedLengthData
is RISC-V RVV fixed-length data vector
 
@ RVVFixedLengthMask
is RISC-V RVV fixed-length mask vector
 
@ NeonPoly
is ARM Neon polynomial vector
 
@ SveFixedLengthPredicate
is AArch64 SVE fixed-length predicate vector
 
U cast(CodeGen::Address addr)
 
@ Parens
New-expression has a C++98 paren-delimited initializer.
 
@ None
New-expression has no initializer as written.
 
@ Braces
New-expression has a C++11 list-initializer.
 
@ EST_DependentNoexcept
noexcept(expression), value-dependent
 
@ EST_Uninstantiated
not instantiated yet
 
@ EST_Unparsed
not parsed yet
 
@ EST_NoThrow
Microsoft __declspec(nothrow) extension.
 
@ EST_None
no exception specification
 
@ EST_MSAny
Microsoft throw(...) extension.
 
@ EST_BasicNoexcept
noexcept
 
@ EST_NoexceptFalse
noexcept(expression), evals to 'false'
 
@ EST_Unevaluated
not evaluated yet, for special member function
 
@ EST_NoexceptTrue
noexcept(expression), evals to 'true'
 
@ EST_Dynamic
throw(T1, T2)
 
@ NOUR_Discarded
This name appears as a potential result of a discarded value expression.
 
@ NOUR_Unevaluated
This name appears in an unevaluated operand.
 
@ NOUR_None
This is an odr-use.
 
@ NOUR_Constant
This name appears as a potential result of an lvalue-to-rvalue conversion that is a constant expressi...
 
ExceptionSpecificationType Type
The kind of exception specification this is.
 
ArrayRef< QualType > Exceptions
Explicitly-specified list of exception types.
 
Extra information about a function prototype.
 
ExceptionSpecInfo ExceptionSpec
 
RefQualifierKind RefQualifier
 
unsigned HasTrailingReturn