15#ifndef LLVM_CLANG_AST_ASTNODETRAVERSER_H
16#define LLVM_CLANG_AST_ASTNODETRAVERSER_H
60template <
typename Derived,
typename NodeDelegateType>
65 const comments::FullComment *>,
72 bool Deserialize =
false;
76 NodeDelegateType &getNodeDelegate() {
77 return getDerived().doGetNodeDelegate();
79 Derived &getDerived() {
return *
static_cast<Derived *
>(
this); }
92 getNodeDelegate().AddChild([=] {
93 getNodeDelegate().Visit(D);
99 for (
const auto &A : D->
attrs())
104 Visit(Comment, Comment);
107 if (!isa<FunctionDecl, ObjCMethodDecl, BlockDecl>(*D)) {
109 if (
const auto *CTSD = dyn_cast<ClassTemplateSpecializationDecl>(D)) {
110 auto SK = CTSD->getSpecializationKind();
116 if (
const auto *DC = dyn_cast<DeclContext>(D))
123 getNodeDelegate().AddChild(
Label, [=] {
126 if (
auto *E = dyn_cast_or_null<Expr>(S)) {
131 S = E->IgnoreUnlessSpelledInSource();
136 getNodeDelegate().Visit(S);
145 if (isa<DeclStmt>(S) || isa<GenericSelectionExpr>(S) ||
146 isa<RequiresExpr>(S))
150 isa<LambdaExpr, CXXForRangeStmt, CallExpr,
151 CXXRewrittenBinaryOperator>(S))
154 for (
const Stmt *SubStmt : S->children())
164 getNodeDelegate().AddChild([=] {
165 getNodeDelegate().Visit(T);
171 getNodeDelegate().AddChild([=] {
172 getNodeDelegate().Visit(T);
179 if (SingleStepDesugar !=
QualType(T, 0))
180 Visit(SingleStepDesugar);
185 getNodeDelegate().AddChild([=] {
186 getNodeDelegate().Visit(A);
194 getNodeDelegate().AddChild([=] {
195 getNodeDelegate().Visit(Init);
196 Visit(Init->getInit());
201 const Decl *From =
nullptr,
const char *
Label =
nullptr) {
202 getNodeDelegate().AddChild([=] {
203 getNodeDelegate().Visit(A, R, From,
Label);
209 getNodeDelegate().AddChild([=] {
210 getNodeDelegate().Visit(
C);
217 getNodeDelegate().AddChild([=] {
218 getNodeDelegate().Visit(
C);
219 for (
const auto *S :
C->children())
225 getNodeDelegate().AddChild([=] {
226 getNodeDelegate().Visit(A);
228 Visit(TSI->getType());
229 Visit(A.getAssociationExpr());
234 getNodeDelegate().AddChild([=] {
235 getNodeDelegate().Visit(R);
238 if (
auto *TR = dyn_cast<concepts::TypeRequirement>(R)) {
239 if (!TR->isSubstitutionFailure())
240 Visit(TR->getType()->getType().getTypePtr());
241 }
else if (
auto *ER = dyn_cast<concepts::ExprRequirement>(R)) {
242 if (!ER->isExprSubstitutionFailure())
243 Visit(ER->getExpr());
244 if (!ER->getReturnTypeRequirement().isEmpty())
245 Visit(ER->getReturnTypeRequirement()
247 ->getImmediatelyDeclaredConstraint());
248 }
else if (
auto *NR = dyn_cast<concepts::NestedRequirement>(R)) {
249 if (!NR->hasInvalidConstraint())
250 Visit(NR->getConstraintExpr());
256 getNodeDelegate().AddChild([=] { getNodeDelegate().Visit(R); });
260 getNodeDelegate().AddChild([=] { getNodeDelegate().Visit(
Value, Ty); });
264 getNodeDelegate().AddChild([=] {
265 getNodeDelegate().Visit(
C, FC);
281 if (
const auto *D = N.
get<
Decl>())
283 else if (
const auto *S = N.
get<
Stmt>())
287 else if (
const auto *T = N.
get<
Type>())
311 for (
const auto &TP : *TPL)
328 const Decl *From =
nullptr,
329 const char *
Label =
nullptr) {
334 for (
unsigned i = 0, e = TAL.
size(); i < e; ++i)
342 for (
const auto &typeParam : *typeParams) {
442 if (
const auto *
C = dyn_cast<CXXConstructorDecl>(D))
443 for (
const auto *I :
C->inits())
517 template <
typename SpecializationDecl>
519 for (
const auto *RedeclWithBadType : D->redecls()) {
523 auto *Redecl = dyn_cast<SpecializationDecl>(RedeclWithBadType);
528 assert(isa<CXXRecordDecl>(RedeclWithBadType) &&
529 "expected an injected-class-name");
536 template <
typename TemplateDecl>
543 for (
const auto *Child : D->specializations())
606 Visit(TC->getImmediatelyDeclaredConstraint());
650 Visit(TD->getTypeForDecl());
658 if (
auto *TD = ET->getOwnedTagDecl())
685 for (
const auto &I : D->
inits())
699 for (
const auto &D :
Node->decls())
704 for (
const auto *A :
Node->getAttrs())
717 for (
const auto *
C :
Node->clauses())
723 Visit(Filler,
"array_filler");
729 Visit(Filler,
"array_filler");
736 if (
Expr *Source =
Node->getSourceExpr())
761 for (
unsigned I = 0, N =
Node->capture_size(); I != N; ++I) {
762 const auto *
C =
Node->capture_begin() + I;
763 if (!
C->isExplicit())
765 if (
Node->isInitCapture(
C))
766 Visit(
C->getCapturedVar());
771 for (
const auto *
P :
Node->getCallOperator()->parameters())
780 if (
Node->isPartiallySubstituted())
781 for (
const auto &A :
Node->getPartialArguments())
795 if (
const VarDecl *CatchParam =
Node->getCatchParamDecl())
809 for (
const auto *Child :
810 make_filter_range(
Node->children(), [
this](
const Stmt *Child) {
811 if (Traversal != TK_IgnoreUnlessSpelledInSource)
813 return !isa<CXXDefaultArgExpr>(Child);
842#include "clang/AST/AttrNodeTraverse.inc"
C Language Family Type Representation.
APValue - This class implements a discriminated union of [uninitialized] [APSInt] [APFloat],...
comments::FullComment * getLocalCommentForDeclUncached(const Decl *D) const
Return parsed documentation comment attached to a given declaration.
ASTNodeTraverser traverses the Clang AST for dumping purposes.
void VisitSubstNonTypeTemplateParmPackExpr(const SubstNonTypeTemplateParmPackExpr *E)
void VisitDeclStmt(const DeclStmt *Node)
void VisitFunctionType(const FunctionType *T)
void VisitCapturedDecl(const CapturedDecl *D)
void Visit(const BlockDecl::Capture &C)
void VisitAdjustedType(const AdjustedType *T)
void VisitSizeOfPackExpr(const SizeOfPackExpr *Node)
void VisitMemberPointerType(const MemberPointerType *T)
void VisitDependentSizedArrayType(const DependentSizedArrayType *T)
void VisitTypeOfExprType(const TypeOfExprType *T)
void VisitLocInfoType(const LocInfoType *T)
void dumpTemplateDeclSpecialization(const SpecializationDecl *D)
void Visit(const comments::Comment *C, const comments::FullComment *FC)
void VisitClassTemplateSpecializationDecl(const ClassTemplateSpecializationDecl *D)
void VisitBlockDecl(const BlockDecl *D)
void VisitObjCImplementationDecl(const ObjCImplementationDecl *D)
void VisitTemplateTemplateParmDecl(const TemplateTemplateParmDecl *D)
void VisitObjCAtCatchStmt(const ObjCAtCatchStmt *Node)
void VisitTypeAliasTemplateDecl(const TypeAliasTemplateDecl *D)
void VisitCXXParenListInitExpr(const CXXParenListInitExpr *PLIE)
void dumpTemplateArgumentList(const TemplateArgumentList &TAL)
void Visit(const OMPClause *C)
void VisitImplicitConceptSpecializationDecl(const ImplicitConceptSpecializationDecl *CSD)
void VisitReferenceType(const ReferenceType *T)
void VisitBlockExpr(const BlockExpr *Node)
void VisitObjCInterfaceDecl(const ObjCInterfaceDecl *D)
void VisitStaticAssertDecl(const StaticAssertDecl *D)
void VisitBlockPointerType(const BlockPointerType *T)
void VisitFieldDecl(const FieldDecl *D)
void VisitAttributedStmt(const AttributedStmt *Node)
void Visit(const Type *T)
void VisitPipeType(const PipeType *T)
void Visit(const Attr *A)
void VisitClassScopeFunctionSpecializationDecl(const ClassScopeFunctionSpecializationDecl *D)
void VisitInitListExpr(const InitListExpr *ILE)
void VisitVarTemplateDecl(const VarTemplateDecl *D)
void VisitPackExpansionType(const PackExpansionType *T)
void VisitBTFTagAttributedType(const BTFTagAttributedType *T)
void VisitTypeAliasDecl(const TypeAliasDecl *D)
void VisitDecompositionDecl(const DecompositionDecl *D)
void VisitObjCMethodDecl(const ObjCMethodDecl *D)
void VisitClassTemplateDecl(const ClassTemplateDecl *D)
void SetTraversalKind(TraversalKind TK)
void Visit(const concepts::Requirement *R)
void VisitOMPCapturedExprDecl(const OMPCapturedExprDecl *D)
void VisitComplexType(const ComplexType *T)
void dumpDeclContext(const DeclContext *DC)
void VisitUsingShadowDecl(const UsingShadowDecl *D)
void dumpObjCTypeParamList(const ObjCTypeParamList *typeParams)
void VisitVarTemplateSpecializationDecl(const VarTemplateSpecializationDecl *D)
void Visit(const DynTypedNode &N)
void VisitExpressionTemplateArgument(const TemplateArgument &TA)
void dumpTemplateDecl(const TemplateDecl *D)
void VisitVectorType(const VectorType *T)
void dumpTemplateArgumentLoc(const TemplateArgumentLoc &A, const Decl *From=nullptr, const char *Label=nullptr)
bool getDeserialize() const
void VisitCXXCatchStmt(const CXXCatchStmt *Node)
void VisitClassTemplatePartialSpecializationDecl(const ClassTemplatePartialSpecializationDecl *D)
void VisitTypedefDecl(const TypedefDecl *D)
void Visit(const ConceptReference *R)
void VisitBindingDecl(const BindingDecl *D)
void Visit(const APValue &Value, QualType Ty)
void VisitRequiresExpr(const RequiresExpr *E)
void VisitGenericSelectionExpr(const GenericSelectionExpr *E)
void VisitSubstTemplateTypeParmPackType(const SubstTemplateTypeParmPackType *T)
void VisitOpaqueValueExpr(const OpaqueValueExpr *Node)
void setDeserialize(bool D)
void VisitArrayType(const ArrayType *T)
void Visit(const CXXCtorInitializer *Init)
void VisitVarDecl(const VarDecl *D)
void VisitVarTemplatePartialSpecializationDecl(const VarTemplatePartialSpecializationDecl *D)
void VisitFileScopeAsmDecl(const FileScopeAsmDecl *D)
void VisitFunctionProtoType(const FunctionProtoType *T)
void VisitUnaryTransformType(const UnaryTransformType *T)
void VisitLambdaExpr(const LambdaExpr *Node)
void VisitCallExpr(const CallExpr *Node)
void VisitDecltypeType(const DecltypeType *T)
void VisitOMPExecutableDirective(const OMPExecutableDirective *Node)
void VisitEnumConstantDecl(const EnumConstantDecl *D)
void VisitTemplateSpecializationType(const TemplateSpecializationType *T)
void VisitAtomicType(const AtomicType *T)
void VisitDependentSizedExtVectorType(const DependentSizedExtVectorType *T)
void Visit(const Stmt *Node, StringRef Label={})
void Visit(const GenericSelectionExpr::ConstAssociation &A)
void VisitBuiltinTemplateDecl(const BuiltinTemplateDecl *D)
void VisitConceptDecl(const ConceptDecl *D)
void VisitTopLevelStmtDecl(const TopLevelStmtDecl *D)
void dumpASTTemplateArgumentListInfo(const ASTTemplateArgumentListInfo *TALI)
void VisitConceptSpecializationExpr(const ConceptSpecializationExpr *CSE)
void VisitVariableArrayType(const VariableArrayType *T)
void VisitTypeTemplateArgument(const TemplateArgument &TA)
void VisitTemplateTypeParmDecl(const TemplateTypeParmDecl *D)
void VisitOMPAllocateDecl(const OMPAllocateDecl *D)
void VisitOMPThreadPrivateDecl(const OMPThreadPrivateDecl *D)
void VisitCapturedStmt(const CapturedStmt *Node)
void VisitFriendDecl(const FriendDecl *D)
void VisitSubstNonTypeTemplateParmExpr(const SubstNonTypeTemplateParmExpr *E)
void VisitNonTypeTemplateParmDecl(const NonTypeTemplateParmDecl *D)
void VisitCXXForRangeStmt(const CXXForRangeStmt *Node)
void VisitOMPDeclareMapperDecl(const OMPDeclareMapperDecl *D)
void VisitObjCObjectPointerType(const ObjCObjectPointerType *T)
void Visit(const Decl *D)
void VisitAttributedType(const AttributedType *T)
void Visit(const TemplateArgument &A, SourceRange R={}, const Decl *From=nullptr, const char *Label=nullptr)
void VisitPackTemplateArgument(const TemplateArgument &TA)
TraversalKind GetTraversalKind() const
void VisitObjCCategoryDecl(const ObjCCategoryDecl *D)
void VisitSubstTemplateTypeParmType(const SubstTemplateTypeParmType *)
void VisitCXXRewrittenBinaryOperator(const CXXRewrittenBinaryOperator *Node)
void dumpTemplateParameters(const TemplateParameterList *TPL)
void VisitFunctionDecl(const FunctionDecl *D)
void VisitFunctionTemplateDecl(const FunctionTemplateDecl *D)
void VisitOMPDeclareReductionDecl(const OMPDeclareReductionDecl *D)
void VisitPointerType(const PointerType *T)
Represents a type which was implicitly adjusted by the semantic engine for arbitrary reasons.
QualType getOriginalType() const
Represents an array type, per C99 6.7.5.2 - Array Declarators.
QualType getElementType() const
QualType getValueType() const
Gets the type contained by this atomic type, i.e.
Attr - This represents one attribute.
Represents an attribute applied to a statement.
An attributed type is a type to which a type attribute has been applied.
QualType getModifiedType() const
QualType getEquivalentType() const
QualType getWrappedType() const
A binding in a decomposition declaration.
VarDecl * getHoldingVar() const
Get the variable (if any) that holds the value of evaluating the binding.
Expr * getBinding() const
Get the expression to which this declaration is bound.
A class which contains all the information about a particular captured value.
Represents a block literal declaration, which is like an unnamed FunctionDecl.
Stmt * getBody() const override
getBody - If this Decl represents a declaration for a body of code, such as a function or method defi...
ArrayRef< Capture > captures() const
ArrayRef< ParmVarDecl * > parameters() const
BlockExpr - Adaptor class for mixing a BlockDecl with expressions.
QualType getPointeeType() const
Represents the builtin template declaration which is used to implement __make_integer_seq and other b...
CXXCatchStmt - This represents a C++ catch block.
Represents a C++ base or member initializer.
CXXForRangeStmt - This represents C++0x [stmt.ranged]'s ranged for statement, represented as 'for (ra...
Represents a list-initialization with parenthesis.
A rewritten comparison expression that was originally written using operator syntax.
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
Represents the body of a CapturedStmt, and serves as its DeclContext.
Stmt * getBody() const override
getBody - If this Decl represents a declaration for a body of code, such as a function or method defi...
This captures a statement into a function.
Declaration of a function specialization at template class scope.
CXXMethodDecl * getSpecialization() const
const ASTTemplateArgumentListInfo * getTemplateArgsAsWritten() const
Declaration of a class template.
TemplateParameterList * getTemplateParameters() const
Get the list of template parameters.
Represents a class template specialization, which refers to a class template with a given set of temp...
const TemplateArgumentList & getTemplateArgs() const
Retrieve the template arguments of the class template specialization.
Complex values, per C99 6.2.5p11.
QualType getElementType() const
Declaration of a C++20 concept.
Expr * getConstraintExpr() const
A reference to a concept and its template args, as it appears in the code.
Represents the specialization of a concept - evaluates to a prvalue of type bool.
const ASTTemplateArgumentListInfo * getTemplateArgsAsWritten() const
bool hasExplicitTemplateArgs() const
const ImplicitConceptSpecializationDecl * getSpecializationDecl() const
A simple visitor class that helps create attribute visitors.
A simple visitor class that helps create declaration visitors.
ConstStmtVisitor - This class implements a simple visitor for Stmt subclasses.
A simple visitor class that helps create template argument visitors.
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
decl_range noload_decls() const
noload_decls_begin/end - Iterate over the declarations stored in this context that are currently load...
decl_range decls() const
decls_begin/decls_end - Iterate over the declarations stored in this context.
DeclStmt - Adaptor class for mixing declarations with statements and expressions.
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.
Expr * getTrailingRequiresClause()
Get the constraint-expression introduced by the trailing requires-clause in the function/member decla...
Represents the type decltype(expr) (C++11).
Expr * getUnderlyingExpr() const
A decomposition declaration.
ArrayRef< BindingDecl * > bindings() const
const ParmDecl * getInheritedFrom() const
Get the parameter from which we inherit the default argument, if any.
Represents an array type in C++ whose size is a value-dependent expression.
Expr * getSizeExpr() const
Represents an extended vector type where either the type or size is dependent.
Expr * getSizeExpr() const
QualType getElementType() const
A dynamically typed AST node container.
const T * get() const
Retrieve the stored node as type T.
Represents a type that was referred to using an elaborated type keyword, e.g., struct S,...
An instance of this object exists for each enum constant that is defined.
const Expr * getInitExpr() const
This represents one expression.
Represents a member of a struct/union/class.
Expr * getInClassInitializer() const
Get the C++11 default member initializer for this member, or null if one has not been set.
bool isBitField() const
Determines whether this field is a bitfield.
Expr * getBitWidth() const
Returns the expression that represents the bit width, if this field is a bit field.
const StringLiteral * getAsmString() const
FriendDecl - Represents the declaration of a friend entity, which can be a function,...
NamedDecl * getFriendDecl() const
If this friend declaration doesn't name a type, return the inner declaration.
TypeSourceInfo * getFriendType() const
If this friend declaration names an (untemplated but possibly dependent) type, return the type; other...
Represents a function declaration or definition.
Stmt * getBody(const FunctionDecl *&Definition) const
Retrieve the body (definition) of the function.
ArrayRef< ParmVarDecl * > parameters() const
FunctionTemplateSpecializationInfo * getTemplateSpecializationInfo() const
If this function is actually a function template specialization, retrieve information about this func...
param_iterator param_begin()
bool doesThisDeclarationHaveABody() const
Returns whether this specific declaration of the function has a body.
bool isDefaulted() const
Whether this function is defaulted.
Represents a prototype with parameter type info, e.g.
ArrayRef< QualType > getParamTypes() const
Declaration of a template function.
FunctionType - C99 6.7.5.3 - Function Declarators.
QualType getReturnType() const
Represents a C11 generic selection.
TypeSourceInfo * getControllingType()
Return the controlling type of this generic selection expression.
bool isExprPredicate() const
Whether this generic selection uses an expression as its controlling argument.
association_range associations()
AssociationTy< true > ConstAssociation
Expr * getControllingExpr()
Return the controlling expression of this generic selection expression.
ArrayRef< TemplateArgument > getTemplateArguments() const
Describes an C or C++ initializer list.
Expr * getArrayFiller()
If this initializer list initializes an array with more elements than there are initializers in the l...
A C++ lambda expression, which produces a function object (of unspecified type) that can be invoked l...
Holds a QualType and a TypeSourceInfo* that came out of a declarator parsing.
TypeSourceInfo * getTypeSourceInfo() const
A pointer to member type per C++ 8.3.3 - Pointers to members.
QualType getPointeeType() const
const Type * getClass() const
NamedDecl * getUnderlyingDecl()
Looks through UsingDecls and ObjCCompatibleAliasDecls for the underlying named decl.
NonTypeTemplateParmDecl - Declares a non-type template parameter, e.g., "Size" in.
const DefArgStorage & getDefaultArgStorage() const
bool hasDefaultArgument() const
Determine whether this template parameter has a default argument.
bool defaultArgumentWasInherited() const
Determines whether the default argument was inherited from a previous declaration of this template.
Expr * getDefaultArgument() const
Retrieve the default argument, if any.
Expr * getPlaceholderTypeConstraint() const
Return the constraint introduced by the placeholder type of this non-type template parameter (if any)...
This represents '#pragma omp allocate ...' directive.
clauselist_range clauselists()
Pseudo declaration for capturing expressions.
This is a basic class for representing single OpenMP clause.
This represents '#pragma omp declare mapper ...' directive.
clauselist_range clauselists()
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.
This is a basic class for representing single OpenMP executable directive.
This represents '#pragma omp threadprivate ...' directive.
Represents Objective-C's @catch statement.
ObjCCategoryDecl - Represents a category declaration.
ObjCTypeParamList * getTypeParamList() const
Retrieve the type parameter list associated with this category or extension.
ObjCImplementationDecl - Represents a class definition - this is where method definitions are specifi...
Represents an ObjC class declaration.
ObjCTypeParamList * getTypeParamListAsWritten() const
Retrieve the type parameters written on this particular declaration of the class.
ObjCMethodDecl - Represents an instance or class method declaration.
bool hasBody() const override
Determine whether this method has a body.
ArrayRef< ParmVarDecl * > parameters() const
Stmt * getBody() const override
Retrieve the body of this method, if it has one.
bool isThisDeclarationADefinition() const
Returns whether this specific method is a definition.
Represents a pointer to an Objective C object.
QualType getPointeeType() const
Gets the type pointed to by this ObjC pointer.
Stores a list of Objective-C type parameters for a parameterized class or a category/extension thereo...
OpaqueValueExpr - An expression referring to an opaque object of a fixed type and value class.
Represents a pack expansion of types.
QualType getPattern() const
Retrieve the pattern of this pack expansion, which is the type that will be repeatedly instantiated w...
Represents a parameter to a function.
QualType getElementType() const
PointerType - C99 6.7.5.1 - Pointer Declarators.
QualType getPointeeType() const
A (possibly-)qualified type.
SplitQualType split() const
Divides a QualType into its unqualified type and a set of local qualifiers.
bool hasQualifiers() const
Return true if the set contains any qualifiers.
Base for LValueReferenceType and RValueReferenceType.
QualType getPointeeType() const
C++2a [expr.prim.req]: A requires-expression provides a concise way to express requirements on templa...
ArrayRef< concepts::Requirement * > getRequirements() const
ArrayRef< ParmVarDecl * > getLocalParameters() const
Represents an expression that computes the length of a parameter pack.
A trivial tuple used to represent a source range.
Represents a C++11 static_assert declaration.
RetTy Visit(PTR(Stmt) S, ParamTys... P)
Stmt - This represents one statement.
Represents a reference to a non-type template parameter that has been substituted with a template arg...
NonTypeTemplateParmDecl * getParameter() const
Represents a reference to a non-type template parameter pack that has been substituted with a non-tem...
TemplateArgument getArgumentPack() const
Retrieve the template argument pack containing the substituted template arguments.
NonTypeTemplateParmDecl * getParameterPack() const
Retrieve the non-type template parameter pack being substituted.
Represents the result of substituting a set of types for a template type parameter pack.
TemplateArgument getArgumentPack() const
Represents the result of substituting a type for a template type parameter.
A template argument list.
unsigned size() const
Retrieve the number of template arguments in this template argument list.
Location wrapper for a TemplateArgument.
const TemplateArgument & getArgument() const
SourceRange getSourceRange() const LLVM_READONLY
Represents a template argument.
Expr * getAsExpr() const
Retrieve the template argument as an expression.
QualType getAsType() const
Retrieve the type for a type template argument.
ArrayRef< TemplateArgument > pack_elements() const
Iterator range referencing all of the elements of a template argument pack.
The base class of all kinds of template declarations (e.g., class, function, etc.).
NamedDecl * getTemplatedDecl() const
Get the underlying, templated declaration.
TemplateParameterList * getTemplateParameters() const
Get the list of template parameters.
Stores a list of template parameters for a TemplateDecl and its derived classes.
Expr * getRequiresClause()
The constraint-expression of the associated requires-clause.
Represents a type template specialization; the template must be a class template, a type alias templa...
ArrayRef< TemplateArgument > template_arguments() const
TemplateTemplateParmDecl - Declares a template template parameter, e.g., "T" in.
const DefArgStorage & getDefaultArgStorage() const
const TemplateArgumentLoc & getDefaultArgument() const
Retrieve the default argument, if any.
bool defaultArgumentWasInherited() const
Determines whether the default argument was inherited from a previous declaration of this template.
bool hasDefaultArgument() const
Determine whether this template parameter has a default argument.
Declaration of a template type parameter.
QualType getDefaultArgument() const
Retrieve the default argument, if any.
const TypeConstraint * getTypeConstraint() const
Returns the type constraint associated with this template parameter (if any).
bool hasDefaultArgument() const
Determine whether this template parameter has a default argument.
bool defaultArgumentWasInherited() const
Determines whether the default argument was inherited from a previous declaration of this template.
const DefArgStorage & getDefaultArgStorage() const
A declaration that models statements at global scope.
Represents the declaration of a typedef-name via a C++11 alias-declaration.
Declaration of an alias template.
TypeAliasDecl * getTemplatedDecl() const
Get the underlying function declaration of the template.
Represents a typeof (or typeof) expression (a C23 feature and GCC extension) or a typeof_unqual expre...
Expr * getUnderlyingExpr() const
A container of type source information.
QualType getType() const
Return the type wrapped by this type source info.
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.
const T * getAs() const
Member-template getAs<specific type>'.
Represents the declaration of a typedef-name via the 'typedef' type specifier.
QualType getUnderlyingType() const
Represents a shadow declaration implicitly introduced into a scope by a (resolved) using-declaration ...
Represents a variable declaration or definition.
bool isCXXForRangeDecl() const
Determine whether this variable is the for-range-declaration in a C++0x for-range statement.
const Expr * getInit() const
Declaration of a variable template.
TemplateParameterList * getTemplateParameters() const
Get the list of template parameters.
Represents a variable template specialization, which refers to a variable template with a given set o...
const TemplateArgumentList & getTemplateArgs() const
Retrieve the template arguments of the variable template specialization.
Represents a C array with a specified size that is not an integer-constant-expression.
Expr * getSizeExpr() const
Represents a GCC generic vector type.
QualType getElementType() const
A static requirement that can be used in a requires-expression to check properties of types and expre...
RetTy Visit(REF(TemplateArgument) TA, ParamTys... P)
TraversalKind
Defines how we descend a level in the AST when we pass through expressions.
@ TK_AsIs
Will traverse all child nodes.
@ TK_IgnoreUnlessSpelledInSource
Ignore AST nodes not written in the source.
@ C
Languages that the frontend can parse and compile.
@ Parameter
The parameter type of a method or function.
@ TSK_ExplicitInstantiationDefinition
This template specialization was instantiated from a template due to an explicit instantiation defini...
@ TSK_ExplicitInstantiationDeclaration
This template specialization was instantiated from a template due to an explicit instantiation declar...
Represents an explicit template argument list in C++, e.g., the "<int>" in "sort<int>".
llvm::ArrayRef< TemplateArgumentLoc > arguments() const
A std::pair-like structure for storing a qualified type split into its local qualifiers and its local...
const Type * Ty
The locally-unqualified type.
Qualifiers Quals
The local qualifiers.