26#include "llvm/ADT/StringExtras.h"
27#include "llvm/Frontend/HLSL/HLSLRootSignature.h"
40 OS <<
" first " <<
First;
47 OS <<
" prev " << Prev;
54#define DECL(DERIVED, BASE) \
56 return dumpPreviousDeclImpl(OS, cast<DERIVED##Decl>(D));
57#define ABSTRACT_DECL(DECL)
58#include "clang/AST/DeclNodes.inc"
60 llvm_unreachable(
"Decl that isn't part of DeclNodes.inc!");
66 Context(&Context), SM(&Context.getSourceManager()),
67 PrintPolicy(Context.getPrintingPolicy()),
68 Traits(&Context.getCommentCommandTraits()) {}
83 OS <<
C->getCommentKindName();
101#include "clang/Basic/AttrList.inc"
116 const Decl *From, StringRef Label) {
117 OS <<
"TemplateArgument";
140 if (
const auto *E = dyn_cast<Expr>(Node)) {
143 if (E->containsErrors()) {
145 OS <<
" contains-errors";
150 switch (E->getValueKind()) {
164 switch (E->getObjectKind()) {
171 OS <<
" objcproperty";
174 OS <<
" objcsubscript";
177 OS <<
" vectorcomponent";
180 OS <<
" matrixcomponent";
198 OS <<
"LocInfo Type";
206 OS <<
T->getTypeClassName() <<
"Type";
213 T->getLocallyUnqualifiedSingleStepDesugaredType();
217 if (
T->containsErrors()) {
219 OS <<
" contains-errors";
222 if (
T->isDependentType())
224 else if (
T->isInstantiationDependentType())
225 OS <<
" instantiation_dependent";
227 if (
T->isVariablyModifiedType())
228 OS <<
" variably_modified";
229 if (
T->containsUnexpandedParameterPack())
230 OS <<
" contains_unexpanded_pack";
242 OS <<
" " <<
T.split().Quals.getAsString();
287 OS <<
" in " << M->getFullModuleName();
288 if (
auto *ND = dyn_cast<NamedDecl>(D))
291 AddChild([=] { OS <<
"also in " << M->getFullModuleName(); });
292 if (
const NamedDecl *ND = dyn_cast<NamedDecl>(D))
293 if (!ND->isUnconditionallyVisible())
305 if (
const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
306 if (FD->isConstexprSpecified())
308 if (FD->isConsteval())
310 else if (FD->isImmediateFunction())
312 if (FD->isMultiVersion())
313 OS <<
" multiversion";
317 const auto *MD = dyn_cast<ObjCMethodDecl>(D);
318 if (!MD || !MD->isThisDeclarationADefinition()) {
319 const auto *DC = dyn_cast<DeclContext>(D);
320 if (DC && DC->hasExternalLexicalStorage()) {
322 OS <<
" <undeserialized declarations>";
334 OS <<
" friend_undeclared";
342 OS <<
"CXXCtorInitializer";
343 if (
Init->isAnyMemberInitializer()) {
346 }
else if (
Init->isBaseInitializer()) {
348 }
else if (
Init->isDelegatingInitializer()) {
351 llvm_unreachable(
"Unknown initializer type");
361 if (
C.getVariable()) {
370 OS <<
"<<<NULL>>> OMPClause";
376 StringRef ClauseName(CKind == llvm::omp::Clause::OMPC_update_depend_objects
377 ? StringRef(
"UpdateDependObjects")
378 : llvm::omp::getOpenMPClauseName(CKind));
379 OS <<
"OMP" << ClauseName.substr(0, 1).upper()
380 << ClauseName.drop_front() <<
"Clause";
396 OS <<
"<<<NULL>>> OpenACCClause";
401 OS <<
C->getClauseKind();
405 switch (
C->getClauseKind()) {
407 OS << '(' << cast<OpenACCDefaultClause>(
C)->getDefaultClauseKind() <<
')';
451 for (
unsigned I = 0; I < GC->getNumExprs(); ++I) {
452 OS <<
" " << GC->getExpr(I).first;
500 OS <<
" has queues tag";
505 llvm::interleaveComma(
508 if (
Arch.getIdentifierInfo() ==
nullptr)
511 OS <<
Arch.getIdentifierInfo()->getName();
516 OS <<
" clause Operator: "
522 OS <<
" identifier '"
550 OS <<
"<<<NULL>>> ConceptReference";
554 OS <<
"ConceptReference";
564 OS <<
"<<<NULL>>> Requirement";
570 switch (R->getKind()) {
572 OS <<
"TypeRequirement";
575 OS <<
"SimpleRequirement";
578 OS <<
"CompoundRequirement";
581 OS <<
"NestedRequirement";
588 if (
auto *ER = dyn_cast<concepts::ExprRequirement>(R)) {
589 if (ER->hasNoexceptRequirement())
593 if (R->isDependent())
596 OS << (R->isSatisfied() ?
" satisfied" :
" unsatisfied");
597 if (R->containsUnexpandedParameterPack())
598 OS <<
" contains_unexpanded_pack";
604 V.convert(llvm::APFloat::IEEEdouble(), llvm::APFloat::rmNearestTiesToEven,
606 return V.convertToDouble();
632 llvm_unreachable(
"unexpected APValue kind!");
648void TextNodeDumper::dumpAPValueChildren(
651 unsigned NumChildren, StringRef LabelSingular, StringRef LabelPlurial) {
654 constexpr unsigned MaxChildrenPerLine = 4;
656 while (I < NumChildren) {
658 while (J < NumChildren) {
660 (J - I < MaxChildrenPerLine)) {
667 J = std::max(I + 1, J);
670 AddChild(J - I > 1 ? LabelPlurial : LabelSingular, [=]() {
671 for (
unsigned X = I;
X < J; ++
X) {
688 OS <<
"Indeterminate";
694 OS <<
Value.getInt();
708 OS <<
Value.getFixedPoint();
718 return Value.getVectorElt(Index);
727 OS <<
Value.getComplexIntReal() <<
" + " <<
Value.getComplexIntImag()
732 OS <<
"ComplexFloat ";
741 OS <<
"LValue Base=";
746 OS << BE->getStmtClassName() <<
' ';
749 OS <<
"TypeInfoLValue ";
751 BTI.print(OS, PrintPolicy);
753 OS <<
"DynamicAllocLValue";
761 OS <<
", Null=" <<
Value.isNullPointer()
762 <<
", Offset=" <<
Value.getLValueOffset().getQuantity()
763 <<
", OnePastTheEnd=" <<
Value.isLValueOnePastTheEnd()
764 <<
", HasPath=" <<
Value.hasLValuePath();
765 if (
Value.hasLValuePath()) {
766 OS <<
", PathLength=" <<
Value.getLValuePath().size();
768 llvm::ListSeparator Sep;
769 for (
const auto &PathEntry :
Value.getLValuePath()) {
772 OS << Sep << PathEntry.getAsArrayIndex();
779 unsigned ArraySize =
Value.getArraySize();
780 unsigned NumInitializedElements =
Value.getArrayInitializedElts();
781 OS <<
"Array size=" << ArraySize;
786 return Value.getArrayInitializedElt(Index);
788 NumInitializedElements,
"element",
"elements");
790 if (
Value.hasArrayFiller()) {
794 OS << ArraySize - NumInitializedElements <<
" x ";
808 return Value.getStructBase(Index);
810 Value.getStructNumBases(),
"base",
"bases");
815 return Value.getStructField(Index);
817 Value.getStructNumFields(),
"field",
"fields");
822 return Value.getStructVirtualBase(Index);
824 Value.getStructNumVirtualBases(),
"vbase",
"vbases");
828 unsigned NumRows =
Value.getMatrixNumRows();
829 unsigned NumCols =
Value.getMatrixNumColumns();
830 OS <<
"Matrix " << NumRows <<
"x" << NumCols;
835 return Value.getMatrixElt(Index);
837 Value.getMatrixNumElements(),
"element",
"elements");
852 Visit(UnionValue, Ty);
860 OS <<
"MemberPointer ";
861 auto Path =
Value.getMemberPointerPath();
865 OS << D->getDeclName();
872 OS << MemDecl->getDeclName();
878 OS <<
"AddrLabelDiff ";
879 OS <<
"&&" <<
Value.getAddrLabelDiffLHS()->getLabel()->getName();
881 OS <<
"&&" <<
Value.getAddrLabelDiffRHS()->getLabel()->getName();
885 switch (
Value.getReflectionOperandKind()) {
887 OS <<
"std::meta::info{}";
892 Value.getReflectionOpaqueOperand());
899 llvm_unreachable(
"Unknown APValue kind!");
916 PresumedLoc PLoc = SM->getPresumedLoc(SpellingLoc);
919 OS <<
"<invalid sloc>";
923 if (strcmp(PLoc.
getFilename(), LastLocFilename) != 0) {
928 }
else if (PLoc.
getLine() != LastLocLine) {
943 if (R.getBegin() != R.getEnd()) {
957 OS <<
"'" << T_str <<
"'";
959 if (Desugar && !
T.isNull()) {
963 if (T_split != D_split) {
1004 if (
const NamedDecl *ND = dyn_cast<NamedDecl>(D)) {
1007 OS <<
" '" << Name <<
'\'';
1009 switch (ND->getKind()) {
1010 case Decl::Decomposition:
1013 OS <<
" first_binding '" <<
Bindings[0]->getDeclName() <<
'\'';
1015 OS <<
" no_bindings";
1019 OS <<
" field_index " << FD->getFieldIndex();
1022 case Decl::ParmVar: {
1024 OS <<
" depth " << PD->getFunctionScopeDepth() <<
" index "
1025 << PD->getFunctionScopeIndex();
1028 case Decl::TemplateTypeParm: {
1030 OS <<
" depth " << TD->getDepth() <<
" index " << TD->getIndex();
1033 case Decl::NonTypeTemplateParm: {
1035 OS <<
" depth " << TD->getDepth() <<
" index " << TD->getIndex();
1045 if (
const ValueDecl *VD = dyn_cast<ValueDecl>(D))
1058 if (AccessSpelling.empty())
1060 OS << AccessSpelling;
1065 if (
auto *BD = dyn_cast<BlockDecl *>(
C))
1067 else if (
auto *CLE = dyn_cast<CompoundLiteralExpr *>(
C))
1072 OS << CLE->getStmtClassName();
1077 llvm_unreachable(
"unexpected cleanup type");
1086 OS <<
" implicit_instantiation";
1089 OS <<
" explicit_specialization";
1092 OS <<
" explicit_instantiation_declaration";
1095 OS <<
" explicit_instantiation_definition";
1105 OS <<
"NestedNameSpecifier";
1126 llvm_unreachable(
"unexpected null nested name specifier");
1145 llvm::raw_svector_ostream SS(Str);
1146 TA.
print(PrintPolicy, SS,
true);
1148 OS <<
" '" << Str <<
"'";
1157 llvm::raw_svector_ostream SS(CanonStr);
1158 CanonTA.print(PrintPolicy, SS,
true);
1160 if (CanonStr != Str)
1161 OS <<
":'" << CanonStr <<
"'";
1165const char *TextNodeDumper::getCommandName(
unsigned CommandID) {
1167 return Traits->getCommandInfo(CommandID)->Name;
1172 return "<not a builtin command>";
1176#define FP_OPTION(NAME, TYPE, WIDTH, PREVIOUS) \
1177 if (FPO.has##NAME##Override()) \
1178 OS << " " #NAME "=" << FPO.get##NAME##Override();
1179#include "clang/Basic/FPOptions.def"
1184 OS <<
" Text=\"" <<
C->getText() <<
"\"";
1189 OS <<
" Name=\"" << getCommandName(
C->getCommandID()) <<
"\"";
1190 switch (
C->getRenderKind()) {
1192 OS <<
" RenderNormal";
1195 OS <<
" RenderBold";
1198 OS <<
" RenderMonospaced";
1201 OS <<
" RenderEmphasized";
1204 OS <<
" RenderAnchor";
1208 for (
unsigned i = 0, e =
C->getNumArgs(); i != e; ++i)
1209 OS <<
" Arg[" << i <<
"]=\"" <<
C->getArgText(i) <<
"\"";
1214 OS <<
" Name=\"" <<
C->getTagName() <<
"\"";
1215 if (
C->getNumAttrs() != 0) {
1217 for (
unsigned i = 0, e =
C->getNumAttrs(); i != e; ++i) {
1219 OS <<
" \"" <<
Attr.Name <<
"=\"" <<
Attr.Value <<
"\"";
1222 if (
C->isSelfClosing())
1223 OS <<
" SelfClosing";
1228 OS <<
" Name=\"" <<
C->getTagName() <<
"\"";
1233 OS <<
" Name=\"" << getCommandName(
C->getCommandID()) <<
"\"";
1234 for (
unsigned i = 0, e =
C->getNumArgs(); i != e; ++i)
1235 OS <<
" Arg[" << i <<
"]=\"" <<
C->getArgText(i) <<
"\"";
1243 if (
C->isDirectionExplicit())
1244 OS <<
" explicitly";
1246 OS <<
" implicitly";
1248 if (
C->hasParamName()) {
1249 if (
C->isParamIndexValid())
1250 OS <<
" Param=\"" <<
C->getParamName(FC) <<
"\"";
1252 OS <<
" Param=\"" <<
C->getParamNameAsWritten() <<
"\"";
1255 if (
C->isParamIndexValid() && !
C->isVarArgParam())
1256 OS <<
" ParamIndex=" <<
C->getParamIndex();
1261 if (
C->hasParamName()) {
1262 if (
C->isPositionValid())
1263 OS <<
" Param=\"" <<
C->getParamName(FC) <<
"\"";
1265 OS <<
" Param=\"" <<
C->getParamNameAsWritten() <<
"\"";
1268 if (
C->isPositionValid()) {
1269 OS <<
" Position=<";
1270 for (
unsigned i = 0, e =
C->getDepth(); i != e; ++i) {
1271 OS <<
C->getIndex(i);
1281 OS <<
" Name=\"" << getCommandName(
C->getCommandID())
1284 <<
C->getCloseName() <<
"\"";
1290 OS <<
" Text=\"" <<
C->getText() <<
"\"";
1295 OS <<
" Text=\"" <<
C->getText() <<
"\"";
1326 OS <<
" structural value";
1335 llvm::raw_svector_ostream SS(Str);
1336 TN.
print(SS, PrintPolicy);
1338 OS <<
"'" << Str <<
"'";
1341 if (
TemplateName CanonTN = Context->getCanonicalTemplateName(TN);
1345 llvm::raw_svector_ostream SS(CanonStr);
1346 CanonTN.print(SS, PrintPolicy);
1348 if (CanonStr != Str)
1349 OS <<
":'" << CanonStr <<
"'";
1387 OS <<
" index " << STS->
getIndex();
1404 OS <<
" start " << StartPos;
1411 OS <<
" pack_indexing";
1414 OS <<
" fully_substituted";
1416 OS <<
" index " << *Index;
1425 OS <<
" overloaded";
1431 OS <<
" subst_pack";
1434 llvm_unreachable(
"Unexpected TemplateName Kind");
1445 OS <<
" template expansion";
1477 Base->getType()->castAsCanonical<RecordType>()->getDecl());
1479 if (
Base->isVirtual())
1481 OS << RD->getName();
1495 OS <<
" internal-linkage";
1498 OS <<
" external-linkage";
1501 OS <<
" module-linkage";
1504 llvm_unreachable(
"Linkage hasn't been computed!");
1507 llvm_unreachable(
"Not a formal linkage!");
1516 OS <<
" hidden-visibility";
1519 OS <<
" protected-visibility";
1537 OS <<
Target->getStmtClassName();
1574 OS <<
" '" << Node->
getName() <<
"'";
1576 OS <<
" side_entry";
1591 OS <<
" nrvo_candidate(";
1611 OS <<
" enumerating";
1617 OS <<
" destructuring";
1624 llvm_unreachable(
"invalid expansion statement kind");
1630 OS <<
" applies_lifetime_extension";
1648 if (OperatorSpelling)
1649 OS <<
" '" << OperatorSpelling <<
"'";
1669 OS <<
" part_of_explicit_cast";
1688 OS <<
" dependent_capture";
1690 OS <<
" refers_to_enclosing_variable_or_capture";
1693 OS <<
" immediate-escalating";
1713 OS <<
"ADL) = '" << Node->
getName() <<
'\'';
1728 OS <<
"='" << *Node->
getDecl() <<
"'";
1731 OS <<
" isFreeIvar";
1775 OS <<
' ' << (ILE->
isExplicit() ?
"explicit" :
"implicit");
1780 OS <<
" result_dependent";
1784 OS <<
" " << (Node->
isPostfix() ?
"postfix" :
"prefix") <<
" '"
1787 OS <<
" cannot overflow";
1830 <<
"' ComputeLHSTy=";
1832 OS <<
" ComputeResultTy=";
1852 OS <<
" " << (Node->
getValue() ?
"true" :
"false");
1859 OS <<
" dependent_capture";
1892 OS <<
" std::initializer_list";
1896 OS <<
" immediate-escalating";
1901 OS <<
" (CXXTemporary";
1944 OS <<
" has rewritten init";
1949 OS <<
" has rewritten init";
1955 OS <<
" extended by ";
1961 for (
unsigned i = 0, e = Node->
getNumObjects(); i != e; ++i)
1988 OS <<
" super (instance)";
1992 OS <<
" super (class)";
2000 BoxingMethod->getSelector().print(OS);
2024 OS <<
" Kind=MethodRef Getter=\"";
2030 OS <<
"\" Setter=\"";
2032 Setter->getSelector().print(OS);
2044 OS <<
" Messaging=";
2046 OS <<
"Getter&Setter";
2056 OS <<
" Kind=ArraySubscript GetterForArray=\"";
2058 OS <<
" Kind=DictionarySubscript GetterForDictionary=\"";
2065 OS <<
"\" SetterForArray=\"";
2067 OS <<
"\" SetterForDictionary=\"";
2075 OS <<
" " << (Node->
getValue() ?
"__objc_yes" :
"__objc_no");
2104 OS << (Node->
isSatisfied() ?
" satisfied" :
" unsatisfied");
2108 if (
T->isSpelledAsLValue())
2109 OS <<
" written as lvalue reference";
2113 switch (
T->getSizeModifier()) {
2123 OS <<
" " <<
T->getIndexTypeQualifiers().getAsString();
2127 OS <<
" " <<
T->getSize();
2147 switch (
T->getVectorKind()) {
2154 OS <<
" altivec pixel";
2157 OS <<
" altivec bool";
2166 OS <<
" fixed-length sve data vector";
2169 OS <<
" fixed-length sve predicate vector";
2172 OS <<
" fixed-length rvv data vector";
2178 OS <<
" fixed-length rvv mask vector";
2181 OS <<
" " <<
T->getNumElements();
2185 auto EI =
T->getExtInfo();
2186 if (EI.getNoReturn())
2188 if (EI.getProducesResult())
2189 OS <<
" produces_result";
2190 if (EI.getHasRegParm())
2191 OS <<
" regparm " << EI.getRegParm();
2196 auto EPI =
T->getExtProtoInfo();
2197 if (EPI.HasTrailingReturn)
2198 OS <<
" trailing_return";
2201 if (
T->isVolatile())
2203 if (
T->isRestrict())
2205 if (
T->getExtProtoInfo().Variadic)
2207 switch (EPI.RefQualifier) {
2218 switch (EPI.ExceptionSpec.Type) {
2222 OS <<
" exceptionspec_dynamic_none";
2225 OS <<
" exceptionspec_dynamic";
2228 OS <<
" exceptionspec_ms_any";
2231 OS <<
" exceptionspec_nothrow";
2234 OS <<
" exceptionspec_basic_noexcept";
2237 OS <<
" exceptionspec_dependent_noexcept";
2240 OS <<
" exceptionspec_noexcept_false";
2243 OS <<
" exceptionspec_noexcept_true";
2246 OS <<
" exceptionspec_unevaluated";
2249 OS <<
" exceptionspec_uninstantiated";
2252 OS <<
" exceptionspec_unparsed";
2255 if (!EPI.ExceptionSpec.Exceptions.empty()) {
2257 OS <<
"Exceptions:";
2258 for (
unsigned I = 0, N = EPI.ExceptionSpec.Exceptions.size(); I != N;
2262 dumpType(EPI.ExceptionSpec.Exceptions[I]);
2266 if (EPI.ExceptionSpec.NoexceptExpr) {
2268 OS <<
"NoexceptExpr: ";
2269 Visit(EPI.ExceptionSpec.NoexceptExpr);
2272 dumpDeclRef(EPI.ExceptionSpec.SourceDecl,
"ExceptionSourceDecl");
2273 dumpDeclRef(EPI.ExceptionSpec.SourceTemplate,
"ExceptionSourceTemplate");
2302 if (!
T->typeMatchesDecl()) {
2309 switch (
T->getUTTKind()) {
2310#define TRANSFORM_TYPE_TRAIT_DEF(Enum, Trait) \
2311 case UnaryTransformType::Enum: \
2314#include "clang/Basic/BuiltinTraits.inc"
2319 if (
T->isCanonicalUnqualified())
2321 if (
T->isTagOwned())
2323 if (
T->isInjected())
2333 OS <<
" depth " <<
T->getDepth() <<
" index " <<
T->getIndex();
2334 if (
T->isParameterPack())
2340 const SubstTemplateTypeParmType *
T) {
2350 const SubstTemplateTypeParmPackType *
T) {
2356 switch (
T->getDeducedKind()) {
2363 OS <<
" deduced-as-dependent";
2366 OS <<
" deduced-as-pack";
2375 if (
T->isConstrained())
2380 const DeducedTemplateSpecializationType *
T) {
2386 const TemplateSpecializationType *
T) {
2387 if (
T->isTypeAlias())
2396 const InjectedClassNameType *
T) {
2405 if (
auto N =
T->getNumExpansions())
2406 OS <<
" expansions " << *N;
2422 OS <<
" __module_private__";
2439 OS <<
" __module_private__";
2444 OS <<
" instantiated_from";
2455 OS <<
" __module_private__";
2457 OS <<
" definition";
2473 for (
const auto *Child : D->
chain())
2490 OS <<
" __module_private__";
2508 OS << (isa<CXXDestructorDecl>(D) ?
" not_selected" :
" ineligible");
2524 if (
const auto *MD = dyn_cast<CXXMethodDecl>(D)) {
2525 if (MD->size_overridden_methods() != 0) {
2533 auto Overrides = MD->overridden_methods();
2534 OS <<
"Overrides: [ ";
2535 dumpOverride(*Overrides.begin());
2536 for (
const auto *
Override : llvm::drop_begin(Overrides)) {
2546 OS <<
" implicit-inline";
2553 OS <<
" <<<NULL params x " << D->
getNumParams() <<
">>>";
2556 OS <<
" instantiated_from";
2573 OS <<
" aggregate ";
2580 OS <<
" extended by ";
2595 OS <<
" __module_private__";
2601 if (
const auto *
P = dyn_cast<ParmVarDecl>(D);
2602 P &&
P->isExplicitObjectParameter())
2617 OS <<
" tls_dynamic";
2621 OS <<
" __module_private__";
2640 OS <<
" parenlistinit";
2649 OS <<
" instantiated_from";
2691 llvm_unreachable(
"unexpected pragma comment kind");
2711 StringRef Arg = D->
getArg();
2713 OS <<
" \"" << Arg <<
"\"";
2723 if (D->isStandaloneDirective())
2724 OS <<
" openmp_standalone_directive";
2734 OS <<
" initializer";
2738 OS <<
" omp_priv = ";
2741 OS <<
" omp_priv ()";
2754 OS <<
"<<<NULL>>> OMPClause";
2759 StringRef ClauseName(
2760 llvm::omp::getOpenMPClauseName(
C->getClauseKind()));
2761 OS <<
"OMP" << ClauseName.substr(0, 1).upper()
2762 << ClauseName.drop_front() <<
"Clause";
2816 OS <<
" instantiated_from";
2819 if (
const auto *CTSD = dyn_cast<ClassTemplateSpecializationDecl>(D)) {
2821 if (CTSD->hasStrictPackMatch())
2822 OS <<
" strict-pack-match";
2833 OS <<
"DefinitionData";
2835#define FLAG(fn, name) \
2838 FLAG(isParsingBaseSpecifiers, parsing_base_specifiers);
2840 FLAG(isGenericLambda, generic);
2841 FLAG(isLambda, lambda);
2843 FLAG(isAnonymousStructOrUnion, is_anonymous);
2845 FLAG(isEmpty, empty);
2846 FLAG(isAggregate, aggregate);
2847 FLAG(isStandardLayout, standard_layout);
2848 FLAG(isTriviallyCopyable, trivially_copyable);
2851 FLAG(isPolymorphic, polymorphic);
2852 FLAG(isAbstract, abstract);
2853 FLAG(isLiteral, literal);
2855 FLAG(hasUserDeclaredConstructor, has_user_declared_ctor);
2856 FLAG(hasConstexprNonCopyMoveConstructor, has_constexpr_non_copy_move_ctor);
2857 FLAG(hasMutableFields, has_mutable_fields);
2858 FLAG(hasVariantMembers, has_variant_members);
2859 FLAG(allowConstDefaultInit, can_const_default_init);
2864 OS <<
"DefaultConstructor";
2866 FLAG(hasDefaultConstructor, exists);
2867 FLAG(hasTrivialDefaultConstructor, trivial);
2868 FLAG(hasNonTrivialDefaultConstructor, non_trivial);
2869 FLAG(hasUserProvidedDefaultConstructor, user_provided);
2870 FLAG(hasConstexprDefaultConstructor,
constexpr);
2871 FLAG(needsImplicitDefaultConstructor, needs_implicit);
2872 FLAG(defaultedDefaultConstructorIsConstexpr, defaulted_is_constexpr);
2878 OS <<
"CopyConstructor";
2880 FLAG(hasSimpleCopyConstructor, simple);
2881 FLAG(hasTrivialCopyConstructor, trivial);
2882 FLAG(hasNonTrivialCopyConstructor, non_trivial);
2883 FLAG(hasUserDeclaredCopyConstructor, user_declared);
2884 FLAG(hasCopyConstructorWithConstParam, has_const_param);
2885 FLAG(needsImplicitCopyConstructor, needs_implicit);
2886 FLAG(needsOverloadResolutionForCopyConstructor,
2887 needs_overload_resolution);
2889 FLAG(defaultedCopyConstructorIsDeleted, defaulted_is_deleted);
2890 FLAG(implicitCopyConstructorHasConstParam, implicit_has_const_param);
2896 OS <<
"MoveConstructor";
2898 FLAG(hasMoveConstructor, exists);
2899 FLAG(hasSimpleMoveConstructor, simple);
2900 FLAG(hasTrivialMoveConstructor, trivial);
2901 FLAG(hasNonTrivialMoveConstructor, non_trivial);
2902 FLAG(hasUserDeclaredMoveConstructor, user_declared);
2903 FLAG(needsImplicitMoveConstructor, needs_implicit);
2904 FLAG(needsOverloadResolutionForMoveConstructor,
2905 needs_overload_resolution);
2907 FLAG(defaultedMoveConstructorIsDeleted, defaulted_is_deleted);
2913 OS <<
"CopyAssignment";
2915 FLAG(hasSimpleCopyAssignment, simple);
2916 FLAG(hasTrivialCopyAssignment, trivial);
2917 FLAG(hasNonTrivialCopyAssignment, non_trivial);
2918 FLAG(hasCopyAssignmentWithConstParam, has_const_param);
2919 FLAG(hasUserDeclaredCopyAssignment, user_declared);
2920 FLAG(needsImplicitCopyAssignment, needs_implicit);
2921 FLAG(needsOverloadResolutionForCopyAssignment, needs_overload_resolution);
2922 FLAG(implicitCopyAssignmentHasConstParam, implicit_has_const_param);
2928 OS <<
"MoveAssignment";
2930 FLAG(hasMoveAssignment, exists);
2931 FLAG(hasSimpleMoveAssignment, simple);
2932 FLAG(hasTrivialMoveAssignment, trivial);
2933 FLAG(hasNonTrivialMoveAssignment, non_trivial);
2934 FLAG(hasUserDeclaredMoveAssignment, user_declared);
2935 FLAG(needsImplicitMoveAssignment, needs_implicit);
2936 FLAG(needsOverloadResolutionForMoveAssignment, needs_overload_resolution);
2944 FLAG(hasSimpleDestructor, simple);
2945 FLAG(hasIrrelevantDestructor, irrelevant);
2946 FLAG(hasTrivialDestructor, trivial);
2947 FLAG(hasNonTrivialDestructor, non_trivial);
2948 FLAG(hasUserDeclaredDestructor, user_declared);
2949 FLAG(hasConstexprDestructor,
constexpr);
2950 FLAG(needsImplicitDestructor, needs_implicit);
2951 FLAG(needsOverloadResolutionForDestructor, needs_overload_resolution);
2953 FLAG(defaultedDestructorIsDeleted, defaulted_is_deleted);
2957 for (
const auto &I : D->
bases()) {
2963 if (I.isPackExpansion())
2992 if (
const auto *USD =
2993 dyn_cast_if_present<UsingShadowDecl>(TC->getFoundDecl())) {
3075 OS <<
"constructed ";
3106 OS <<
" '" << Spec->getDeclName() <<
"'";
3134 OS <<
" synthesize";
3178 OS <<
" contravariant";
3204 for (
const auto *Child : D->
protocols())
3213 for (
const auto *Child : D->
protocols())
3260 OS <<
" unsafe_unretained";
3275 OS <<
" synthesize";
3287 OS <<
" captures_this";
3314 case llvm::dxbc::RootSignatureVersion::V1_0:
3317 case llvm::dxbc::RootSignatureVersion::V1_1:
3320 case llvm::dxbc::RootSignatureVersion::V1_2:
3329 OS << (E->
isInOut() ?
" inout" :
" out");
3402 for (
const Stmt *S :
C->children())
3416 for (
const Stmt *S :
C->children())
3422 const OpenACCRoutineDeclAttr *A) {
3426 for (
const Stmt *S :
C->children())
3432 OS <<
" " << llvm::omp::getOpenMPClauseName(A->getCaptureKind());
static double GetApproxValue(const llvm::APFloat &F)
Defines enumerations for traits support.
static bool isTrivial(ASTContext &Ctx, const Expr *E)
Checks if the expression is constant or does not have non-trivial function calls.
This file defines OpenMP nodes for declarative directives.
Defines the C++ template declaration subclasses.
Defines the clang::Module class, which describes a module in the source code.
llvm::SmallVector< std::pair< const MemRegion *, SVal >, 4 > Bindings
static std::string toString(const clang::SanitizerSet &Sanitizers)
Produce a string containing comma-separated names of sanitizers in Sanitizers set.
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.
static bool isSimpleAPValue(const APValue &Value)
True if the APValue Value can be folded onto the current line.
static void dumpBasePath(raw_ostream &OS, const CastExpr *Node)
static void dumpPreviousDeclImpl(raw_ostream &OS,...)
static void dumpPreviousDecl(raw_ostream &OS, const Decl *D)
Dump the previous declaration in the redeclaration chain for a declaration, if any.
C Language Family Type Representation.
OpenACCAtomicKind getAtomicKind() const
This class represents a 'loop' construct. The 'loop' construct applies to a 'for' loop (or range-for ...
bool isOrphanedLoopConstruct() const
OpenACC 3.3 2.9: An orphaned loop construct is a loop construct that is not lexically enclosed within...
OpenACCDirectiveKind getParentComputeConstructKind() const
llvm::APInt getValue() const
QualType getDynamicAllocType() const
APValue - This class implements a discriminated union of [uninitialized] [APSInt] [APFloat],...
@ Indeterminate
This object has an indeterminate value (C++ [basic.indet]).
@ None
There is no such object (it's outside its lifetime).
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
ArrayRef< Decl * > getModuleInitializers(Module *M)
Get the initializations to perform when importing a module, if any.
const clang::PrintingPolicy & getPrintingPolicy() const
ArrayRef< Module * > getModulesWithMergedDefinition(const NamedDecl *Def)
Get the additional modules in which the definition Def has been merged.
Represents an access specifier followed by colon ':'.
AddrLabelExpr - The GNU address of label extension, representing &&label.
LabelDecl * getLabel() const
An Embarcadero array type trait, as used in the implementation of __array_rank and __array_extent.
ArrayTypeTrait getTrait() const
Represents an array type, per C99 6.7.5.2 - Array Declarators.
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".
StringRef getOpcodeStr() const
bool hasStoredFPFeatures() const
FPOptionsOverride getStoredFPFeatures() const
Get FPFeatures from trailing storage.
A binding in a decomposition declaration.
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 the builtin template declaration which is used to implement __make_integer_seq and other b...
Represents a base class of a C++ class.
Represents binding an expression to a temporary.
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 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.
Represents a C++ constructor within a class.
Represents a C++ base or member initializer.
Represents a C++ deduction guide declaration.
DeductionCandidate getDeductionCandidateKind() const
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
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 '.
DeclarationName getMember() const
Retrieve the name of the member that this expression refers to.
Represents the code generated for an expanded expansion statement.
bool shouldApplyLifetimeExtensionToPreamble() const
CXXExpansionStmtPattern - Represents an unexpanded C++ expansion statement.
ExpansionStmtKind getKind() const
Represents an explicit C++ type conversion that uses "functional" notation (C++ [expr....
Represents a static or instance method of a struct/union/class.
Abstract class common to all of the C++ "named"/"keyword" casts.
const char * getCastName() const
getCastName - Get the name of the C++ cast being used, e.g., "static_cast", "dynamic_cast",...
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)".
FunctionDecl * getOperatorNew() const
A call to an overloaded operator written using operator syntax.
OverloadedOperatorKind getOperator() const
Returns the kind of overloaded operator that this expression refers to.
Represents a C++ struct/union/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.
A C++ static_cast expression (C++ [expr.static.cast]).
Represents the this expression in C++.
bool isCapturedByCopyInLambdaWithExplicitObjectParameter() const
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]).
bool hasStoredFPFeatures() const
FPOptionsOverride getFPFeatures() const
Represents the body of a CapturedStmt, and serves as its DeclContext.
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...
path_iterator path_begin()
bool hasStoredFPFeatures() const
static const char * getCastKindName(CastKind CK)
const CXXBaseSpecifier *const * path_const_iterator
FPOptionsOverride getFPFeatures() const
unsigned getValue() const
Declaration of a class template.
Represents a 'co_await' expression.
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
Declaration of a C++20 concept.
A reference to a concept and its template args, as it appears in the code.
Represents the specialization of a concept - evaluates to a prvalue of type bool.
NamedDecl * getFoundDecl() const
Represents the canonical version of C arrays with a specified constant size.
ConstantExpr - An expression that occurs in a constant context and optionally the result of evaluatin...
APValue getAPValueResult() const
bool hasAPValueResult() const
Represents a shadow constructor declaration introduced into a class by a C++11 using-declaration that...
CXXRecordDecl * getConstructedBaseClass() const
Get the base class whose constructor or constructor shadow declaration is passed the constructor argu...
bool constructsVirtualBase() const
Returns true if the constructed base class is a virtual base class subobject of this declaration's cl...
ConstructorUsingShadowDecl * getConstructedBaseClassShadowDecl() const
Get the inheriting constructor declaration for the base class for which we don't have an explicit ini...
ConstructorUsingShadowDecl * getNominatedBaseClassShadowDecl() const
Get the inheriting constructor declaration for the direct base class from which this using shadow dec...
CXXRecordDecl * getNominatedBaseClass() const
Get the base class that was named in the using declaration.
ConvertVectorExpr - Clang builtin function __builtin_convertvector This AST node provides support for...
FPOptionsOverride getStoredFPFeatures() const
Get FPFeatures from trailing storage.
bool hasStoredFPFeatures() const
Is FPFeatures in Trailing Storage?
Represents a 'co_return' statement in the C++ Coroutines TS.
DeclContext * getParent()
getParent - Returns the containing DeclContext.
A reference to a declared variable, function, enum, etc.
NamedDecl * getFoundDecl()
Get the NamedDecl through which this reference occurred.
NestedNameSpecifier getQualifier() const
If the name was qualified, retrieves the nested-name-specifier that precedes the name.
bool refersToEnclosingVariableOrCapture() const
Does this DeclRefExpr refer to an enclosing local or a captured variable?
bool isCapturedByCopyInLambdaWithExplicitObjectParameter() const
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.
TemplateDecl * getDescribedTemplate() const
If this is a declaration that describes some template, this method returns that template declaration.
FriendObjectKind getFriendObjectKind() const
Determines whether this declaration is the object of a friend declaration and, if so,...
ASTContext & getASTContext() const LLVM_READONLY
bool isImplicit() const
isImplicit - Indicates whether the declaration was implicitly generated by the implementation.
@ FOK_Undeclared
A friend of a previously-undeclared entity.
@ FOK_None
Not a friend object.
@ FOK_Declared
A friend of a previously-declared entity.
Module * getOwningModule() const
Get the module that owns this declaration (for visibility purposes).
bool isFromASTFile() const
Determine whether this declaration came from an AST file (such as a precompiled header or module) rat...
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.
The name of a declaration.
NestedNameSpecifier getQualifier() const
Retrieve the nested-name-specifier that qualifies the name of this declaration, if it was present in ...
TemplateName getUnderlying() const
DefaultArguments getDefaultArguments() const
A qualified reference to a name whose declaration cannot yet be resolved.
NestedNameSpecifier getQualifier() const
Retrieve the nested-name-specifier that qualifies this declaration.
Represents an array type in C++ whose size is a value-dependent expression.
Represents an extended vector type where either the type or size is dependent.
A template-id naming a variable template or a concept through a template template parameter.
bool isConceptReference() const
TemplateName getTemplateName() const
NestedNameSpecifier getQualifier() const
Return the nested name specifier that qualifies this name.
Symbolic representation of a dynamic allocation.
IdentifierInfo & getAccessor() const
Represents a reference to emded data.
unsigned getStartingElementPos() const
size_t getDataElementCount() 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...
QualType getTypeAsWritten() const
getTypeAsWritten - Returns the type that this expression is casting to, as written in the source code...
Represents an explicit instantiation of a template entity in source code.
TemplateSpecializationKind getTemplateSpecializationKind() const
bool isExternTemplate() const
NamedDecl * getSpecialization() const
NestedNameSpecifierLoc getQualifierLoc() const
Returns the qualifier regardless of where it is stored.
Represents an expression – generally a full-expression – that introduces cleanups to be run at the en...
CleanupObject getObject(unsigned i) const
unsigned getNumObjects() const
llvm::PointerUnion< BlockDecl *, CompoundLiteralExpr * > CleanupObject
The type of objects that are kept in the cleanup.
This represents one expression.
bool isValueDependent() const
Determines whether the value of this expression depends on.
An expression trait intrinsic.
ExpressionTrait getTrait() const
ExtVectorElementExpr - This represents access to specific elements of a vector, and may occur on the ...
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).
std::string getValueAsString(unsigned Radix) const
double getValueAsApproximateDouble() const
getValueAsApproximateDouble - This returns the value as an inaccurate double.
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
Declaration of a friend template.
TemplateName getFriendTemplateName() const
FriendTemplateEntityKind getFriendKind() const
Represents a function declaration or definition.
StringLiteral * getDeletedMessage() const
Get the message that indicates why this function was deleted.
bool isInlined() const
Determine whether this function should be inlined, because it is either marked "inline" or "constexpr...
FunctionDecl * getTemplateInstantiationPattern(bool ForDefinition=true) const
Retrieve the function declaration from which this function could be instantiated, if it is an instant...
bool isTrivial() const
Whether this function is "trivial" in some specialized C++ senses.
param_iterator param_begin()
bool isDeleted() const
Whether this function has been deleted.
StorageClass getStorageClass() const
Returns the storage class as written in the source.
bool isDeletedAsWritten() const
bool isPureVirtual() const
Whether this virtual function is pure, i.e.
bool isDefaulted() const
Whether this function is defaulted.
bool isIneligibleOrNotSelected() const
TemplateSpecializationKind getTemplateSpecializationKind() const
Determine what kind of template instantiation this function represents.
bool isVirtualAsWritten() const
Whether this function is marked as virtual explicitly.
unsigned getNumParams() const
Return the number of parameters this function must have based on its FunctionType.
bool isInlineSpecified() const
Determine whether the "inline" keyword was specified for this function.
Represents a prototype with parameter type info, e.g.
Declaration of a template function.
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.
This class represents temporary values used to represent inout and out arguments in HLSL.
bool isInOut() const
returns true if the parameter is inout and false if the parameter is out.
ArrayRef< llvm::hlsl::rootsig::RootElement > getRootElements() const
llvm::dxbc::RootSignatureVersion getVersion() const
const char * getNameStart() const
Return the beginning of the actual null-terminated string for this identifier.
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 a module import declaration, which makes the contents of the named module visible in the cu...
Module * getImportedModule() const
Retrieve the module that was imported by the import declaration.
Represents a field injected from an anonymous union/struct into the parent scope.
ArrayRef< NamedDecl * > chain() const
Describes an C or C++ initializer list.
FieldDecl * getInitializedFieldInUnion()
If this initializes a union, specifies which field in the union to initialize.
Represents the declaration of a label.
LabelStmt - Represents a label, which has a substatement.
const char * getName() const
Implicit declaration of a temporary that was materialized by a MaterializeTemporaryExpr and lifetime-...
unsigned getManglingNumber() const
ValueDecl * getExtendingDecl()
Represents a linkage specification.
LinkageSpecLanguageIDs getLanguage() const
Return the language specified by this linkage specification.
Base class for BreakStmt and ContinueStmt.
LabelDecl * getLabelDecl()
const Stmt * getNamedLoopOrSwitch() const
If this is a named break/continue, get the loop or switch statement that this targets.
bool hasLabelTarget() const
Represents a prvalue temporary that is written into memory so that a reference can bind to it.
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.
NestedNameSpecifier getQualifier() const
If the member name was qualified, retrieves the nested-name-specifier that precedes the member name.
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?
Provides common interface for the Decls that cannot be redeclared, but can be merged if the same decl...
decl_type * getFirstDecl()
Return the first declaration of this declaration or itself if this is the only declaration.
Describes a module or submodule.
std::string getFullModuleName(bool AllowStringLiterals=false) const
Retrieve the full name of this module, including the path from its top-level module.
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.
IdentifierInfo * getIdentifier() const
Get the identifier that names this declaration, if there is one.
StringRef getName() const
Get the name of identifier for this declaration as a StringRef.
Visibility getVisibility() const
Determines the visibility of this entity.
DeclarationName getDeclName() const
Get the actual, stored name of the declaration, which may be a special name.
Linkage getFormalLinkage() const
Get the linkage from a semantic point of view.
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.
NestedNameSpecifier getNestedNameSpecifier() const
Retrieve the nested-name-specifier to which this instance refers.
Represents a C++ nested name specifier, such as "\::std::vector<int>::".
NamespaceAndPrefix getAsNamespaceAndPrefix() const
void print(raw_ostream &OS, const PrintingPolicy &Policy, bool ResolveTemplateArguments=false, bool PrintFinalScopeResOp=true) const
Print this nested name specifier to the given output stream.
const Type * getAsType() const
@ MicrosoftSuper
Microsoft's '__super' specifier, stored as a CXXRecordDecl* of the class it appeared in.
@ Global
The global specifier '::'. There is no stored value.
@ Type
A type, stored as a Type*.
@ Namespace
A namespace-like entity, stored as a NamespaceBaseDecl*.
NonTypeTemplateParmDecl - Declares a non-type template parameter, e.g., "Size" in.
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.
Pseudo declaration for capturing expressions.
This is a basic class for representing single OpenMP clause.
This represents 'pragma omp declare reduction ...' directive.
Expr * getInitializer()
Get initializer expression (if specified) of the declare reduction construct.
Expr * getCombiner()
Get combiner expression of the declare reduction construct.
OMPDeclareReductionInitKind getInitializerKind() const
Get initializer kind.
OpenMP 5.0 [2.1.6 Iterators] Iterators are identifiers that expand to multiple values in the clause o...
IteratorRange getIteratorRange(unsigned I)
Gets the iterator range for the given iterator.
unsigned numOfIterators() const
Returns number of iterator definitions.
Decl * getIteratorDecl(unsigned I)
Gets the iterator declaration for the given iterator.
This represents 'pragma omp requires...' directive.
clauselist_range clauselists()
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),...
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.
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.
ReceiverKind getReceiverKind() const
Determine the kind of receiver that this message is being sent to.
ObjCMethodDecl - Represents an instance or class method declaration.
Selector getSelector() const
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.
OpenACCDirectiveKind getDirectiveKind() const
ArrayRef< const OpenACCClause * > clauses() const
This is the base class for an OpenACC statement-level construct, other construct types are expected t...
OpenACCDirectiveKind getDirectiveKind() const
SourceLocation getRParenLoc() const
const Expr * getFunctionReference() const
SourceLocation getLParenLoc() const
UnresolvedSetImpl::iterator decls_iterator
decls_iterator decls_begin() const
decls_iterator decls_end() const
DeclarationName getName() const
Gets the name looked up.
A structure for storing a pack-index-template-name ([temp.names]).
bool isFullySubstituted() const
TemplateName getPattern() const
Expr * getIndexExpr() const
UnsignedOrNone getSelectedIndex() const
ArrayRef< TemplateName > getExpansions() const
Represents a #pragma detect_mismatch line.
StringRef getName() const
StringRef getValue() const
[C99 6.4.2.2] - A predefined identifier such as func.
StringRef getIdentKindName() const
PredefinedIdentKind getIdentKind() const
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.
A (possibly-)qualified type.
void print(raw_ostream &OS, const PrintingPolicy &Policy, const Twine &PlaceHolder=Twine(), unsigned Indentation=0) const
SplitQualType split() const
Divides a QualType into its unqualified type and a set of local qualifiers.
std::string getAsString() const
static std::string getAsString(SplitQualType split, const PrintingPolicy &Policy)
Represents a template name as written in source code.
NestedNameSpecifier getQualifier() const
Return the nested name specifier that qualifies this name.
TemplateName getUnderlyingTemplate() const
Return the underlying template name.
bool hasTemplateKeyword() const
Whether the template name was prefixed by the "template" keyword.
Represents a struct/union/class.
Provides common interface for the Decls that can be redeclared.
decl_type * getFirstDecl()
Return the first declaration of this declaration or itself if this is the only declaration.
decl_type * getPreviousDecl()
Return the previous declaration of this declaration or NULL if this is the first declaration.
Base for LValueReferenceType and RValueReferenceType.
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.
ReturnStmt - This represents a return, optionally of an expression: return; return 4;.
const VarDecl * getNRVOCandidate() const
Retrieve the variable that might be used for the named return value optimization.
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.
void 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
Prints the contents of the string to OS.
A structure for storing the information associated with a substituted template template parameter.
TemplateName getReplacement() const
TemplateTemplateParmDecl * getParameter() const
UnsignedOrNone getPackIndex() const
unsigned getIndex() const
Returns the index of the replaced parameter in the associated declaration.
Decl * getAssociatedDecl() const
A template-like entity which owns the whole pattern being substituted.
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.
Represents the declaration of a struct/union/class/enum.
StringRef getKindName() const
bool isCompleteDefinition() const
Return true if this decl has its body fully specified.
TypedefNameDecl * getTypedefNameForAnonDecl() const
NestedNameSpecifier getQualifier() const
Retrieve the nested-name-specifier that qualifies the name of this declaration, if it was present in ...
Represents a template argument.
TemplateName getAsTemplate() const
Retrieve the template name for a template name argument.
bool structurallyEquals(const TemplateArgument &Other) const
Determines whether two template arguments are superficially the same.
void print(const PrintingPolicy &Policy, raw_ostream &Out, bool IncludeType) const
Print this template argument to the given output stream.
ValueDecl * getAsDecl() const
Retrieve the declaration for a declaration non-type template argument.
bool isCanonicalExpr() const
TemplateName getAsTemplateOrTemplatePattern() const
Retrieve the template argument as a template name; if the argument is a pack expansion,...
The base class of all kinds of template declarations (e.g., class, function, etc.).
Represents a C++ template name within the type system.
TemplateDecl * getAsTemplateDecl(bool IgnoreDeduced=false) const
Retrieve the underlying template declaration that this template name refers to, if known.
DeducedTemplateStorage * getAsDeducedTemplateName() const
Retrieve the deduced template info, if any.
DependentTemplateName * getAsDependentTemplateName() const
Retrieve the underlying dependent template name structure, if any.
QualifiedTemplateName * getAsQualifiedTemplateName() const
Retrieve the underlying qualified template name structure, if any.
void print(raw_ostream &OS, const PrintingPolicy &Policy, Qualified Qual=Qualified::AsWritten) const
Print the template name.
@ UsingTemplate
A template name that refers to a template declaration found through a specific using shadow declarati...
@ OverloadedTemplate
A set of overloaded template declarations.
@ PackIndexingTemplate
A pack-index-template-name.
@ Template
A single template declaration.
@ DependentTemplate
A dependent template name that has not been resolved to a template (or set of templates).
@ SubstTemplateTemplateParm
A template template parameter that has been substituted for some other template name.
@ SubstTemplateTemplateParmPack
A template template parameter pack that has been substituted for a template template argument pack,...
@ DeducedTemplate
A template name that refers to another TemplateName with deduced default arguments.
@ QualifiedTemplate
A qualified template name, where the qualification is kept to describe the source code as written.
@ AssumedTemplate
An unqualified-id that has been assumed to name a function template that will be found by ADL.
UsingShadowDecl * getAsUsingShadowDecl() const
Retrieve the using shadow declaration through which the underlying template declaration is introduced...
SubstTemplateTemplateParmStorage * getAsSubstTemplateTemplateParm() const
Retrieve the substituted template template parameter, if known.
PackIndexingTemplateStorage * getAsPackIndexingTemplate() const
Retrieve the pack-index-template-name storage, if any.
TemplateTemplateParmDecl - Declares a template template parameter, e.g., "T" in.
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.
unsigned getDepth() const
Get the nesting depth of the template parameter.
Declaration of a template type parameter.
bool wasDeclaredWithTypename() const
Whether this template type parameter was declared with the 'typename' keyword.
unsigned getIndex() const
Retrieve the index of the template parameter.
const TypeConstraint * getTypeConstraint() const
Returns the type constraint associated with this template parameter (if any).
bool isParameterPack() const
Returns whether this is a parameter pack.
unsigned getDepth() const
Retrieve the depth of the template parameter.
void VisitCXXFunctionalCastExpr(const CXXFunctionalCastExpr *Node)
void VisitDeducedType(const DeducedType *T)
void VisitEnumDecl(const EnumDecl *D)
void VisitExprWithCleanups(const ExprWithCleanups *Node)
void visitInlineCommandComment(const comments::InlineCommandComment *C, const comments::FullComment *)
void VisitCXXStaticCastExpr(const CXXStaticCastExpr *Node)
void visitVerbatimBlockComment(const comments::VerbatimBlockComment *C, const comments::FullComment *)
void dumpPointer(const void *Ptr)
void VisitDeclarationTemplateArgument(const TemplateArgument &TA)
void VisitOpenACCLoopConstruct(const OpenACCLoopConstruct *S)
void VisitLinkageSpecDecl(const LinkageSpecDecl *D)
void VisitVectorType(const VectorType *T)
void VisitLoopControlStmt(const LoopControlStmt *L)
void VisitHLSLRootSignatureDecl(const HLSLRootSignatureDecl *D)
void VisitCoawaitExpr(const CoawaitExpr *Node)
void VisitUnaryOperator(const UnaryOperator *Node)
void dumpAccessSpecifier(AccessSpecifier AS)
void VisitExplicitInstantiationDecl(const ExplicitInstantiationDecl *D)
void VisitHLSLOutArgExpr(const HLSLOutArgExpr *E)
void VisitDeducedTemplateSpecializationType(const DeducedTemplateSpecializationType *T)
void VisitObjCSelectorExpr(const ObjCSelectorExpr *Node)
void VisitCXXOperatorCallExpr(const CXXOperatorCallExpr *Node)
void VisitCXXUnresolvedConstructExpr(const CXXUnresolvedConstructExpr *Node)
void VisitPragmaCommentDecl(const PragmaCommentDecl *D)
void VisitOpenACCRoutineDecl(const OpenACCRoutineDecl *D)
void VisitDependentScopeDeclRefExpr(const DependentScopeDeclRefExpr *Node)
void VisitImportDecl(const ImportDecl *D)
void VisitUsingEnumDecl(const UsingEnumDecl *D)
void VisitOMPCapturedExprDecl(const OMPCapturedExprDecl *D)
void VisitUnresolvedUsingType(const UnresolvedUsingType *T)
void VisitObjCProtocolExpr(const ObjCProtocolExpr *Node)
void VisitOMPCaptureKindAttr(const OMPCaptureKindAttr *A)
void VisitIntegralTemplateArgument(const TemplateArgument &TA)
void VisitCXXExpansionStmtInstantiation(const CXXExpansionStmtInstantiation *Node)
void VisitObjCCategoryDecl(const ObjCCategoryDecl *D)
void VisitIndirectFieldDecl(const IndirectFieldDecl *D)
void VisitNullTemplateArgument(const TemplateArgument &TA)
void VisitPackTemplateArgument(const TemplateArgument &TA)
void VisitUsingType(const UsingType *T)
void VisitInjectedClassNameType(const InjectedClassNameType *T)
void VisitBinaryOperator(const BinaryOperator *Node)
void VisitUnresolvedLookupExpr(const UnresolvedLookupExpr *Node)
void VisitObjCInterfaceDecl(const ObjCInterfaceDecl *D)
void VisitBlockDecl(const BlockDecl *D)
void VisitCXXDeleteExpr(const CXXDeleteExpr *Node)
void VisitObjCBoxedExpr(const ObjCBoxedExpr *Node)
void VisitNullPtrTemplateArgument(const TemplateArgument &TA)
void VisitVarTemplateDecl(const VarTemplateDecl *D)
void VisitSubstTemplateTypeParmPackType(const SubstTemplateTypeParmPackType *T)
void VisitConceptSpecializationExpr(const ConceptSpecializationExpr *Node)
void VisitCXXDeductionGuideDecl(const CXXDeductionGuideDecl *D)
TextNodeDumper(raw_ostream &OS, const ASTContext &Context, bool ShowColors)
void VisitPredefinedExpr(const PredefinedExpr *Node)
void dumpType(QualType T)
void VisitDependentTemplateIdExpr(const DependentTemplateIdExpr *Node)
void VisitMatrixElementExpr(const MatrixElementExpr *Node)
void VisitObjCEncodeExpr(const ObjCEncodeExpr *Node)
void dumpNestedNameSpecifier(NestedNameSpecifier NNS)
void VisitStructuralValueTemplateArgument(const TemplateArgument &TA)
void VisitHLSLBufferDecl(const HLSLBufferDecl *D)
void VisitUnresolvedUsingValueDecl(const UnresolvedUsingValueDecl *D)
void VisitNamespaceAliasDecl(const NamespaceAliasDecl *D)
void VisitObjCMessageExpr(const ObjCMessageExpr *Node)
void dumpSourceRange(SourceRange R)
void VisitMemberExpr(const MemberExpr *Node)
void VisitOpenACCDataConstruct(const OpenACCDataConstruct *S)
void dumpBareTemplateName(TemplateName TN)
void VisitOpenACCConstructStmt(const OpenACCConstructStmt *S)
void VisitCompoundStmt(const CompoundStmt *Node)
void VisitConstantExpr(const ConstantExpr *Node)
void VisitObjCIvarRefExpr(const ObjCIvarRefExpr *Node)
void VisitOpenACCDeclareDecl(const OpenACCDeclareDecl *D)
void VisitOpenACCAsteriskSizeExpr(const OpenACCAsteriskSizeExpr *S)
void VisitMaterializeTemporaryExpr(const MaterializeTemporaryExpr *Node)
void VisitConstructorUsingShadowDecl(const ConstructorUsingShadowDecl *D)
void VisitWhileStmt(const WhileStmt *Node)
void VisitCharacterLiteral(const CharacterLiteral *Node)
void VisitAccessSpecDecl(const AccessSpecDecl *D)
void VisitFunctionType(const FunctionType *T)
void VisitObjCImplementationDecl(const ObjCImplementationDecl *D)
void VisitReturnStmt(const ReturnStmt *Node)
void VisitTypeLoc(TypeLoc TL)
void VisitAutoType(const AutoType *T)
void VisitObjCInterfaceType(const ObjCInterfaceType *T)
void visitVerbatimLineComment(const comments::VerbatimLineComment *C, const comments::FullComment *)
void VisitTypedefDecl(const TypedefDecl *D)
void VisitUnaryExprOrTypeTraitExpr(const UnaryExprOrTypeTraitExpr *Node)
void visitParamCommandComment(const comments::ParamCommandComment *C, const comments::FullComment *FC)
void VisitIntegerLiteral(const IntegerLiteral *Node)
void VisitObjCProtocolDecl(const ObjCProtocolDecl *D)
void VisitGotoStmt(const GotoStmt *Node)
void VisitDependentSizedExtVectorType(const DependentSizedExtVectorType *T)
void VisitFriendDecl(const FriendDecl *D)
void VisitSwitchStmt(const SwitchStmt *Node)
void VisitCXXBindTemporaryExpr(const CXXBindTemporaryExpr *Node)
void VisitEmbedExpr(const EmbedExpr *S)
void VisitFunctionTemplateDecl(const FunctionTemplateDecl *D)
void VisitTemplateTemplateParmDecl(const TemplateTemplateParmDecl *D)
void VisitUsingDecl(const UsingDecl *D)
void VisitConstantArrayType(const ConstantArrayType *T)
void VisitTypeTemplateArgument(const TemplateArgument &TA)
void VisitObjCPropertyDecl(const ObjCPropertyDecl *D)
void VisitObjCCategoryImplDecl(const ObjCCategoryImplDecl *D)
void VisitObjCSubscriptRefExpr(const ObjCSubscriptRefExpr *Node)
void VisitArrayType(const ArrayType *T)
void visitHTMLEndTagComment(const comments::HTMLEndTagComment *C, const comments::FullComment *)
void VisitObjCAtCatchStmt(const ObjCAtCatchStmt *Node)
void visitTextComment(const comments::TextComment *C, const comments::FullComment *)
void VisitLifetimeExtendedTemporaryDecl(const LifetimeExtendedTemporaryDecl *D)
void VisitCXXRecordDecl(const CXXRecordDecl *D)
void VisitTemplateTemplateArgument(const TemplateArgument &TA)
void dumpCleanupObject(const ExprWithCleanups::CleanupObject &C)
void VisitOpenACCExitDataConstruct(const OpenACCExitDataConstruct *S)
void VisitCaseStmt(const CaseStmt *Node)
void VisitRValueReferenceType(const ReferenceType *T)
void VisitPackExpansionType(const PackExpansionType *T)
void VisitConceptDecl(const ConceptDecl *D)
void VisitOpenACCEnterDataConstruct(const OpenACCEnterDataConstruct *S)
void VisitCallExpr(const CallExpr *Node)
void VisitCapturedDecl(const CapturedDecl *D)
void VisitOpenACCWaitConstruct(const OpenACCWaitConstruct *S)
void VisitBuiltinTemplateDecl(const BuiltinTemplateDecl *D)
void VisitObjCPropertyRefExpr(const ObjCPropertyRefExpr *Node)
void VisitOMPDeclareReductionDecl(const OMPDeclareReductionDecl *D)
void VisitCoreturnStmt(const CoreturnStmt *Node)
void VisitSizeOfPackExpr(const SizeOfPackExpr *Node)
void VisitDeclRefExpr(const DeclRefExpr *Node)
void VisitLabelStmt(const LabelStmt *Node)
void VisitOpenACCUpdateConstruct(const OpenACCUpdateConstruct *S)
void Visit(const comments::Comment *C, const comments::FullComment *FC)
void VisitLabelDecl(const LabelDecl *D)
void VisitUnaryTransformType(const UnaryTransformType *T)
void VisitStringLiteral(const StringLiteral *Str)
void VisitOMPRequiresDecl(const OMPRequiresDecl *D)
void dumpBareType(QualType T, bool Desugar=true)
void VisitTemplateSpecializationType(const TemplateSpecializationType *T)
void VisitOpenACCInitConstruct(const OpenACCInitConstruct *S)
void VisitTemplateTypeParmDecl(const TemplateTypeParmDecl *D)
void VisitCompoundAssignOperator(const CompoundAssignOperator *Node)
void VisitCXXThisExpr(const CXXThisExpr *Node)
void VisitOpenACCRoutineDeclAttr(const OpenACCRoutineDeclAttr *A)
void dumpName(const NamedDecl *ND)
void dumpTemplateName(TemplateName TN, StringRef Label={})
void VisitArrayTypeTraitExpr(const ArrayTypeTraitExpr *Node)
void VisitObjCIvarDecl(const ObjCIvarDecl *D)
void VisitFieldDecl(const FieldDecl *D)
void dumpDeclRef(const Decl *D, StringRef Label={})
void VisitRecordDecl(const RecordDecl *D)
void VisitCXXNewExpr(const CXXNewExpr *Node)
void VisitObjCBoolLiteralExpr(const ObjCBoolLiteralExpr *Node)
void VisitCastExpr(const CastExpr *Node)
void VisitObjCTypeParamDecl(const ObjCTypeParamDecl *D)
void VisitSubstTemplateTypeParmType(const SubstTemplateTypeParmType *T)
void VisitExpressionTraitExpr(const ExpressionTraitExpr *Node)
void VisitAddrLabelExpr(const AddrLabelExpr *Node)
void VisitUnresolvedUsingTypenameDecl(const UnresolvedUsingTypenameDecl *D)
void VisitCXXDependentScopeMemberExpr(const CXXDependentScopeMemberExpr *Node)
void VisitOpenACCAtomicConstruct(const OpenACCAtomicConstruct *S)
void dumpLinkageAndVisibility(const NamedDecl *ND)
void visitBlockCommandComment(const comments::BlockCommandComment *C, const comments::FullComment *)
void VisitExpressionTemplateArgument(const TemplateArgument &TA)
void VisitTypeAliasDecl(const TypeAliasDecl *D)
void VisitVarDecl(const VarDecl *D)
void VisitOpenACCCacheConstruct(const OpenACCCacheConstruct *S)
void VisitFixedPointLiteral(const FixedPointLiteral *Node)
void VisitOMPIteratorExpr(const OMPIteratorExpr *Node)
void VisitUsingDirectiveDecl(const UsingDirectiveDecl *D)
void VisitObjCMethodDecl(const ObjCMethodDecl *D)
void VisitObjCPropertyImplDecl(const ObjCPropertyImplDecl *D)
void VisitUsingShadowDecl(const UsingShadowDecl *D)
void VisitNamespaceDecl(const NamespaceDecl *D)
void VisitTypeAliasTemplateDecl(const TypeAliasTemplateDecl *D)
void VisitOpenACCHostDataConstruct(const OpenACCHostDataConstruct *S)
void VisitCXXBoolLiteralExpr(const CXXBoolLiteralExpr *Node)
void VisitIfStmt(const IfStmt *Node)
void VisitCXXConstructExpr(const CXXConstructExpr *Node)
void VisitFunctionProtoType(const FunctionProtoType *T)
void dumpTemplateArgument(const TemplateArgument &TA)
void dumpLocation(SourceLocation Loc)
void VisitDependentSizedArrayType(const DependentSizedArrayType *T)
void VisitOpenACCCombinedConstruct(const OpenACCCombinedConstruct *S)
void VisitOMPExecutableDirective(const OMPExecutableDirective *D)
void VisitImplicitCastExpr(const ImplicitCastExpr *Node)
void VisitCXXDefaultArgExpr(const CXXDefaultArgExpr *Node)
void VisitCXXNamedCastExpr(const CXXNamedCastExpr *Node)
void VisitTagType(const TagType *T)
void VisitTemplateExpansionTemplateArgument(const TemplateArgument &TA)
void VisitSYCLUniqueStableNameExpr(const SYCLUniqueStableNameExpr *Node)
void VisitNonTypeTemplateParmDecl(const NonTypeTemplateParmDecl *D)
void VisitOpenACCSetConstruct(const OpenACCSetConstruct *S)
void VisitFunctionDecl(const FunctionDecl *D)
void visitTParamCommandComment(const comments::TParamCommandComment *C, const comments::FullComment *FC)
void VisitTypeTraitExpr(const TypeTraitExpr *Node)
void dumpBareDeclRef(const Decl *D)
void VisitExtVectorElementExpr(const ExtVectorElementExpr *Node)
void VisitConvertVectorExpr(const ConvertVectorExpr *S)
void visitVerbatimBlockLineComment(const comments::VerbatimBlockLineComment *C, const comments::FullComment *)
void VisitOpenACCShutdownConstruct(const OpenACCShutdownConstruct *S)
void dumpBareConcept(TemplateName TN)
void VisitFloatingLiteral(const FloatingLiteral *Node)
void VisitInitListExpr(const InitListExpr *ILE)
void VisitRequiresExpr(const RequiresExpr *Node)
void VisitVariableArrayType(const VariableArrayType *T)
void VisitGenericSelectionExpr(const GenericSelectionExpr *E)
void VisitTemplateTypeParmType(const TemplateTypeParmType *T)
void VisitCXXDefaultInitExpr(const CXXDefaultInitExpr *Node)
void VisitFriendTemplateDecl(const FriendTemplateDecl *D)
void visitHTMLStartTagComment(const comments::HTMLStartTagComment *C, const comments::FullComment *)
void VisitEnumConstantDecl(const EnumConstantDecl *D)
void VisitPragmaDetectMismatchDecl(const PragmaDetectMismatchDecl *D)
void dumpTemplateSpecializationKind(TemplateSpecializationKind TSK)
void VisitAtomicExpr(const AtomicExpr *AE)
void VisitObjCCompatibleAliasDecl(const ObjCCompatibleAliasDecl *D)
void VisitClassTemplateDecl(const ClassTemplateDecl *D)
void VisitBindingDecl(const BindingDecl *D)
void VisitCXXExpansionStmtPattern(const CXXExpansionStmtPattern *Node)
void VisitTypedefType(const TypedefType *T)
TextTreeStructure(raw_ostream &OS, bool ShowColors)
void AddChild(Fn DoAddChild)
Add a child of the current node. Calls DoAddChild without arguments.
Represents the declaration of a typedef-name via a C++11 alias-declaration.
Declaration of an alias template.
Symbolic representation of typeid(T) for some type T.
RetTy Visit(TypeLoc TyLoc)
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.
A type trait used in the implementation of various C++11 and Library TR1 trait templates.
TypeTrait getTrait() const
Determine which type trait this expression uses.
RetTy Visit(const Type *T)
Performs the operation associated with this visitor object.
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,...
TagDecl * getAsTagDecl() const
Retrieves the TagDecl that this type refers to, either because the type is a TagType or because it is...
bool isDependentType() const
Whether this type is a dependent type, meaning that its definition somehow depends on a template para...
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
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++.
bool hasStoredFPFeatures() const
Is FPFeatures in Trailing Storage?
FPOptionsOverride getStoredFPFeatures() const
Get FPFeatures from trailing storage.
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,...
Represents a dependent using declaration which was marked with typename.
NestedNameSpecifier getQualifier() const
Retrieve the nested-name-specifier that qualifies the name.
Represents a dependent using declaration which was not marked with typename.
NestedNameSpecifier getQualifier() const
Retrieve the nested-name-specifier that qualifies the name.
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.
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.
VarTemplateDecl * getDescribedVarTemplate() const
Retrieves the variable template that is described by this variable declaration.
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).
QualType::DestructionKind needsDestruction(const ASTContext &Ctx) const
Would the destruction of this variable have any effect, and if so, what kind?
bool isInline() const
Whether this variable is (C++1z) inline.
const Expr * getInit() const
const APValue * evaluateValue() const
Attempt to evaluate the value of the initializer attached to this declaration, and produce notes expl...
@ 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.
TemplateSpecializationKind getTemplateSpecializationKind() const
If this variable is an instantiation of a variable template or a static data member of a class templa...
Declaration of a variable template.
Represents a C array with a specified size that is not an integer-constant-expression.
Represents a GCC generic vector type.
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...
void Visit(REF(TemplateArgument) TA, ParamTys... P)
Top level wrappers for InstallAPI frontend operations.
const char * getTraitSpelling(TypeTrait T) LLVM_READONLY
Return the spelling of the trait T. Never null.
bool isa(CodeGen::Address addr)
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 (&&).
@ OK_VectorComponent
A vector component is an element or range of elements of a vector.
@ OK_ObjCProperty
An Objective-C property is a logical field of an Objective-C object which is read and written via Obj...
@ OK_ObjCSubscript
An Objective-C array/dictionary subscripting which reads an object or writes at the subscripted array...
@ OK_Ordinary
An ordinary object is located at an address in memory.
@ OK_BitField
A bitfield object is a bitfield on a C or C++ record.
@ OK_MatrixComponent
A matrix component is a single element or range of elements of a matrix.
@ Override
Merge availability attributes for an override, which requires an exact match or a weakening of constr...
@ Auto
'auto' clause, allowed on 'loop' directives.
@ Bind
'bind' clause, allowed on routine constructs.
@ Gang
'gang' clause, allowed on 'loop' and Combined constructs.
@ Wait
'wait' clause, allowed on Compute, Data, 'update', and Combined constructs.
@ DevicePtr
'deviceptr' clause, allowed on Compute and Combined Constructs, plus 'data' and 'declare'.
@ PCopyOut
'copyout' clause alias 'pcopyout'. Preserved for diagnostic purposes.
@ VectorLength
'vector_length' clause, allowed on 'parallel', 'kernels', 'parallel loop', and 'kernels loop' constru...
@ Async
'async' clause, allowed on Compute, Data, 'update', 'wait', and Combined constructs.
@ PresentOrCreate
'create' clause alias 'present_or_create'.
@ Collapse
'collapse' clause, allowed on 'loop' and Combined constructs.
@ NoHost
'nohost' clause, allowed on 'routine' directives.
@ PresentOrCopy
'copy' clause alias 'present_or_copy'. Preserved for diagnostic purposes.
@ DeviceNum
'device_num' clause, allowed on 'init', 'shutdown', and 'set' constructs.
@ Private
'private' clause, allowed on 'parallel', 'serial', 'loop', 'parallel loop', and 'serial loop' constru...
@ Invalid
Represents an invalid clause, for the purposes of parsing.
@ Vector
'vector' clause, allowed on 'loop', Combined, and 'routine' directives.
@ Copy
'copy' clause, allowed on Compute and Combined Constructs, plus 'data' and 'declare'.
@ Worker
'worker' clause, allowed on 'loop', Combined, and 'routine' directives.
@ Create
'create' clause, allowed on Compute and Combined constructs, plus 'data', 'enter data',...
@ DeviceType
'device_type' clause, allowed on Compute, 'data', 'init', 'shutdown', 'set', update',...
@ DefaultAsync
'default_async' clause, allowed on 'set' construct.
@ Attach
'attach' clause, allowed on Compute and Combined constructs, plus 'data' and 'enter data'.
@ Shortloop
'shortloop' is represented in the ACC.td file, but isn't present in the standard.
@ NumGangs
'num_gangs' clause, allowed on 'parallel', 'kernels', parallel loop', and 'kernels loop' constructs.
@ If
'if' clause, allowed on all the Compute Constructs, Data Constructs, Executable Constructs,...
@ Default
'default' clause, allowed on parallel, serial, kernel (and compound) constructs.
@ UseDevice
'use_device' clause, allowed on 'host_data' construct.
@ NoCreate
'no_create' clause, allowed on allowed on Compute and Combined constructs, plus 'data'.
@ PresentOrCopyOut
'copyout' clause alias 'present_or_copyout'.
@ Link
'link' clause, allowed on 'declare' construct.
@ Reduction
'reduction' clause, allowed on Parallel, Serial, Loop, and the combined constructs.
@ Self
'self' clause, allowed on Compute and Combined Constructs, plus 'update'.
@ CopyOut
'copyout' clause, allowed on Compute and Combined constructs, plus 'data', 'exit data',...
@ Seq
'seq' clause, allowed on 'loop' and 'routine' directives.
@ FirstPrivate
'firstprivate' clause, allowed on 'parallel', 'serial', 'parallel loop', and 'serial loop' constructs...
@ Host
'host' clause, allowed on 'update' construct.
@ PCopy
'copy' clause alias 'pcopy'. Preserved for diagnostic purposes.
@ Tile
'tile' clause, allowed on 'loop' and Combined constructs.
@ PCopyIn
'copyin' clause alias 'pcopyin'. Preserved for diagnostic purposes.
@ DeviceResident
'device_resident' clause, allowed on the 'declare' construct.
@ PCreate
'create' clause alias 'pcreate'. Preserved for diagnostic purposes.
@ Present
'present' clause, allowed on Compute and Combined constructs, plus 'data' and 'declare'.
@ DType
'dtype' clause, an alias for 'device_type', stored separately for diagnostic purposes.
@ CopyIn
'copyin' clause, allowed on Compute and Combined constructs, plus 'data', 'enter data',...
@ Device
'device' clause, allowed on the 'update' construct.
@ Independent
'independent' clause, allowed on 'loop' directives.
@ NumWorkers
'num_workers' clause, allowed on 'parallel', 'kernels', parallel loop', and 'kernels loop' constructs...
@ IfPresent
'if_present' clause, allowed on 'host_data' and 'update' directives.
@ Detach
'detach' clause, allowed on the 'exit data' construct.
@ Delete
'delete' clause, allowed on the 'exit data' construct.
@ PresentOrCopyIn
'copyin' clause alias 'present_or_copyin'.
@ Finalize
'finalize' clause, allowed on 'exit data' directive.
AccessSpecifier
A C++ access specifier (public, private, protected), plus the special value "none" which means differ...
StorageClass
Storage classes.
IdentifierLoc DeviceTypeArgument
@ VisibleNone
No linkage according to the standard, but is visible from other translation units because of types de...
@ None
No linkage, which means that the entity is unique and can only be referred to from within its scope.
@ UniqueExternal
External linkage within a unique namespace.
@ Internal
Internal linkage, which indicates that the entity can be referred to from within the translation unit...
@ External
External linkage, which indicates that the entity can be referred to from other translation units.
@ Module
Module linkage, which indicates that the entity can be referred to from other translation units withi...
OptionalUnsigned< unsigned > UnsignedOrNone
const FunctionProtoType * T
@ Deduced
The normal deduced case.
@ Undeduced
Not deduced yet. This is for example an 'auto' which was just parsed.
@ DeducedAsPack
Same as above, but additionally this represents a case where the deduced entity itself is a pack.
@ DeducedAsDependent
This is a special case where the initializer is dependent, so we can't deduce a type yet.
@ 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.
TemplateSpecializationKind
Describes the kind of template specialization that a particular template specialization declaration r...
@ TSK_ExplicitInstantiationDefinition
This template specialization was instantiated from a template due to an explicit instantiation defini...
@ TSK_ExplicitInstantiationDeclaration
This template specialization was instantiated from a template due to an explicit instantiation declar...
@ TSK_ExplicitSpecialization
This template specialization was declared or defined by an explicit specialization (C++ [temp....
@ TSK_ImplicitInstantiation
This template specialization was implicitly instantiated from a template.
@ TSK_Undeclared
This template specialization was formed from a template-id but has not yet been declared,...
@ 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...
const char * getOperatorSpelling(OverloadedOperatorKind Operator)
Retrieve the spelling of the given overloaded operator, without the preceding "operator" keyword.
@ 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)
@ PackIndex
Index of a pack indexing expression or specifier.
ElaboratedTypeKeyword
The elaboration keyword that precedes a qualified type name or introduces an elaborated-type-specifie...
@ None
No keyword precedes the qualified type name.
llvm::omp::Clause OpenMPClauseKind
OpenMP clauses.
@ 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)
@ HiddenVisibility
Objects with "hidden" visibility are not seen by the dynamic linker.
@ ProtectedVisibility
Objects with "protected" visibility are seen by the dynamic linker but always dynamically resolve to ...
@ DefaultVisibility
Objects with "default" visibility are seen by the dynamic linker and act like normal objects.
@ 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...
static constexpr TerminalColor Value
static constexpr TerminalColor Address
static constexpr TerminalColor Comment
static constexpr TerminalColor DeclKindName
static constexpr TerminalColor ObjectKind
static constexpr TerminalColor Null
static constexpr TerminalColor Location
static constexpr TerminalColor Attr
static constexpr TerminalColor DeclName
static constexpr TerminalColor Stmt
static constexpr TerminalColor Cast
static constexpr TerminalColor ValueKind
static constexpr TerminalColor Undeserialized
static constexpr TerminalColor Type
static constexpr TerminalColor Errors
FunctionDecl * SourceDecl
The function whose exception specification this is, for EST_Unevaluated and EST_Uninstantiated.
FunctionDecl * SourceTemplate
The function template whose exception specification this is instantiated from, for EST_Uninstantiated...
ExceptionSpecificationType Type
The kind of exception specification this is.
Extra information about a function prototype.
ExceptionSpecInfo ExceptionSpec
static StringRef getKeywordName(ElaboratedTypeKeyword Keyword)
Iterator range representation begin:end[:step].
A std::pair-like structure for storing a qualified type split into its local qualifiers and its local...