24#include "llvm/ADT/StringExtras.h"
37 OS <<
" first " <<
First;
44 OS <<
" prev " << Prev;
51#define DECL(DERIVED, BASE) \
53 return dumpPreviousDeclImpl(OS, cast<DERIVED##Decl>(D));
54#define ABSTRACT_DECL(DECL)
55#include "clang/AST/DeclNodes.inc"
57 llvm_unreachable(
"Decl that isn't part of DeclNodes.inc!");
63 Context(&Context),
SM(&Context.getSourceManager()),
64 PrintPolicy(Context.getPrintingPolicy()),
65 Traits(&Context.getCommentCommandTraits()) {}
80 OS <<
C->getCommentKindName();
98#include "clang/Basic/AttrList.inc"
114 OS <<
"TemplateArgument";
132 OS <<
Node->getStmtClassName();
137 if (
const auto *E = dyn_cast<Expr>(
Node)) {
140 if (E->containsErrors()) {
142 OS <<
" contains-errors";
147 switch (E->getValueKind()) {
161 switch (E->getObjectKind()) {
168 OS <<
" objcproperty";
171 OS <<
" objcsubscript";
174 OS <<
" vectorcomponent";
177 OS <<
" matrixcomponent";
192 if (isa<LocInfoType>(T)) {
195 OS <<
"LocInfo Type";
211 if (SingleStepDesugar !=
QualType(T, 0))
216 OS <<
" contains-errors";
222 OS <<
" instantiation_dependent";
225 OS <<
" variably_modified";
227 OS <<
" contains_unexpanded_pack";
263 OS <<
" in " << M->getFullModuleName();
264 if (
auto *ND = dyn_cast<NamedDecl>(D))
267 AddChild([=] { OS <<
"also in " << M->getFullModuleName(); });
268 if (
const NamedDecl *ND = dyn_cast<NamedDecl>(D))
269 if (!ND->isUnconditionallyVisible())
281 if (
const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
282 if (FD->isConstexprSpecified())
284 if (FD->isConsteval())
286 if (FD->isMultiVersion())
287 OS <<
" multiversion";
290 if (!isa<FunctionDecl>(*D)) {
291 const auto *MD = dyn_cast<ObjCMethodDecl>(D);
292 if (!MD || !MD->isThisDeclarationADefinition()) {
293 const auto *DC = dyn_cast<DeclContext>(D);
294 if (DC && DC->hasExternalLexicalStorage()) {
296 OS <<
" <undeserialized declarations>";
305 OS <<
"CXXCtorInitializer";
306 if (Init->isAnyMemberInitializer()) {
309 }
else if (Init->isBaseInitializer()) {
311 }
else if (Init->isDelegatingInitializer()) {
312 dumpType(Init->getTypeSourceInfo()->getType());
314 llvm_unreachable(
"Unknown initializer type");
324 if (
C.getVariable()) {
333 OS <<
"<<<NULL>>> OMPClause";
338 StringRef ClauseName(llvm::omp::getOpenMPClauseName(
C->getClauseKind()));
339 OS <<
"OMP" << ClauseName.substr(0, 1).upper()
340 << ClauseName.drop_front() <<
"Clause";
364 OS <<
"<<<NULL>>> Requirement";
372 OS <<
"TypeRequirement";
375 OS <<
"SimpleRequirement";
378 OS <<
"CompoundRequirement";
381 OS <<
"NestedRequirement";
388 if (
auto *ER = dyn_cast<concepts::ExprRequirement>(R)) {
389 if (ER->hasNoexceptRequirement())
396 OS << (R->
isSatisfied() ?
" satisfied" :
" unsatisfied");
398 OS <<
" contains_unexpanded_pack";
404 V.convert(llvm::APFloat::IEEEdouble(), llvm::APFloat::rmNearestTiesToEven,
406 return V.convertToDouble();
411 switch (
Value.getKind()) {
430 llvm_unreachable(
"unexpected APValue kind!");
446void TextNodeDumper::dumpAPValueChildren(
449 unsigned NumChildren, StringRef LabelSingular, StringRef LabelPlurial) {
452 constexpr unsigned MaxChildrenPerLine = 4;
454 while (I < NumChildren) {
456 while (J < NumChildren) {
458 (J - I < MaxChildrenPerLine)) {
465 J = std::max(I + 1, J);
468 AddChild(J - I > 1 ? LabelPlurial : LabelSingular, [=]() {
469 for (
unsigned X = I;
X < J; ++
X) {
481 switch (
Value.getKind()) {
486 OS <<
"Indeterminate";
492 OS <<
Value.getInt();
506 OS <<
Value.getFixedPoint();
510 unsigned VectorLength =
Value.getVectorLength();
511 OS <<
"Vector length=" << VectorLength;
518 VectorLength,
"element",
"elements");
525 OS <<
Value.getComplexIntReal() <<
" + " <<
Value.getComplexIntImag()
530 OS <<
"ComplexFloat ";
539 OS <<
"LValue <todo>";
542 unsigned ArraySize =
Value.getArraySize();
543 unsigned NumInitializedElements =
Value.getArrayInitializedElts();
544 OS <<
"Array size=" << ArraySize;
551 NumInitializedElements,
"element",
"elements");
553 if (
Value.hasArrayFiller()) {
557 OS << ArraySize - NumInitializedElements <<
" x ";
589 OS <<
" ." << *cast<NamedDecl>(FD);
596 Visit(UnionValue, Ty);
604 OS <<
"MemberPointer <todo>";
607 OS <<
"AddrLabelDiff <todo>";
610 llvm_unreachable(
"Unknown APValue kind!");
630 OS <<
"<invalid sloc>";
634 if (strcmp(PLoc.
getFilename(), LastLocFilename) != 0) {
639 }
else if (PLoc.
getLine() != LastLocLine) {
669 if (Desugar && !T.
isNull()) {
672 if (T_split != D_split)
695 if (
const NamedDecl *ND = dyn_cast<NamedDecl>(D)) {
697 OS <<
" '" << ND->getDeclName() <<
'\'';
700 if (
const ValueDecl *VD = dyn_cast<ValueDecl>(D))
713 if (AccessSpelling.empty())
715 OS << AccessSpelling;
727 OS << CLE->getStmtClassName();
732 llvm_unreachable(
"unexpected cleanup type");
746const char *TextNodeDumper::getCommandName(
unsigned CommandID) {
753 return "<not a builtin command>";
757#define OPTION(NAME, TYPE, WIDTH, PREVIOUS) \
758 if (FPO.has##NAME##Override()) \
759 OS << " " #NAME "=" << FPO.get##NAME##Override();
760#include "clang/Basic/FPOptions.def"
765 OS <<
" Text=\"" <<
C->getText() <<
"\"";
770 OS <<
" Name=\"" << getCommandName(
C->getCommandID()) <<
"\"";
771 switch (
C->getRenderKind()) {
773 OS <<
" RenderNormal";
779 OS <<
" RenderMonospaced";
782 OS <<
" RenderEmphasized";
785 OS <<
" RenderAnchor";
789 for (
unsigned i = 0, e =
C->getNumArgs(); i != e; ++i)
790 OS <<
" Arg[" << i <<
"]=\"" <<
C->getArgText(i) <<
"\"";
795 OS <<
" Name=\"" <<
C->getTagName() <<
"\"";
796 if (
C->getNumAttrs() != 0) {
798 for (
unsigned i = 0, e =
C->getNumAttrs(); i != e; ++i) {
800 OS <<
" \"" <<
Attr.Name <<
"=\"" <<
Attr.Value <<
"\"";
803 if (
C->isSelfClosing())
804 OS <<
" SelfClosing";
809 OS <<
" Name=\"" <<
C->getTagName() <<
"\"";
814 OS <<
" Name=\"" << getCommandName(
C->getCommandID()) <<
"\"";
815 for (
unsigned i = 0, e =
C->getNumArgs(); i != e; ++i)
816 OS <<
" Arg[" << i <<
"]=\"" <<
C->getArgText(i) <<
"\"";
824 if (
C->isDirectionExplicit())
829 if (
C->hasParamName()) {
830 if (
C->isParamIndexValid())
831 OS <<
" Param=\"" <<
C->getParamName(FC) <<
"\"";
833 OS <<
" Param=\"" <<
C->getParamNameAsWritten() <<
"\"";
836 if (
C->isParamIndexValid() && !
C->isVarArgParam())
837 OS <<
" ParamIndex=" <<
C->getParamIndex();
842 if (
C->hasParamName()) {
843 if (
C->isPositionValid())
844 OS <<
" Param=\"" <<
C->getParamName(FC) <<
"\"";
846 OS <<
" Param=\"" <<
C->getParamNameAsWritten() <<
"\"";
849 if (
C->isPositionValid()) {
851 for (
unsigned i = 0, e =
C->getDepth(); i != e; ++i) {
852 OS <<
C->getIndex(i);
862 OS <<
" Name=\"" << getCommandName(
C->getCommandID())
865 <<
C->getCloseName() <<
"\"";
871 OS <<
" Text=\"" <<
C->getText() <<
"\"";
876 OS <<
" Text=\"" <<
C->getText() <<
"\"";
914 OS <<
" template expansion ";
927 if (
Node->path_empty())
933 E =
Node->path_end();
942 if (
Base->isVirtual())
952 if (
Node->hasInitStorage())
954 if (
Node->hasVarStorage())
956 if (
Node->hasElseStorage())
958 if (
Node->isConstexpr())
960 if (
Node->isConsteval()) {
962 if (
Node->isNegatedConsteval())
969 if (
Node->hasInitStorage())
971 if (
Node->hasVarStorage())
976 if (
Node->hasVarStorage())
981 OS <<
" '" <<
Node->getName() <<
"'";
982 if (
Node->isSideEntry())
987 OS <<
" '" <<
Node->getLabel()->getName() <<
"'";
992 if (
Node->caseStmtIsGNURange())
997 if (
Node->hasAPValueResult())
1003 if (
Node->usesADL())
1005 if (
Node->hasStoredFPFeatures())
1006 printFPOptions(
Node->getFPFeatures());
1011 if (OperatorSpelling)
1012 OS <<
" '" << OperatorSpelling <<
"'";
1021 OS <<
Node->getCastKindName();
1025 if (
Node->hasStoredFPFeatures())
1026 printFPOptions(
Node->getFPFeatures());
1031 if (
Node->isPartOfExplicitCast())
1032 OS <<
" part_of_explicit_cast";
1038 if (
Node->getDecl() !=
Node->getFoundDecl()) {
1043 switch (
Node->isNonOdrUse()) {
1054 if (!
Node->requiresADL())
1056 OS <<
"ADL) = '" <<
Node->getName() <<
'\'';
1059 E =
Node->decls_end();
1069 OS <<
" " <<
Node->getDecl()->getDeclKindName() <<
"Decl";
1071 OS <<
"='" << *
Node->getDecl() <<
"'";
1073 if (
Node->isFreeIvar())
1074 OS <<
" isFreeIvar";
1088 OS <<
" " <<
Node->getValue();
1092 bool isSigned =
Node->getType()->isSignedIntegerType();
1099 OS <<
" " <<
Node->getValueAsString(10);
1104 OS <<
" " <<
Node->getValueAsApproximateDouble();
1122 OS <<
" result_dependent";
1126 OS <<
" " << (
Node->isPostfix() ?
"postfix" :
"prefix") <<
" '"
1128 if (!
Node->canOverflow())
1129 OS <<
" cannot overflow";
1130 if (
Node->hasStoredFPFeatures())
1131 printFPOptions(
Node->getStoredFPFeatures());
1138 if (
Node->isArgumentType())
1143 OS <<
" " << (
Node->isArrow() ?
"->" :
".") << *
Node->getMemberDecl();
1145 switch (
Node->isNonOdrUse()) {
1155 OS <<
" " <<
Node->getAccessor().getNameStart();
1160 if (
Node->hasStoredFPFeatures())
1161 printFPOptions(
Node->getStoredFPFeatures());
1167 <<
"' ComputeLHSTy=";
1169 OS <<
" ComputeResultTy=";
1171 if (
Node->hasStoredFPFeatures())
1172 printFPOptions(
Node->getStoredFPFeatures());
1176 OS <<
" " <<
Node->getLabel()->getName();
1181 OS <<
" " <<
Node->getCastName() <<
"<"
1182 <<
Node->getTypeAsWritten().getAsString() <<
">"
1183 <<
" <" <<
Node->getCastKindName();
1189 OS <<
" " << (
Node->getValue() ?
"true" :
"false");
1193 if (
Node->isImplicit())
1200 OS <<
" functional cast to " <<
Node->getTypeAsWritten().getAsString() <<
" <"
1201 <<
Node->getCastKindName() <<
">";
1202 if (
Node->hasStoredFPFeatures())
1203 printFPOptions(
Node->getFPFeatures());
1208 if (
Node->hasStoredFPFeatures())
1209 printFPOptions(
Node->getFPFeatures());
1215 if (
Node->isListInitialization())
1222 if (
Node->isElidable())
1224 if (
Node->isListInitialization())
1226 if (
Node->isStdInitListInitialization())
1227 OS <<
" std::initializer_list";
1228 if (
Node->requiresZeroInitialization())
1234 OS <<
" (CXXTemporary";
1240 if (
Node->isGlobalNew())
1242 if (
Node->isArray())
1244 if (
Node->getOperatorNew()) {
1253 if (
Node->isGlobalDelete())
1255 if (
Node->isArrayForm())
1257 if (
Node->getOperatorDelete()) {
1278 OS <<
" extended by ";
1284 for (
unsigned i = 0, e =
Node->getNumObjects(); i != e; ++i)
1295 OS <<
" " << (
Node->isArrow() ?
"->" :
".") <<
Node->getMember();
1301 switch (
Node->getReceiverKind()) {
1311 OS <<
" super (instance)";
1315 OS <<
" super (class)";
1321 if (
auto *BoxingMethod =
Node->getBoxingMethod()) {
1323 BoxingMethod->getSelector().print(OS);
1328 if (!
Node->getCatchParamDecl())
1342 OS <<
' ' << *
Node->getProtocol();
1346 if (
Node->isImplicitProperty()) {
1347 OS <<
" Kind=MethodRef Getter=\"";
1348 if (
Node->getImplicitPropertyGetter())
1349 Node->getImplicitPropertyGetter()->getSelector().
print(OS);
1353 OS <<
"\" Setter=\"";
1355 Setter->getSelector().print(OS);
1360 OS <<
" Kind=PropertyRef Property=\"" << *
Node->getExplicitProperty()
1364 if (
Node->isSuperReceiver())
1367 OS <<
" Messaging=";
1368 if (
Node->isMessagingGetter() &&
Node->isMessagingSetter())
1369 OS <<
"Getter&Setter";
1370 else if (
Node->isMessagingGetter())
1372 else if (
Node->isMessagingSetter())
1378 if (
Node->isArraySubscriptRefExpr())
1379 OS <<
" Kind=ArraySubscript GetterForArray=\"";
1381 OS <<
" Kind=DictionarySubscript GetterForDictionary=\"";
1382 if (
Node->getAtIndexMethodDecl())
1383 Node->getAtIndexMethodDecl()->getSelector().
print(OS);
1387 if (
Node->isArraySubscriptRefExpr())
1388 OS <<
"\" SetterForArray=\"";
1390 OS <<
"\" SetterForDictionary=\"";
1391 if (
Node->setAtIndexMethodDecl())
1392 Node->setAtIndexMethodDecl()->getSelector().
print(OS);
1398 OS <<
" " << (
Node->getValue() ?
"__objc_yes" :
"__objc_no");
1403 for (
unsigned I = 0, E =
Node->numOfIterators(); I < E; ++I) {
1426 if (!
Node->isValueDependent())
1427 OS << (
Node->isSatisfied() ?
" satisfied" :
" unsatisfied");
1432 OS <<
" written as lvalue reference";
1481 OS <<
" altivec pixel";
1484 OS <<
" altivec bool";
1493 OS <<
" fixed-length sve data vector";
1496 OS <<
" fixed-length sve predicate vector";
1504 if (EI.getNoReturn())
1506 if (EI.getProducesResult())
1507 OS <<
" produces_result";
1508 if (EI.getHasRegParm())
1509 OS <<
" regparm " << EI.getRegParm();
1515 if (EPI.HasTrailingReturn)
1516 OS <<
" trailing_return";
1525 switch (EPI.RefQualifier) {
1558#define TRANSFORM_TYPE_TRAIT_DEF(Enum, Trait) \
1559 case UnaryTransformType::Enum: \
1562#include "clang/Basic/TransformTypeTraits.def"
1582 OS <<
" pack_index " << *PackIndex;
1593 OS <<
" decltype(auto)";
1630 OS <<
" expansions " << *N;
1639 OS <<
" __module_private__";
1651 OS <<
" __module_private__";
1660 OS <<
" __module_private__";
1662 OS <<
" definition";
1674 for (
const auto *Child : D->
chain())
1690 OS <<
" __module_private__";
1705 OS << (isa<CXXDestructorDecl>(D) ?
" not_selected" :
" ineligible");
1721 if (
const auto *MD = dyn_cast<CXXMethodDecl>(D)) {
1722 if (MD->size_overridden_methods() != 0) {
1730 auto Overrides = MD->overridden_methods();
1731 OS <<
"Overrides: [ ";
1732 dumpOverride(*Overrides.begin());
1733 for (
const auto *Override :
1734 llvm::make_range(Overrides.begin() + 1, Overrides.end())) {
1736 dumpOverride(Override);
1744 OS <<
" implicit-inline";
1751 OS <<
" <<<NULL params x " << D->
getNumParams() <<
">>>";
1756 OS <<
" extended by ";
1771 OS <<
" __module_private__";
1787 OS <<
" tls_dynamic";
1791 OS <<
" __module_private__";
1810 OS <<
" parenlistinit";
1851 llvm_unreachable(
"unexpected pragma comment kind");
1868 StringRef Arg = D->
getArg();
1870 OS <<
" \"" << Arg <<
"\"";
1881 OS <<
" openmp_standalone_directive";
1891 OS <<
" initializer";
1895 OS <<
" omp_priv = ";
1898 OS <<
" omp_priv ()";
1911 OS <<
"<<<NULL>>> OMPClause";
1916 StringRef ClauseName(
1917 llvm::omp::getOpenMPClauseName(
C->getClauseKind()));
1918 OS <<
"OMP" << ClauseName.substr(0, 1).upper()
1919 << ClauseName.drop_front() <<
"Clause";
1970 OS <<
"DefinitionData";
1972#define FLAG(fn, name) \
1975 FLAG(isParsingBaseSpecifiers, parsing_base_specifiers);
1977 FLAG(isGenericLambda, generic);
1978 FLAG(isLambda, lambda);
1980 FLAG(isAnonymousStructOrUnion, is_anonymous);
1982 FLAG(isEmpty, empty);
1983 FLAG(isAggregate, aggregate);
1984 FLAG(isStandardLayout, standard_layout);
1985 FLAG(isTriviallyCopyable, trivially_copyable);
1988 FLAG(isPolymorphic, polymorphic);
1989 FLAG(isAbstract, abstract);
1990 FLAG(isLiteral, literal);
1992 FLAG(hasUserDeclaredConstructor, has_user_declared_ctor);
1993 FLAG(hasConstexprNonCopyMoveConstructor, has_constexpr_non_copy_move_ctor);
1994 FLAG(hasMutableFields, has_mutable_fields);
1995 FLAG(hasVariantMembers, has_variant_members);
1996 FLAG(allowConstDefaultInit, can_const_default_init);
2001 OS <<
"DefaultConstructor";
2003 FLAG(hasDefaultConstructor, exists);
2004 FLAG(hasTrivialDefaultConstructor, trivial);
2005 FLAG(hasNonTrivialDefaultConstructor, non_trivial);
2006 FLAG(hasUserProvidedDefaultConstructor, user_provided);
2007 FLAG(hasConstexprDefaultConstructor,
constexpr);
2008 FLAG(needsImplicitDefaultConstructor, needs_implicit);
2009 FLAG(defaultedDefaultConstructorIsConstexpr, defaulted_is_constexpr);
2015 OS <<
"CopyConstructor";
2017 FLAG(hasSimpleCopyConstructor, simple);
2018 FLAG(hasTrivialCopyConstructor, trivial);
2019 FLAG(hasNonTrivialCopyConstructor, non_trivial);
2020 FLAG(hasUserDeclaredCopyConstructor, user_declared);
2021 FLAG(hasCopyConstructorWithConstParam, has_const_param);
2022 FLAG(needsImplicitCopyConstructor, needs_implicit);
2023 FLAG(needsOverloadResolutionForCopyConstructor,
2024 needs_overload_resolution);
2026 FLAG(defaultedCopyConstructorIsDeleted, defaulted_is_deleted);
2027 FLAG(implicitCopyConstructorHasConstParam, implicit_has_const_param);
2033 OS <<
"MoveConstructor";
2035 FLAG(hasMoveConstructor, exists);
2036 FLAG(hasSimpleMoveConstructor, simple);
2037 FLAG(hasTrivialMoveConstructor, trivial);
2038 FLAG(hasNonTrivialMoveConstructor, non_trivial);
2039 FLAG(hasUserDeclaredMoveConstructor, user_declared);
2040 FLAG(needsImplicitMoveConstructor, needs_implicit);
2041 FLAG(needsOverloadResolutionForMoveConstructor,
2042 needs_overload_resolution);
2044 FLAG(defaultedMoveConstructorIsDeleted, defaulted_is_deleted);
2050 OS <<
"CopyAssignment";
2052 FLAG(hasSimpleCopyAssignment, simple);
2053 FLAG(hasTrivialCopyAssignment, trivial);
2054 FLAG(hasNonTrivialCopyAssignment, non_trivial);
2055 FLAG(hasCopyAssignmentWithConstParam, has_const_param);
2056 FLAG(hasUserDeclaredCopyAssignment, user_declared);
2057 FLAG(needsImplicitCopyAssignment, needs_implicit);
2058 FLAG(needsOverloadResolutionForCopyAssignment, needs_overload_resolution);
2059 FLAG(implicitCopyAssignmentHasConstParam, implicit_has_const_param);
2065 OS <<
"MoveAssignment";
2067 FLAG(hasMoveAssignment, exists);
2068 FLAG(hasSimpleMoveAssignment, simple);
2069 FLAG(hasTrivialMoveAssignment, trivial);
2070 FLAG(hasNonTrivialMoveAssignment, non_trivial);
2071 FLAG(hasUserDeclaredMoveAssignment, user_declared);
2072 FLAG(needsImplicitMoveAssignment, needs_implicit);
2073 FLAG(needsOverloadResolutionForMoveAssignment, needs_overload_resolution);
2081 FLAG(hasSimpleDestructor, simple);
2082 FLAG(hasIrrelevantDestructor, irrelevant);
2083 FLAG(hasTrivialDestructor, trivial);
2084 FLAG(hasNonTrivialDestructor, non_trivial);
2085 FLAG(hasUserDeclaredDestructor, user_declared);
2086 FLAG(hasConstexprDestructor,
constexpr);
2087 FLAG(needsImplicitDestructor, needs_implicit);
2088 FLAG(needsOverloadResolutionForDestructor, needs_overload_resolution);
2090 FLAG(defaultedDestructorIsDeleted, defaulted_is_deleted);
2094 for (
const auto &I : D->
bases()) {
2100 if (I.isPackExpansion())
2126 if (TC->getNamedConcept() != TC->getFoundDecl()) {
2210 OS <<
"constructed ";
2242 OS <<
" synthesize";
2286 OS <<
" contravariant";
2312 for (
const auto *Child : D->
protocols())
2321 for (
const auto *Child : D->
protocols())
2368 OS <<
" unsafe_unretained";
2383 OS <<
" synthesize";
2395 OS <<
" captures_this";
2404 if (S->hasStoredFPFeatures())
2405 printFPOptions(S->getStoredFPFeatures());
static double GetApproxValue(const llvm::APFloat &F)
static bool isTrivial(ASTContext &Ctx, const Expr *E)
Checks if the expression is constant or does not have non-trivial function calls.
static CompilationDatabasePluginRegistry::Add< FixedCompilationDatabasePlugin > X("fixed-compilation-database", "Reads plain-text flags file")
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.
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.
Defines enumerations for the type traits support.
C Language Family Type Representation.
APValue - This class implements a discriminated union of [uninitialized] [APSInt] [APFloat],...
APValue & getArrayInitializedElt(unsigned I)
APValue & getStructField(unsigned i)
unsigned getStructNumFields() const
unsigned getStructNumBases() const
APValue & getUnionValue()
APValue & getVectorElt(unsigned I)
@ Indeterminate
This object has an indeterminate value (C++ [basic.indet]).
@ None
There is no such object (it's outside its lifetime).
APValue & getStructBase(unsigned i)
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.
An Embarcadero array type trait, as used in the implementation of __array_rank and __array_extent.
Represents an array type, per C99 6.7.5.2 - Array Declarators.
ArraySizeModifier getSizeModifier() const
Qualifiers getIndexTypeQualifiers() 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
Represents a C++11 auto or C++14 decltype(auto) type, possibly constrained by a type-constraint.
ArrayRef< TemplateArgument > getTypeConstraintArguments() const
bool isDecltypeAuto() const
ConceptDecl * getTypeConstraintConcept() const
bool isConstrained() const
A builtin binary operation expression such as "x + y" or "x <= y".
StringRef getOpcodeStr() const
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.
Represents a C++ constructor within a class.
Represents a C++ base or member initializer.
Represents a delete expression for memory deallocation and destructor calls, e.g.
Represents a C++ member access expression where the actual member referenced could not be resolved be...
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.
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)".
A call to an overloaded operator written using operator syntax.
Represents a C++ struct/union/class.
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++.
Describes an explicit type conversion that uses functional notion but could not be resolved because o...
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
Represents the body of a CapturedStmt, and serves as its DeclContext.
CaseStmt - Represent a case statement.
CastExpr - Base class for type casts, including both implicit casts (ImplicitCastExpr) and explicit c...
const CXXBaseSpecifier *const * path_const_iterator
Declaration of a class template.
CompoundAssignOperator - For compound assignments (e.g.
CompoundLiteralExpr - [C99 6.5.2.5].
CompoundStmt - This represents a group of statements like { stmt stmt }.
Declaration of a C++20 concept.
Represents the specialization of a concept - evaluates to a prvalue of type bool.
Represents the canonical version of C arrays with a specified constant size.
const llvm::APInt & getSize() const
ConstantExpr - An expression that occurs in a constant context and optionally the result of evaluatin...
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.
DeclContext * getParent()
getParent - Returns the containing DeclContext.
A reference to a declared variable, function, enum, etc.
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.
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.
Represents a C++17 deduced template specialization type.
TemplateName getTemplateName() const
Retrieve the name of the template that we are deducing.
Represents an array type in C++ whose size is a value-dependent expression.
SourceRange getBracketsRange() const
Represents an extended vector type where either the type or size is dependent.
SourceLocation getAttributeLoc() const
SourceRange getSourceRange() const
For nodes which represent textual entities in the source code, return their SourceRange.
void print(llvm::raw_ostream &OS, const PrintingPolicy &PP) const
Prints the node to the given output stream.
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.
Represents an expression – generally a full-expression – that introduces cleanups to be run at the en...
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.
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).
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...
Represents a function declaration or definition.
bool isPure() const
Whether this virtual function is pure, i.e.
bool isInlined() const
Determine whether this function should be inlined, because it is either marked "inline" or "constexpr...
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 isDefaulted() const
Whether this function is defaulted.
bool isIneligibleOrNotSelected() const
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.
ExtProtoInfo getExtProtoInfo() const
Declaration of a template function.
FunctionType - C99 6.7.5.3 - Function Declarators.
ExtInfo getExtInfo() const
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.
HLSLBufferDecl - Represent a cbuffer or tbuffer declaration.
IfStmt - This represents an if/then/else.
ImplicitCastExpr - Allows us to explicitly represent implicit type conversions, which have no direct ...
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.
The injected class name of a C++ class template or class template partial specialization.
CXXRecordDecl * getDecl() const
Represents the declaration of a label.
LabelStmt - Represents a label, which has a substatement.
Implicit declaration of a temporary that was materialized by a MaterializeTemporaryExpr and lifetime-...
unsigned getManglingNumber() const
ValueDecl * getExtendingDecl()
Represents a linkage specification.
LanguageIDs getLanguage() const
Return the language specified by this linkage specification.
Represents a prvalue temporary that is written into memory so that a reference can bind to it.
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
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.
DeclarationName getDeclName() const
Get the actual, stored name of the declaration, which may be a special name.
Represents a C++ namespace alias.
NamedDecl * getAliasedNamespace() const
Retrieve the namespace that this alias refers to, which may either be a NamespaceDecl or a NamespaceA...
Represent a C++ namespace.
bool isOriginalNamespace() const
Return true if this declaration is an original (first) declaration of the namespace.
bool isInline() const
Returns true if this is an inline namespace declaration.
NamespaceDecl * getOriginalNamespace()
Get the original (first) namespace declaration.
bool isNested() const
Returns true if this is a nested namespace declaration.
void print(raw_ostream &OS, const PrintingPolicy &Policy, bool ResolveTemplateArguments=false) const
Print this nested name specifier to the given output stream.
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.
InitKind getInitializerKind() const
Get initializer kind.
This is a basic class for representing single OpenMP executable directive.
bool isStandaloneDirective() const
Returns whether or not this is a Standalone directive.
OpenMP 5.0 [2.1.6 Iterators] Iterators are identifiers that expand to multiple values in the clause o...
This represents '#pragma omp requires...' directive.
clauselist_range clauselists()
Represents Objective-C's @catch statement.
ObjCBoolLiteralExpr - Objective-C Boolean Literal.
ObjCBoxedExpr - used for generalized expression boxing.
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.
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
Interfaces are the core concept in Objective-C for object oriented design.
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.
@ 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.
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.
Represents an Objective-C protocol declaration.
protocol_range protocols() const
ObjCProtocolExpr used for protocol expression in Objective-C.
ObjCSelectorExpr used for @selector in Objective-C.
ObjCSubscriptRefExpr - used for array and dictionary subscripting.
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.
Represents a pack expansion of types.
std::optional< unsigned > getNumExpansions() const
Retrieve the number of expansions that this pack expansion will generate, if known.
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
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.
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
void * getAsOpaquePtr() const
std::string getAsString() const
Represents a struct/union/class.
A helper class that allows the use of isa/cast/dyncast to detect TagType objects of structs/unions/cl...
RecordDecl * getDecl() const
Provides common interface for the Decls that can be redeclared.
decl_type * getPreviousDecl()
Return the previous declaration of this declaration or NULL if this is the first 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...
Represents an expression that computes the length of a parameter pack.
Encodes a location in the source.
PresumedLoc getPresumedLoc(SourceLocation Loc, bool UseLineDirectives=true) const
Returns the "presumed" location of a SourceLocation specifies.
SourceLocation getSpellingLoc(SourceLocation Loc) const
Given a SourceLocation object, return the spelling location referenced by the ID.
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.
StringLiteral - This represents a string literal expression, e.g.
void outputString(raw_ostream &OS) const
Represents the result of substituting a set of types for a template type parameter pack.
Decl * getAssociatedDecl() const
A template-like entity which owns the whole pattern being substituted.
const TemplateTypeParmDecl * getReplacedParameter() const
Gets the template parameter declaration that was substituted for.
Represents the result of substituting a type for a template type parameter.
Decl * getAssociatedDecl() const
A template-like entity which owns the whole pattern being substituted.
std::optional< unsigned > getPackIndex() const
const TemplateTypeParmDecl * getReplacedParameter() const
Gets the template parameter declaration that was substituted for.
SwitchStmt - This represents a 'switch' stmt.
StringRef getKindName() const
bool isCompleteDefinition() const
Return true if this decl has its body fully specified.
TagDecl * getDecl() const
Represents a template argument.
QualType getAsType() const
Retrieve the type for a type template argument.
llvm::APSInt getAsIntegral() const
Retrieve the template argument as an integral value.
TemplateName getAsTemplate() const
Retrieve the template name for a template name argument.
ValueDecl * getAsDecl() const
Retrieve the declaration for a declaration non-type template argument.
TemplateName getAsTemplateOrTemplatePattern() const
Retrieve the template argument as a template name; if the argument is a pack expansion,...
@ UsingTemplate
A template name that refers to a template declaration found through a specific using shadow declarati...
void dump(raw_ostream &OS) const
Debugging aid that dumps the template name.
Represents a type template specialization; the template must be a class template, a type alias templa...
TemplateName getTemplateName() const
Retrieve the name of the template that we are specializing.
bool isTypeAlias() const
Determine if this template specialization type is for a type alias template that has been substituted...
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.
TemplateTypeParmDecl * getDecl() const
bool isParameterPack() const
unsigned getIndex() const
unsigned getDepth() const
void VisitCXXFunctionalCastExpr(const CXXFunctionalCastExpr *Node)
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 VisitLinkageSpecDecl(const LinkageSpecDecl *D)
void VisitVectorType(const VectorType *T)
void VisitUnaryOperator(const UnaryOperator *Node)
void dumpAccessSpecifier(AccessSpecifier AS)
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 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 VisitIntegralTemplateArgument(const TemplateArgument &TA)
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)
TextNodeDumper(raw_ostream &OS, const ASTContext &Context, bool ShowColors)
void VisitPredefinedExpr(const PredefinedExpr *Node)
void dumpType(QualType T)
void VisitObjCEncodeExpr(const ObjCEncodeExpr *Node)
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 VisitCompoundStmt(const CompoundStmt *Node)
void VisitConstantExpr(const ConstantExpr *Node)
void VisitObjCIvarRefExpr(const ObjCIvarRefExpr *Node)
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 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 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 VisitCaseStmt(const CaseStmt *Node)
void VisitRValueReferenceType(const ReferenceType *T)
void VisitPackExpansionType(const PackExpansionType *T)
void VisitConceptDecl(const ConceptDecl *D)
void VisitCallExpr(const CallExpr *Node)
void VisitCapturedDecl(const CapturedDecl *D)
void VisitBuiltinTemplateDecl(const BuiltinTemplateDecl *D)
void VisitObjCPropertyRefExpr(const ObjCPropertyRefExpr *Node)
void VisitOMPDeclareReductionDecl(const OMPDeclareReductionDecl *D)
void VisitSizeOfPackExpr(const SizeOfPackExpr *Node)
void VisitDeclRefExpr(const DeclRefExpr *Node)
void VisitLabelStmt(const LabelStmt *Node)
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 VisitTemplateTypeParmDecl(const TemplateTypeParmDecl *D)
void VisitCompoundAssignOperator(const CompoundAssignOperator *Node)
void VisitCXXThisExpr(const CXXThisExpr *Node)
void dumpName(const NamedDecl *ND)
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 visitBlockCommandComment(const comments::BlockCommandComment *C, const comments::FullComment *)
void VisitExpressionTemplateArgument(const TemplateArgument &TA)
void VisitTypeAliasDecl(const TypeAliasDecl *D)
void VisitVarDecl(const VarDecl *D)
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 VisitCXXBoolLiteralExpr(const CXXBoolLiteralExpr *Node)
void VisitIfStmt(const IfStmt *Node)
void VisitCXXConstructExpr(const CXXConstructExpr *Node)
void VisitFunctionProtoType(const FunctionProtoType *T)
void dumpLocation(SourceLocation Loc)
void VisitDependentSizedArrayType(const DependentSizedArrayType *T)
void VisitOMPExecutableDirective(const OMPExecutableDirective *D)
void VisitImplicitCastExpr(const ImplicitCastExpr *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 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 visitVerbatimBlockLineComment(const comments::VerbatimBlockLineComment *C, const comments::FullComment *)
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 visitHTMLStartTagComment(const comments::HTMLStartTagComment *C, const comments::FullComment *)
void VisitEnumConstantDecl(const EnumConstantDecl *D)
void VisitPragmaDetectMismatchDecl(const PragmaDetectMismatchDecl *D)
void VisitObjCCompatibleAliasDecl(const ObjCCompatibleAliasDecl *D)
void VisitClassTemplateDecl(const ClassTemplateDecl *D)
void VisitBindingDecl(const BindingDecl *D)
void VisitTypedefType(const TypedefType *T)
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.
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.
RetTy Visit(const Type *T)
Performs the operation associated with this visitor object.
The base class of the type hierarchy.
QualType getLocallyUnqualifiedSingleStepDesugaredType() const
Pull a single level of sugar off of this locally-unqualified type.
bool isInstantiationDependentType() const
Determine whether this type is an instantiation-dependent type, meaning that the type involves a temp...
bool isDependentType() const
Whether this type is a dependent type, meaning that its definition somehow depends on a template para...
bool containsUnexpandedParameterPack() const
Whether this type is or contains an unexpanded parameter pack, used to support C++0x variadic templat...
const char * getTypeClassName() const
bool containsErrors() const
Whether this type is an error type.
bool isVariablyModifiedType() const
Whether this type is a variably-modified type (C99 6.7.5).
bool isFromAST() const
Whether this type comes from an AST file.
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.
UnaryOperator - This represents the unary-expression's (except sizeof and alignof),...
static StringRef getOpcodeStr(Opcode Op)
getOpcodeStr - Turn an Opcode enum value into the punctuation char it corresponds to,...
A reference to a name which we were able to look up during parsing but could not resolve to a specifi...
The iterator over UnresolvedSets.
Represents the dependent type named by a dependently-scoped typename using declaration,...
UnresolvedUsingTypenameDecl * getDecl() const
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.
UsingShadowDecl * getFoundDecl() const
bool typeMatchesDecl() const
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
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)
APValue * evaluateValue() const
Attempt to evaluate the value of the initializer attached to this declaration, and produce notes expl...
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
@ 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.
bool isParameterPack() const
Determine whether this variable is actually a function parameter pack or init-capture pack.
Declaration of a variable template.
Represents a C array with a specified size that is not an integer-constant-expression.
SourceRange getBracketsRange() const
Represents a GCC generic vector type.
unsigned getNumElements() const
@ AltiVecBool
is AltiVec 'vector bool ...'
@ SveFixedLengthPredicateVector
is AArch64 SVE fixed-length predicate vector
@ NeonPolyVector
is ARM Neon polynomial vector
@ GenericVector
not a target-specific vector type
@ AltiVecPixel
is AltiVec 'vector Pixel'
@ SveFixedLengthDataVector
is AArch64 SVE fixed-length data vector
@ AltiVecVector
is AltiVec vector
@ NeonVector
is ARM Neon vector
VectorKind getVectorKind() const
WhileStmt - This represents a 'while' stmt.
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)
RetTy VisitTemplateArgument(REF(TemplateArgument), ParamTys...)
static const TerminalColor NullColor
static const TerminalColor ErrorsColor
static const TerminalColor CommentColor
static const TerminalColor DeclNameColor
llvm::StringRef getAccessSpelling(AccessSpecifier AS)
static const TerminalColor AddressColor
@ 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 on 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 of a matrix.
static const TerminalColor StmtColor
static const TerminalColor UndeserializedColor
StorageClass
Storage classes.
static const TerminalColor DeclKindNameColor
@ C
Languages that the frontend can parse and compile.
static const TerminalColor LocationColor
static const TerminalColor ValueKindColor
static const TerminalColor CastColor
@ 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.
static const TerminalColor AttrColor
static const TerminalColor TypeColor
if(T->getSizeExpr()) TRY_TO(TraverseStmt(T -> getSizeExpr()))
@ 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.
static const TerminalColor ValueColor
@ EST_Uninstantiated
not instantiated yet
@ EST_Unevaluated
not evaluated yet, for special member function
static const TerminalColor ObjectKindColor
AccessSpecifier
A C++ access specifier (public, private, protected), plus the special value "none" which means differ...
@ 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...
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
Iterator range representation begin:end[:step].
A std::pair-like structure for storing a qualified type split into its local qualifiers and its local...
Qualifiers Quals
The local qualifiers.