Go to the documentation of this file.
24 #include "llvm/ADT/StringExtras.h"
29 using namespace clang;
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!");
446 void 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)) {
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");
746 const 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) {
1555 OS <<
" underlying_type";
1573 OS <<
" decltype(auto)";
1610 OS <<
" expansions " << *N;
1619 OS <<
" __module_private__";
1631 OS <<
" __module_private__";
1640 OS <<
" __module_private__";
1642 OS <<
" definition";
1654 for (
const auto *Child : D->
chain())
1670 OS <<
" __module_private__";
1698 if (
const auto *MD = dyn_cast<CXXMethodDecl>(D)) {
1699 if (MD->size_overridden_methods() != 0) {
1707 auto Overrides = MD->overridden_methods();
1708 OS <<
"Overrides: [ ";
1709 dumpOverride(*Overrides.begin());
1710 for (
const auto *Override :
1711 llvm::make_range(Overrides.begin() + 1, Overrides.end())) {
1713 dumpOverride(Override);
1725 OS <<
" <<<NULL params x " << D->
getNumParams() <<
">>>";
1730 OS <<
" extended by ";
1745 OS <<
" __module_private__";
1761 OS <<
" tls_dynamic";
1765 OS <<
" __module_private__";
1823 llvm_unreachable(
"unexpected pragma comment kind");
1840 StringRef Arg = D->
getArg();
1842 OS <<
" \"" << Arg <<
"\"";
1853 OS <<
" openmp_standalone_directive";
1863 OS <<
" initializer";
1867 OS <<
" omp_priv = ";
1870 OS <<
" omp_priv ()";
1883 OS <<
"<<<NULL>>> OMPClause";
1888 StringRef ClauseName(
1889 llvm::omp::getOpenMPClauseName(
C->getClauseKind()));
1890 OS <<
"OMP" << ClauseName.substr(0, 1).upper()
1891 << ClauseName.drop_front() <<
"Clause";
1940 OS <<
"DefinitionData";
1942 #define FLAG(fn, name) \
1945 FLAG(isParsingBaseSpecifiers, parsing_base_specifiers);
1947 FLAG(isGenericLambda,
generic);
1948 FLAG(isLambda, lambda);
1950 FLAG(isAnonymousStructOrUnion, is_anonymous);
1952 FLAG(isEmpty, empty);
1953 FLAG(isAggregate, aggregate);
1954 FLAG(isStandardLayout, standard_layout);
1955 FLAG(isTriviallyCopyable, trivially_copyable);
1958 FLAG(isPolymorphic, polymorphic);
1959 FLAG(isAbstract,
abstract);
1962 FLAG(hasUserDeclaredConstructor, has_user_declared_ctor);
1963 FLAG(hasConstexprNonCopyMoveConstructor, has_constexpr_non_copy_move_ctor);
1964 FLAG(hasMutableFields, has_mutable_fields);
1965 FLAG(hasVariantMembers, has_variant_members);
1966 FLAG(allowConstDefaultInit, can_const_default_init);
1971 OS <<
"DefaultConstructor";
1973 FLAG(hasDefaultConstructor, exists);
1974 FLAG(hasTrivialDefaultConstructor, trivial);
1975 FLAG(hasNonTrivialDefaultConstructor, non_trivial);
1976 FLAG(hasUserProvidedDefaultConstructor, user_provided);
1977 FLAG(hasConstexprDefaultConstructor, constexpr);
1978 FLAG(needsImplicitDefaultConstructor, needs_implicit);
1979 FLAG(defaultedDefaultConstructorIsConstexpr, defaulted_is_constexpr);
1985 OS <<
"CopyConstructor";
1987 FLAG(hasSimpleCopyConstructor, simple);
1988 FLAG(hasTrivialCopyConstructor, trivial);
1989 FLAG(hasNonTrivialCopyConstructor, non_trivial);
1990 FLAG(hasUserDeclaredCopyConstructor, user_declared);
1991 FLAG(hasCopyConstructorWithConstParam, has_const_param);
1992 FLAG(needsImplicitCopyConstructor, needs_implicit);
1993 FLAG(needsOverloadResolutionForCopyConstructor,
1994 needs_overload_resolution);
1996 FLAG(defaultedCopyConstructorIsDeleted, defaulted_is_deleted);
1997 FLAG(implicitCopyConstructorHasConstParam, implicit_has_const_param);
2003 OS <<
"MoveConstructor";
2005 FLAG(hasMoveConstructor, exists);
2006 FLAG(hasSimpleMoveConstructor, simple);
2007 FLAG(hasTrivialMoveConstructor, trivial);
2008 FLAG(hasNonTrivialMoveConstructor, non_trivial);
2009 FLAG(hasUserDeclaredMoveConstructor, user_declared);
2010 FLAG(needsImplicitMoveConstructor, needs_implicit);
2011 FLAG(needsOverloadResolutionForMoveConstructor,
2012 needs_overload_resolution);
2014 FLAG(defaultedMoveConstructorIsDeleted, defaulted_is_deleted);
2020 OS <<
"CopyAssignment";
2022 FLAG(hasSimpleCopyAssignment, simple);
2023 FLAG(hasTrivialCopyAssignment, trivial);
2024 FLAG(hasNonTrivialCopyAssignment, non_trivial);
2025 FLAG(hasCopyAssignmentWithConstParam, has_const_param);
2026 FLAG(hasUserDeclaredCopyAssignment, user_declared);
2027 FLAG(needsImplicitCopyAssignment, needs_implicit);
2028 FLAG(needsOverloadResolutionForCopyAssignment, needs_overload_resolution);
2029 FLAG(implicitCopyAssignmentHasConstParam, implicit_has_const_param);
2035 OS <<
"MoveAssignment";
2037 FLAG(hasMoveAssignment, exists);
2038 FLAG(hasSimpleMoveAssignment, simple);
2039 FLAG(hasTrivialMoveAssignment, trivial);
2040 FLAG(hasNonTrivialMoveAssignment, non_trivial);
2041 FLAG(hasUserDeclaredMoveAssignment, user_declared);
2042 FLAG(needsImplicitMoveAssignment, needs_implicit);
2043 FLAG(needsOverloadResolutionForMoveAssignment, needs_overload_resolution);
2051 FLAG(hasSimpleDestructor, simple);
2052 FLAG(hasIrrelevantDestructor, irrelevant);
2053 FLAG(hasTrivialDestructor, trivial);
2054 FLAG(hasNonTrivialDestructor, non_trivial);
2055 FLAG(hasUserDeclaredDestructor, user_declared);
2056 FLAG(hasConstexprDestructor, constexpr);
2057 FLAG(needsImplicitDestructor, needs_implicit);
2058 FLAG(needsOverloadResolutionForDestructor, needs_overload_resolution);
2060 FLAG(defaultedDestructorIsDeleted, defaulted_is_deleted);
2064 for (
const auto &I : D->
bases()) {
2070 if (I.isPackExpansion())
2096 if (TC->getNamedConcept() != TC->getFoundDecl()) {
2180 OS <<
"constructed ";
2212 OS <<
" synthesize";
2256 OS <<
" contravariant";
2282 for (
const auto *Child : D->
protocols())
2291 for (
const auto *Child : D->
protocols())
2338 OS <<
" unsafe_unretained";
2353 OS <<
" synthesize";
2365 OS <<
" captures_this";
void VisitConceptDecl(const ConceptDecl *D)
LabelStmt - Represents a label, which has a substatement.
An expression trait intrinsic.
@ SuperInstance
The receiver is the instance of the superclass object.
StringRef getKindName() const
Represents an ObjC class declaration.
OpenMP 5.0 [2.1.6 Iterators] Iterators are identifiers that expand to multiple values in the clause o...
bool hasExplicitBound() const
Whether this type parameter has an explicitly-written type bound, e.g., "T : NSView".
Expr * getInitializer()
Get initializer expression (if specified) of the declare reduction construct.
static const TerminalColor AttrColor
ObjCIvarDecl * getPropertyIvarDecl() const
CaseStmt - Represent a case statement.
ObjCCompatibleAliasDecl - Represents alias of a class.
__DEVICE__ int max(int __a, int __b)
ASTContext & getASTContext() const LLVM_READONLY
Represents an access specifier followed by colon ':'.
void VisitClassTemplateDecl(const ClassTemplateDecl *D)
bool isDefaulted() const
Whether this function is defaulted.
Represents a C++17 deduced template specialization type.
void VisitObjCMessageExpr(const ObjCMessageExpr *Node)
void VisitObjCCompatibleAliasDecl(const ObjCCompatibleAliasDecl *D)
Represents a C++ constructor within a class.
An Embarcadero array type trait, as used in the implementation of __array_rank and __array_extent.
void VisitTypeTemplateArgument(const TemplateArgument &TA)
ObjCBoxedExpr - used for generalized expression boxing.
void VisitCXXBindTemporaryExpr(const CXXBindTemporaryExpr *Node)
void VisitRecordDecl(const RecordDecl *D)
A boolean literal, per ([C++ lex.bool] Boolean literals).
protocol_range protocols() const
unsigned getNumParams() const
Return the number of parameters this function must have based on its FunctionType.
static const TerminalColor NullColor
TLSKind getTLSKind() const
void VisitLinkageSpecDecl(const LinkageSpecDecl *D)
@ OK_Ordinary
An ordinary object is located at an address in memory.
bool isImplicit() const
Returns true if the attribute has been implicitly created instead of explicitly written by the user.
UsingShadowDecl * getFoundDecl() const
QualType getType() const
Return the type wrapped by this type source info.
unsigned getIndex() const
Retrieve the index of the template parameter.
void VisitMaterializeTemporaryExpr(const MaterializeTemporaryExpr *Node)
TemplateTypeParmDecl * getDecl() const
@ SveFixedLengthPredicateVector
is AArch64 SVE fixed-length predicate vector
const char * getTypeClassName() const
SwitchStmt - This represents a 'switch' stmt.
AssociationTy< true > ConstAssociation
unsigned getStructNumFields() const
bool isConstrained() const
Represents a linkage specification.
A trivial tuple used to represent a source range.
WhileStmt - This represents a 'while' stmt.
unsigned getLine() const
Return the presumed line number of this location.
ConceptDecl * getTypeConstraintConcept() const
void VisitTemplateExpansionTemplateArgument(const TemplateArgument &TA)
Provides common interface for the Decls that can be redeclared.
TemplateName getAsTemplateOrTemplatePattern() const
Retrieve the template argument as a template name; if the argument is a pack expansion,...
void VisitObjCAtCatchStmt(const ObjCAtCatchStmt *Node)
ObjCMethodDecl * getGetterMethodDecl() const
unsigned getIndex() const
Get the index of the template parameter within its parameter list.
void VisitCXXOperatorCallExpr(const CXXOperatorCallExpr *Node)
Represents a C++ namespace alias.
ObjCImplementationDecl - Represents a class definition - this is where method definitions are specifi...
Represents the canonical version of C arrays with a specified constant size.
@ Invariant
The parameter is invariant: must match exactly.
bool isDeleted() const
Whether this function has been deleted.
NestedNameSpecifier * getQualifier() const
Retrieve the nested-name-specifier that qualifies the name.
bool isTypeAlias() const
Determine if this template specialization type is for a type alias template that has been substituted...
Represents C++ using-directive.
@ OK_ObjCSubscript
An Objective-C array/dictionary subscripting which reads an object or writes at the subscripted array...
void VisitAutoType(const AutoType *T)
const llvm::APInt & getSize() const
A binding in a decomposition declaration.
void VisitFunctionProtoType(const FunctionProtoType *T)
if(T->getSizeExpr()) TRY_TO(TraverseStmt(T -> getSizeExpr()))
Encodes a location in the source.
static const TerminalColor LocationColor
std::string getFullModuleName(bool AllowStringLiterals=false) const
Retrieve the full name of this module, including the path from its top-level module.
void VisitUnaryTransformType(const UnaryTransformType *T)
unsigned getIndex() const
Get the index of the template parameter within its parameter list.
This represents a decl that may have a name.
SourceRange getSourceRange() const
For nodes which represent textual entities in the source code, return their SourceRange.
SourceLocation getBegin() const
@ NOUR_Discarded
This name appears as a potential result of a discarded value expression.
bool constructsVirtualBase() const
Returns true if the constructed base class is a virtual base class subobject of this declaration's cl...
void VisitObjCCategoryImplDecl(const ObjCCategoryImplDecl *D)
@ TLS_Static
TLS with a known-constant initializer.
A (possibly-)qualified type.
bool isFixed() const
Returns true if this is an Objective-C, C++11, or Microsoft-style enumeration with a fixed underlying...
NonTypeTemplateParmDecl - Declares a non-type template parameter, e.g., "Size" in.
void VisitObjCBoxedExpr(const ObjCBoxedExpr *Node)
std::string getAsString() const
void VisitUnresolvedLookupExpr(const UnresolvedLookupExpr *Node)
AccessControl getAccessControl() const
A type trait used in the implementation of various C++11 and Library TR1 trait templates.
The iterator over UnresolvedSets.
void VisitTemplateArgument(REF(TemplateArgument), ParamTys...)
Represents a member of a struct/union/class.
@ NeonVector
is ARM Neon vector
FunctionDecl * SourceTemplate
The function template whose exception specification this is instantiated from, for EST_Uninstantiated...
ObjCTypeParamVariance getVariance() const
Determine the variance of this type parameter.
C++2a [expr.prim.req]: A requires-expression provides a concise way to express requirements on templa...
static const TerminalColor AddressColor
ObjCInterfaceDecl * getClassInterface()
@ VK_XValue
An x-value expression is a reference to an object with independent storage but which can be "moved",...
bool isUsed(bool CheckUsedAttr=true) const
Whether any (re-)declaration of the entity was used, meaning that a definition is required.
StringRef getOpcodeStr() const
Represents a shadow declaration implicitly introduced into a scope by a (resolved) using-declaration ...
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)".
Represents a type template specialization; the template must be a class template, a type alias templa...
bool containsUnexpandedParameterPack() const
Whether this type is or contains an unexpanded parameter pack, used to support C++0x variadic templat...
IfStmt - This represents an if/then/else.
@ Covariant
The parameter is covariant, e.g., X<T> is a subtype of X when the type parameter is covariant and T i...
ExtInfo getExtInfo() const
GotoStmt - This represents a direct goto.
Describes an C or C++ initializer list.
ObjCPropertyImplDecl - Represents implementation declaration of a property in a class or category imp...
void VisitNullPtrTemplateArgument(const TemplateArgument &TA)
void VisitNamespaceDecl(const NamespaceDecl *D)
void visitParamCommandComment(const comments::ParamCommandComment *C, const comments::FullComment *FC)
@ RQ_RValue
An rvalue ref-qualifier was provided (&&).
UnaryOperator - This represents the unary-expression's (except sizeof and alignof),...
void VisitObjCSelectorExpr(const ObjCSelectorExpr *Node)
@ None
There is no such object (it's outside its lifetime).
void VisitUnaryExprOrTypeTraitExpr(const UnaryExprOrTypeTraitExpr *Node)
A C++ static_cast expression (C++ [expr.static.cast]).
@ NeonPolyVector
is ARM Neon polynomial vector
ArrayRef< TemplateArgument > getTypeConstraintArguments() const
PropertyControl getPropertyImplementation() const
ObjCInterfaceDecl * getDecl() const
Get the declaration of this interface.
bool isInlineSpecified() const
Determine whether the "inline" keyword was specified for this function.
void VisitCXXFunctionalCastExpr(const CXXFunctionalCastExpr *Node)
void VisitOMPRequiresDecl(const OMPRequiresDecl *D)
unsigned getManglingNumber() const
NamedDecl * getAliasedNamespace() const
Retrieve the namespace that this alias refers to, which may either be a NamespaceDecl or a NamespaceA...
FunctionType - C99 6.7.5.3 - Function Declarators.
Represents the body of a CapturedStmt, and serves as its DeclContext.
TextNodeDumper(raw_ostream &OS, const ASTContext &Context, bool ShowColors)
@ SuperClass
The receiver is a superclass.
void VisitFunctionDecl(const FunctionDecl *D)
CXXRecordDecl * getConstructedBaseClass() const
Get the base class whose constructor or constructor shadow declaration is passed the constructor argu...
bool containsUnexpandedParameterPack() const
void VisitTemplateTemplateArgument(const TemplateArgument &TA)
void VisitUsingEnumDecl(const UsingEnumDecl *D)
void VisitRValueReferenceType(const ReferenceType *T)
const ObjCInterfaceDecl * getClassInterface() const
static const TerminalColor ErrorsColor
llvm::APSInt getAsIntegral() const
Retrieve the template argument as an integral value.
const char * getTraitSpelling(ExpressionTrait T) LLVM_READONLY
Return the spelling of the type trait TT. Never null.
void VisitCXXRecordDecl(const CXXRecordDecl *D)
FunctionDecl * SourceDecl
The function whose exception specification this is, for EST_Unevaluated and EST_Uninstantiated.
The base class of the type hierarchy.
NamedDecl * getTargetDecl() const
Gets the underlying declaration which has been brought into the local scope.
void VisitVarTemplateDecl(const VarTemplateDecl *D)
ObjCSubscriptRefExpr - used for array and dictionary subscripting.
ObjCBoolLiteralExpr - Objective-C Boolean Literal.
bool containsErrors() const
Whether this type is an error type.
void VisitTypedefType(const TypedefType *T)
bool isVirtualAsWritten() const
Whether this function is marked as virtual explicitly.
NamespaceDecl * getOriginalNamespace()
Get the original (first) namespace declaration.
void visitBlockCommandComment(const comments::BlockCommandComment *C, const comments::FullComment *)
ObjCPropertyRefExpr - A dot-syntax expression to access an ObjC property.
static bool isSimpleAPValue(const APValue &Value)
True if the APValue Value can be folded onto the current line.
void VisitFunctionTemplateDecl(const FunctionTemplateDecl *D)
void VisitPragmaCommentDecl(const PragmaCommentDecl *D)
void VisitOMPIteratorExpr(const OMPIteratorExpr *Node)
@ EST_Unevaluated
not evaluated yet, for special member function
void VisitSizeOfPackExpr(const SizeOfPackExpr *Node)
void VisitIfStmt(const IfStmt *Node)
bool isThisDeclarationReferenced() const
Whether this declaration was referenced.
void VisitFloatingLiteral(const FloatingLiteral *Node)
Represents a dependent using declaration which was marked with typename.
void VisitNamespaceAliasDecl(const NamespaceAliasDecl *D)
DeclContext * getLexicalDeclContext()
getLexicalDeclContext - The declaration context where this Decl was lexically declared (LexicalDC).
void visitInlineCommandComment(const comments::InlineCommandComment *C, const comments::FullComment *)
bool isInline() const
Whether this variable is (C++1z) inline.
bool isParameterPack() const
Determine whether this variable is actually a function parameter pack or init-capture pack.
Declaration of a template function.
void VisitExtVectorElementExpr(const ExtVectorElementExpr *Node)
void VisitObjCInterfaceDecl(const ObjCInterfaceDecl *D)
Represents Objective-C's @catch statement.
UnaryExprOrTypeTraitExpr - expression with either a type or (unevaluated) expression operand.
A helper class that allows the use of isa/cast/dyncast to detect TagType objects of structs/unions/cl...
void VisitVectorType(const VectorType *T)
Describes a module or submodule.
ObjCSelectorExpr used for @selector in Objective-C.
@ Contravariant
The parameter is contravariant, e.g., X<T> is a subtype of X when the type parameter is covariant and...
Represents a pack expansion of types.
@ SveFixedLengthDataVector
is AArch64 SVE fixed-length data vector
A reference to a name which we were able to look up during parsing but could not resolve to a specifi...
This represents '#pragma omp declare reduction ...' directive.
static const char * getStorageClassSpecifierString(StorageClass SC)
Return the string used to specify the storage class SC.
Describes a module import declaration, which makes the contents of the named module visible in the cu...
AccessSpecifier getAccess() const
bool isTrivial() const
Whether this function is "trivial" in some specialized C++ senses.
Represents an expression that computes the length of a parameter pack.
void VisitFriendDecl(const FriendDecl *D)
Represents binding an expression to a temporary.
Represents a block literal declaration, which is like an unnamed FunctionDecl.
void VisitUnresolvedUsingTypenameDecl(const UnresolvedUsingTypenameDecl *D)
ObjCImplementationDecl * getImplementation() const
void VisitObjCProtocolExpr(const ObjCProtocolExpr *Node)
A builtin binary operation expression such as "x + y" or "x <= y".
This is a basic class for representing single OpenMP clause.
void visitTParamCommandComment(const comments::TParamCommandComment *C, const comments::FullComment *FC)
unsigned getIndex() const
void VisitRequiresExpr(const RequiresExpr *Node)
protocol_range protocols() const
void VisitCastExpr(const CastExpr *Node)
bool isFromAST() const
Whether this type comes from an AST file.
Declaration of a C++2a concept.
void VisitImportDecl(const ImportDecl *D)
void dump(raw_ostream &OS) const
Debugging aid that dumps the template name.
const char * getFilename() const
Return the presumed filename of this location.
SourceLocation getEnd() const
static void dumpPreviousDeclImpl(raw_ostream &OS,...)
void VisitCallExpr(const CallExpr *Node)
std::string toString(const til::SExpr *E)
Represents a GCC generic vector type.
clauselist_range clauselists()
Represents the specialization of a concept - evaluates to a prvalue of type bool.
Represents difference between two FPOptions values.
Represents a prvalue temporary that is written into memory so that a reference can bind to it.
static const TerminalColor UndeserializedColor
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
void VisitPackTemplateArgument(const TemplateArgument &TA)
void VisitEnumConstantDecl(const EnumConstantDecl *D)
bool isSpelledAsLValue() const
Represents an array type, per C99 6.7.5.2 - Array Declarators.
ObjCMethodDecl * getSetterMethodDecl() const
static StringRef getOpcodeStr(Opcode Op)
getOpcodeStr - Turn an Opcode enum value into the punctuation char it corresponds to,...
void VisitBlockDecl(const BlockDecl *D)
void VisitTypedefDecl(const TypedefDecl *D)
bool isStandaloneDirective() const
Returns whether or not this is a Standalone directive.
const T * getAs() const
Member-template getAs<specific type>'.
static const TerminalColor ValueColor
void VisitConstructorUsingShadowDecl(const ConstructorUsingShadowDecl *D)
@ OK_BitField
A bitfield object is a bitfield on a C or C++ record.
bool isInvalidDecl() const
unsigned getStructNumBases() const
llvm::PointerUnion< BlockDecl *, CompoundLiteralExpr * > CleanupObject
The type of objects that are kept in the cleanup.
void VisitObjCPropertyImplDecl(const ObjCPropertyImplDecl *D)
Represents a template argument.
APValue & getStructBase(unsigned i)
ObjCCategoryImplDecl * getImplementation() const
void VisitUsingDecl(const UsingDecl *D)
A static requirement that can be used in a requires-expression to check properties of types and expre...
void VisitPackExpansionType(const PackExpansionType *T)
void VisitCXXStaticCastExpr(const CXXStaticCastExpr *Node)
bool isNRVOVariable() const
Determine whether this local variable can be used with the named return value optimization (NRVO).
void Visit(PTR(Stmt) S, ParamTys... P)
attr::Kind getKind() const
Represents the declaration of a label.
void VisitTemplateTemplateParmDecl(const TemplateTemplateParmDecl *D)
bool needsOverloadResolutionForMoveConstructor() const
Determine whether we need to eagerly declare a defaulted move constructor for this class.
SplitQualType getSplitDesugaredType() const
void VisitSwitchStmt(const SwitchStmt *Node)
QualType getUnderlyingType() const
decl_type * getFirstDecl()
Return the first declaration of this declaration or itself if this is the only declaration.
bool getSynthesize() const
Represents a C++11 auto or C++14 decltype(auto) type, possibly constrained by a type-constraint.
void VisitBindingDecl(const BindingDecl *D)
@ Class
The receiver is a class.
void VisitUsingDirectiveDecl(const UsingDirectiveDecl *D)
FriendDecl - Represents the declaration of a friend entity, which can be a function,...
TemplateTemplateParmDecl - Declares a template template parameter, e.g., "T" in.
void VisitIntegerLiteral(const IntegerLiteral *Node)
void VisitPragmaDetectMismatchDecl(const PragmaDetectMismatchDecl *D)
Represents a variable declaration or definition.
QualType getReturnType() const
APValue & getVectorElt(unsigned I)
Represents the dependent type named by a dependently-scoped typename using declaration,...
std::string getAsString() const
ConstructorUsingShadowDecl * getConstructedBaseClassShadowDecl() const
Get the inheriting constructor declaration for the base class for which we don't have an explicit ini...
void VisitObjCSubscriptRefExpr(const ObjCSubscriptRefExpr *Node)
StringLiteral - This represents a string literal expression, e.g.
Represents an expression – generally a full-expression – that introduces cleanups to be run at the en...
ObjCCategoryImplDecl - An object of this class encapsulates a category @implementation declaration.
unsigned getColumn() const
Return the presumed column number of this location.
void VisitMemberExpr(const MemberExpr *Node)
bool isModulePrivate() const
Whether this declaration was marked as being private to the module in which it was defined.
@ RQ_None
No ref-qualifier was provided.
const char * getOperatorSpelling(OverloadedOperatorKind Operator)
Retrieve the spelling of the given overloaded operator, without the preceding "operator" keyword.
bool isVariablyModifiedType() const
Whether this type is a variably-modified type (C99 6.7.5).
void AddChild(Fn DoAddChild)
Add a child of the current node. Calls DoAddChild without arguments.
An instance of this object exists for each enum constant that is defined.
SourceLocation getAttributeLoc() const
void VisitUnresolvedUsingType(const UnresolvedUsingType *T)
QualType getLocallyUnqualifiedSingleStepDesugaredType() const
Pull a single level of sugar off of this locally-unqualified type.
decl_type * getPreviousDecl()
Return the previous declaration of this declaration or NULL if this is the first declaration.
static void dumpPreviousDecl(raw_ostream &OS, const Decl *D)
Dump the previous declaration in the redeclaration chain for a declaration, if any.
bool isScopedUsingClassTag() const
Returns true if this is a C++11 scoped enumeration.
ObjCEncodeExpr, used for @encode in Objective-C.
Represents a dependent using declaration which was not marked with typename.
bool isCompleteDefinition() const
Return true if this decl has its body fully specified.
APValue & getArrayInitializedElt(unsigned I)
@ GenericVector
not a target-specific vector type
void VisitVariableArrayType(const VariableArrayType *T)
@ TLS_None
Not a TLS variable.
@ AltiVecPixel
is AltiVec 'vector Pixel'
bool isOriginalNamespace() const
Return true if this declaration is an original (first) declaration of the namespace.
@ OK_MatrixComponent
A matrix component is a single element of a matrix.
ConstantExpr - An expression that occurs in a constant context and optionally the result of evaluatin...
Declaration of a template type parameter.
An expression that sends a message to the given Objective-C object or class.
static const TerminalColor TypeColor
void VisitObjCImplementationDecl(const ObjCImplementationDecl *D)
bool isImplicit() const
isImplicit - Indicates whether the declaration was implicitly generated by the implementation.
void visitHTMLStartTagComment(const comments::HTMLStartTagComment *C, const comments::FullComment *)
const ObjCInterfaceDecl * getSuperClass() const
Module * getOwningModule() const
Get the module that owns this declaration (for visibility purposes).
bool isMutable() const
Determines whether this field is mutable (C++ only).
SplitQualType split() const
Divides a QualType into its unqualified type and a set of local qualifiers.
TagDecl * getDecl() const
VectorKind getVectorKind() const
void VisitAddrLabelExpr(const AddrLabelExpr *Node)
Represents a C++ using-declaration.
void visitVerbatimBlockComment(const comments::VerbatimBlockComment *C, const comments::FullComment *)
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....
@ Indeterminate
This object has an indeterminate value (C++ [basic.indet]).
bool isResultDependent() const
Whether this generic selection is result-dependent.
ObjCCategoryDecl - Represents a category declaration.
StringRef getIdentKindName() const
Qualifiers getIndexTypeQualifiers() const
bool wasDeclaredWithTypename() const
Whether this template type parameter was declared with the 'typename' keyword.
void VisitOMPDeclareReductionDecl(const OMPDeclareReductionDecl *D)
@ VK_LValue
An l-value expression is a reference to an object with independent storage.
void VisitDependentSizedExtVectorType(const DependentSizedExtVectorType *T)
static double GetApproxValue(const llvm::APFloat &F)
ArraySizeModifier getSizeModifier() const
CompoundLiteralExpr - [C99 6.5.2.5].
AccessSpecifier
A C++ access specifier (public, private, protected), plus the special value "none" which means differ...
virtual SourceRange getSourceRange() const LLVM_READONLY
Source range that this declaration covers.
bool isInvalid() const
Return true if this object is invalid or uninitialized.
Represents a C++ using-enum-declaration.
@ ListInit
Direct list-initialization (C++11)
Represents a C++ struct/union/class.
void VisitCXXUnresolvedConstructExpr(const CXXUnresolvedConstructExpr *Node)
Provides common interface for the Decls that cannot be redeclared, but can be merged if the same decl...
LanguageIDs getLanguage() const
Return the language specified by this linkage specification.
@ EST_Uninstantiated
not instantiated yet
void VisitSYCLUniqueStableNameExpr(const SYCLUniqueStableNameExpr *Node)
bool isDependentType() const
Whether this type is a dependent type, meaning that its definition somehow depends on a template para...
bool isInstantiationDependentType() const
Determine whether this type is an instantiation-dependent type, meaning that the type involves a temp...
@ VK_PRValue
A pr-value expression (in the C++11 taxonomy) produces a temporary value.
static StringRef getNameForCallConv(CallingConv CC)
NestedNameSpecifier * getQualifier() const
Retrieve the nested-name-specifier that qualifies the name.
@ AltiVecVector
is AltiVec vector
const typedef CXXBaseSpecifier *const * path_const_iterator
void VisitExpressionTemplateArgument(const TemplateArgument &TA)
bool needsOverloadResolutionForCopyConstructor() const
Determine whether we need to eagerly declare a defaulted copy constructor for this class.
Represents an array type in C++ whose size is a value-dependent expression.
SourceRange getRange() const
void print(raw_ostream &OS, const PrintingPolicy &Policy, bool ResolveTemplateArguments=false) const
Print this nested name specifier to the given output stream.
Represents a C array with a specified size that is not an integer-constant-expression.
static const TerminalColor CastColor
void VisitTemplateTypeParmType(const TemplateTypeParmType *T)
bool isScoped() const
Returns true if this is a C++11 scoped enumeration.
ConstructorUsingShadowDecl * getNominatedBaseClassShadowDecl() const
Get the inheriting constructor declaration for the direct base class from which this using shadow dec...
Iterator range representation begin:end[:step].
bool isFromASTFile() const
Determine whether this declaration came from an AST file (such as a precompiled header or module) rat...
const TypeConstraint * getTypeConstraint() const
Returns the type constraint associated with this template parameter (if any).
void dumpLocation(SourceLocation Loc)
TypedefNameDecl * getDecl() const
static const TerminalColor ObjectKindColor
void dumpBareDeclRef(const Decl *D)
void VisitLabelStmt(const LabelStmt *Node)
Declaration of a class template.
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
SourceRange getBracketsRange() const
bool needsOverloadResolutionForDestructor() const
Determine whether we need to eagerly declare a destructor for this class.
StorageClass getStorageClass() const
Returns the storage class as written in the source.
void visitVerbatimBlockLineComment(const comments::VerbatimBlockLineComment *C, const comments::FullComment *)
void VisitObjCInterfaceType(const ObjCInterfaceType *T)
Represents a prototype with parameter type info, e.g.
Pseudo declaration for capturing expressions.
ObjCProtocolExpr used for protocol expression in Objective-C.
DeclContext * getParent()
getParent - Returns the containing DeclContext.
void VisitTypeTraitExpr(const TypeTraitExpr *Node)
protocol_range protocols() const
const ObjCInterfaceDecl * getClassInterface() const
const clang::PrintingPolicy & getPrintingPolicy() const
@ NOUR_None
This is an odr-use.
void VisitEnumDecl(const EnumDecl *D)
void VisitInjectedClassNameType(const InjectedClassNameType *T)
void print(llvm::raw_ostream &OS, const PrintingPolicy &PP) const
Prints the node to the given output stream.
Represents a delete expression for memory deallocation and destructor calls, e.g.
bool isNull() const
Return true if this QualType doesn't point to a type yet.
Decl - This represents one declaration (or definition), e.g.
bool isPure() const
Whether this virtual function is pure, i.e.
Represents one property declaration in an Objective-C interface.
AddrLabelExpr - The GNU address of label extension, representing &&label.
Represents an explicit C++ type conversion that uses "functional" notation (C++ [expr....
bool isInstanceMethod() const
void VisitAccessSpecDecl(const AccessSpecDecl *D)
ObjCCategoryDecl * getCategoryDecl() const
static const TerminalColor StmtColor
void VisitImplicitCastExpr(const ImplicitCastExpr *Node)
unsigned getDepth() const
Get the nesting depth of the template parameter.
void VisitObjCPropertyRefExpr(const ObjCPropertyRefExpr *Node)
APValue & getStructField(unsigned i)
APValue & getUnionValue()
ObjCInterfaceDecl * getSuperClass() const
void VisitCharacterLiteral(const CharacterLiteral *Node)
void VisitLifetimeExtendedTemporaryDecl(const LifetimeExtendedTemporaryDecl *D)
The injected class name of a C++ class template or class template partial specialization.
void VisitBinaryOperator(const BinaryOperator *Node)
Represents a C++ member access expression where the actual member referenced could not be resolved be...
void Visit(REF(TemplateArgument) TA, ParamTys... P)
Kind getPropertyImplementation() const
@ OK_VectorComponent
A vector component is an element or range of elements on a vector.
void VisitTemplateTypeParmDecl(const TemplateTypeParmDecl *D)
CompoundAssignOperator - For compound assignments (e.g.
void VisitCapturedDecl(const CapturedDecl *D)
void VisitCXXThisExpr(const CXXThisExpr *Node)
@ NOUR_Unevaluated
This name appears in an unevaluated operand.
const Expr * getInit() const
void dumpName(const NamedDecl *ND)
A std::pair-like structure for storing a qualified type split into its local qualifiers and its local...
bool isValueDependent() const
Determines whether the value of this expression depends on.
Describes an explicit type conversion that uses functional notion but could not be resolved because o...
void VisitUsingType(const UsingType *T)
static const TerminalColor ValueKindColor
Represents the declaration of a typedef-name via the 'typedef' type specifier.
@ AltiVecBool
is AltiVec 'vector bool ...'
void VisitTypeAliasTemplateDecl(const TypeAliasTemplateDecl *D)
void VisitOMPExecutableDirective(const OMPExecutableDirective *D)
Expr * getCombiner()
Get combiner expression of the declare reduction construct.
This is a basic class for representing single OpenMP executable directive.
ObjCPropertyDecl * getPropertyDecl() const
bool isParameterPack() const
Returns whether this is a parameter pack.
void VisitWhileStmt(const WhileStmt *Node)
Represents the declaration of an Objective-C type parameter.
ExceptionSpecificationType Type
The kind of exception specification this is.
ExceptionSpecInfo ExceptionSpec
Represents the this expression in C++.
ValueDecl * getAsDecl() const
Retrieve the declaration for a declaration non-type template argument.
ArrayRef< Module * > getModulesWithMergedDefinition(const NamedDecl *Def)
Get the additional modules in which the definition Def has been merged.
ExtVectorElementExpr - This represents access to specific elements of a vector, and may occur on the ...
void VisitIntegralTemplateArgument(const TemplateArgument &TA)
UnresolvedUsingTypenameDecl * getDecl() const
ObjCMethodDecl - Represents an instance or class method declaration.
@ OK_ObjCProperty
An Objective-C property is a logical field of an Objective-C object which is read and written via Obj...
[C99 6.4.2.2] - A predefined identifier such as func.
void dumpType(QualType T)
NestedNameSpecifier * getQualifier() const
Retrieve the nested-name-specifier that qualifies the name.
void dumpPointer(const void *Ptr)
InitKind getInitializerKind() const
Get initializer kind.
@ Instance
The receiver is an object instance.
@ CInit
C-style initialization with assignment.
@ TLS_Dynamic
TLS with a dynamic initializer.
void VisitFixedPointLiteral(const FixedPointLiteral *Node)
void VisitObjCTypeParamDecl(const ObjCTypeParamDecl *D)
Extra information about a function prototype.
static const TerminalColor DeclKindNameColor
void VisitExpressionTraitExpr(const ExpressionTraitExpr *Node)
unsigned getDepth() const
Represents a field injected from an anonymous union/struct into the parent scope.
void VisitGotoStmt(const GotoStmt *Node)
void dumpBareType(QualType T, bool Desugar=true)
FieldDecl * getInitializedFieldInUnion()
If this initializes a union, specifies which field in the union to initialize.
static const TerminalColor CommentColor
void VisitCXXBoolLiteralExpr(const CXXBoolLiteralExpr *Node)
void VisitObjCPropertyDecl(const ObjCPropertyDecl *D)
void VisitConstantExpr(const ConstantExpr *Node)
bool isParameterPack() const
Whether this parameter is a non-type template parameter pack.
Stmt - This represents one statement.
TemplateName getAsTemplate() const
Retrieve the template name for a template name argument.
ObjCIvarDecl - Represents an ObjC instance variable.
void visitHTMLEndTagComment(const comments::HTMLEndTagComment *C, const comments::FullComment *)
bool isConstexpr() const
Whether this variable is (C++11) constexpr.
void VisitExprWithCleanups(const ExprWithCleanups *Node)
CXXRecordDecl * getNominatedBaseClass() const
Get the base class that was named in the using declaration.
Represents a C11 generic selection.
static const TerminalColor DeclNameColor
void VisitVarDecl(const VarDecl *D)
void VisitObjCMethodDecl(const ObjCMethodDecl *D)
void visitVerbatimLineComment(const comments::VerbatimLineComment *C, const comments::FullComment *)
QualType getIntegerType() const
Return the integer type this enum decl corresponds to.
void dumpDeclRef(const Decl *D, StringRef Label={})
void VisitLabelDecl(const LabelDecl *D)
Represents an Objective-C protocol declaration.
void VisitUnaryOperator(const UnaryOperator *Node)
bool isLiteral(TokenKind K)
Return true if this is a "literal" kind, like a numeric constant, string, etc.
Represents a base class of a C++ class.
Attr - This represents one attribute.
A container of type source information.
DeclarationName getDeclName() const
Get the actual, stored name of the declaration, which may be a special name.
This represents '#pragma omp requires...' directive.
StringRef getName() const
void VisitObjCCategoryDecl(const ObjCCategoryDecl *D)
@ RQ_LValue
An lvalue ref-qualifier was provided (&).
void VisitDeducedTemplateSpecializationType(const DeducedTemplateSpecializationType *T)
Abstract class common to all of the C++ "named"/"keyword" casts.
void VisitInitListExpr(const InitListExpr *ILE)
void VisitNullTemplateArgument(const TemplateArgument &TA)
void VisitIndirectFieldDecl(const IndirectFieldDecl *D)
ValueDecl * getExtendingDecl()
void VisitObjCEncodeExpr(const ObjCEncodeExpr *Node)
RetTy Visit(const Type *T)
Performs the operation associated with this visitor object.
Represents the builtin template declaration which is used to implement __make_integer_seq and other b...
param_iterator param_begin()
void VisitStringLiteral(const StringLiteral *Str)
void VisitConceptSpecializationExpr(const ConceptSpecializationExpr *Node)
Declaration of an alias template.
void VisitObjCIvarRefExpr(const ObjCIvarRefExpr *Node)
void VisitGenericSelectionExpr(const GenericSelectionExpr *E)
ImplicitCastExpr - Allows us to explicitly represent implicit type conversions, which have no direct ...
void VisitDependentSizedArrayType(const DependentSizedArrayType *T)
void VisitCXXDeleteExpr(const CXXDeleteExpr *Node)
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
Implicit declaration of a temporary that was materialized by a MaterializeTemporaryExpr and lifetime-...
RecordDecl * getDecl() const
void dumpAccessSpecifier(AccessSpecifier AS)
QualType::DestructionKind needsDestruction(const ASTContext &Ctx) const
Would the destruction of this variable have any effect, and if so, what kind?
void * getAsOpaquePtr() const
TemplateName getTemplateName() const
Retrieve the name of the template that we are deducing.
void VisitObjCBoolLiteralExpr(const ObjCBoolLiteralExpr *Node)
Base for LValueReferenceType and RValueReferenceType.
void VisitNonTypeTemplateParmDecl(const NonTypeTemplateParmDecl *D)
RequirementKind getKind() const
void VisitObjCProtocolDecl(const ObjCProtocolDecl *D)
bool isDecltypeAuto() const
Represents a #pragma detect_mismatch line.
unsigned getNumElements() const
void dumpSourceRange(SourceRange R)
llvm::StringRef getAccessSpelling(AccessSpecifier AS)
APValue - This class implements a discriminated union of [uninitialized] [APSInt] [APFloat],...
void outputString(raw_ostream &OS) const
static bool isTrivial(ASTContext &Ctx, const Expr *E)
Checks if the expression is constant or does not have non-trivial function calls.
Represents an unpacked "presumed" location which can be presented to the user.
ArrayRef< Decl * > getModuleInitializers(Module *M)
Get the initializations to perform when importing a module, if any.
InitializationStyle getInitStyle() const
The style of initialization for this declaration.
void VisitCXXConstructExpr(const CXXConstructExpr *Node)
Represents the declaration of a typedef-name via a C++11 alias-declaration.
CXXRecordDecl * getDecl() const
Declaration of a variable template.
Module * getImportedModule() const
Retrieve the module that was imported by the import declaration.
Optional< unsigned > getNumExpansions() const
Retrieve the number of expansions that this pack expansion will generate, if known.
This represents one expression.
void visitTextComment(const comments::TextComment *C, const comments::FullComment *)
ArrayRef< NamedDecl * > chain() const
StringRef getValue() const
Represents a shadow constructor declaration introduced into a class by a C++11 using-declaration that...
bool isParameterPack() const
void VisitDeclRefExpr(const DeclRefExpr *Node)
void dumpCleanupObject(const ExprWithCleanups::CleanupObject &C)
void VisitOMPCapturedExprDecl(const OMPCapturedExprDecl *D)
SourceRange getBracketsRange() const
Represents a C++ base or member initializer.
A class which contains all the information about a particular captured value.
void VisitCXXNewExpr(const CXXNewExpr *Node)
bool isDeletedAsWritten() const
void VisitPredefinedExpr(const PredefinedExpr *Node)
void VisitUsingShadowDecl(const UsingShadowDecl *D)
ExtProtoInfo getExtProtoInfo() const
ObjCPropertyAttribute::Kind getPropertyAttributes() const
CastExpr - Base class for type casts, including both implicit casts (ImplicitCastExpr) and explicit c...
Represents an extended vector type where either the type or size is dependent.
unsigned getDepth() const
Get the nesting depth of the template parameter.
void VisitTemplateSpecializationType(const TemplateSpecializationType *T)
SourceLocation getLocation() const
Qualifiers Quals
The local qualifiers.
void VisitCompoundAssignOperator(const CompoundAssignOperator *Node)
A reference to a declared variable, function, enum, etc.
Represent a C++ namespace.
void VisitFieldDecl(const FieldDecl *D)
Represents a function declaration or definition.
static void dumpBasePath(raw_ostream &OS, const CastExpr *Node)
unsigned getDepth() const
Retrieve the depth of the template parameter.
bool capturesCXXThis() const
Represents a struct/union/class.
void VisitDeclarationTemplateArgument(const TemplateArgument &TA)
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
void VisitCXXDependentScopeMemberExpr(const CXXDependentScopeMemberExpr *Node)
void Visit(const comments::Comment *C, const comments::FullComment *FC)
void VisitCXXNamedCastExpr(const CXXNamedCastExpr *Node)
StorageClass getStorageClass() const
Returns the storage class as written in the source.
A call to an overloaded operator written using operator syntax.
Interfaces are the core concept in Objective-C for object oriented design.
void VisitCaseStmt(const CaseStmt *Node)
void VisitObjCIvarDecl(const ObjCIvarDecl *D)
bool isInline() const
Returns true if this is an inline namespace declaration.
void VisitConstantArrayType(const ConstantArrayType *T)
Represents a call to a C++ constructor.
void VisitBuiltinTemplateDecl(const BuiltinTemplateDecl *D)
ObjCIvarRefExpr - A reference to an ObjC instance variable.
@ NOUR_Constant
This name appears as a potential result of an lvalue-to-rvalue conversion that is a constant expressi...
void VisitArrayType(const ArrayType *T)
void VisitFunctionType(const FunctionType *T)
NamespaceDecl * getNominatedNamespace()
Returns the namespace nominated by this using-directive.
TypeSourceInfo * getFriendType() const
If this friend declaration names an (untemplated but possibly dependent) type, return the type; other...
EnumDecl * getEnumDecl() const
APValue * evaluateValue() const
Attempt to evaluate the value of the initializer attached to this declaration, and produce notes expl...
QualType getAsType() const
Retrieve the type for a type template argument.
@ CallInit
Call-style initialization (C++98)
const char * getDeclKindName() const
bool isParameterPack() const
Whether this template template parameter is a template parameter pack.
void VisitTypeAliasDecl(const TypeAliasDecl *D)
Represents a static or instance method of a struct/union/class.
DeclContext * getDeclContext()
TemplateName getTemplateName() const
Retrieve the name of the template that we are specializing.
void VisitArrayTypeTraitExpr(const ArrayTypeTraitExpr *Node)
@ UsingTemplate
A template name that refers to a template declaration found through a specific using shadow declarati...
void VisitTagType(const TagType *T)
void VisitUnresolvedUsingValueDecl(const UnresolvedUsingValueDecl *D)
StorageClass
Storage classes.