clang
15.0.0git
|
Represents a template argument. More...
#include "clang/AST/TemplateBase.h"
Public Types | |
enum | ArgKind { Null = 0, Type, Declaration, NullPtr, Integral, Template, TemplateExpansion, Expression, Pack } |
The kind of template argument we're storing. More... | |
using | pack_iterator = const TemplateArgument * |
Iterator that traverses the elements of a template argument pack. More... | |
Public Member Functions | |
constexpr | TemplateArgument () |
Construct an empty, invalid template argument. More... | |
TemplateArgument (QualType T, bool isNullPtr=false) | |
Construct a template type argument. More... | |
TemplateArgument (ValueDecl *D, QualType QT) | |
Construct a template argument that refers to a declaration, which is either an external declaration or a template declaration. More... | |
TemplateArgument (ASTContext &Ctx, const llvm::APSInt &Value, QualType Type) | |
Construct an integral constant template argument. More... | |
TemplateArgument (const TemplateArgument &Other, QualType Type) | |
Construct an integral constant template argument with the same value as Other but a different type. More... | |
TemplateArgument (TemplateName Name) | |
Construct a template argument that is a template. More... | |
TemplateArgument (TemplateName Name, Optional< unsigned > NumExpansions) | |
Construct a template argument that is a template pack expansion. More... | |
TemplateArgument (Expr *E) | |
Construct a template argument that is an expression. More... | |
TemplateArgument (ArrayRef< TemplateArgument > Args) | |
Construct a template argument that is a template argument pack. More... | |
TemplateArgument (TemplateName, bool)=delete | |
ArgKind | getKind () const |
Return the kind of stored template argument. More... | |
bool | isNull () const |
Determine whether this template argument has no value. More... | |
TemplateArgumentDependence | getDependence () const |
bool | isDependent () const |
Whether this template argument is dependent on a template parameter such that its result can change from one instantiation to another. More... | |
bool | isInstantiationDependent () const |
Whether this template argument is dependent on a template parameter. More... | |
bool | containsUnexpandedParameterPack () const |
Whether this template argument contains an unexpanded parameter pack. More... | |
bool | isPackExpansion () const |
Determine whether this template argument is a pack expansion. More... | |
QualType | getAsType () const |
Retrieve the type for a type template argument. More... | |
ValueDecl * | getAsDecl () const |
Retrieve the declaration for a declaration non-type template argument. More... | |
QualType | getParamTypeForDecl () const |
QualType | getNullPtrType () const |
Retrieve the type for null non-type template argument. More... | |
TemplateName | getAsTemplate () const |
Retrieve the template name for a template name argument. More... | |
TemplateName | getAsTemplateOrTemplatePattern () const |
Retrieve the template argument as a template name; if the argument is a pack expansion, return the pattern as a template name. More... | |
Optional< unsigned > | getNumTemplateExpansions () const |
Retrieve the number of expansions that a template template argument expansion will produce, if known. More... | |
llvm::APSInt | getAsIntegral () const |
Retrieve the template argument as an integral value. More... | |
QualType | getIntegralType () const |
Retrieve the type of the integral value. More... | |
void | setIntegralType (QualType T) |
QualType | getNonTypeTemplateArgumentType () const |
If this is a non-type template argument, get its type. More... | |
Expr * | getAsExpr () const |
Retrieve the template argument as an expression. More... | |
pack_iterator | pack_begin () const |
Iterator referencing the first argument of a template argument pack. More... | |
pack_iterator | pack_end () const |
Iterator referencing one past the last argument of a template argument pack. More... | |
ArrayRef< TemplateArgument > | pack_elements () const |
Iterator range referencing all of the elements of a template argument pack. More... | |
unsigned | pack_size () const |
The number of template arguments in the given template argument pack. More... | |
ArrayRef< TemplateArgument > | getPackAsArray () const |
Return the array of arguments in this template argument pack. More... | |
bool | structurallyEquals (const TemplateArgument &Other) const |
Determines whether two template arguments are superficially the same. More... | |
TemplateArgument | getPackExpansionPattern () const |
When the template argument is a pack expansion, returns the pattern of the pack expansion. More... | |
void | print (const PrintingPolicy &Policy, raw_ostream &Out, bool IncludeType) const |
Print this template argument to the given output stream. More... | |
void | dump (raw_ostream &Out) const |
Debugging aid that dumps the template argument. More... | |
void | dump () const |
Debugging aid that dumps the template argument to standard error. More... | |
void | Profile (llvm::FoldingSetNodeID &ID, const ASTContext &Context) const |
Used to insert TemplateArguments into FoldingSets. More... | |
Static Public Member Functions | |
static TemplateArgument | getEmptyPack () |
static TemplateArgument | CreatePackCopy (ASTContext &Context, ArrayRef< TemplateArgument > Args) |
Create a new template argument pack by copying the given set of template arguments. More... | |
Represents a template argument.
Definition at line 61 of file TemplateBase.h.
using clang::TemplateArgument::pack_iterator = const TemplateArgument * |
Iterator that traverses the elements of a template argument pack.
Definition at line 347 of file TemplateBase.h.
The kind of template argument we're storing.
Enumerator | |
---|---|
Null | Represents an empty template argument, e.g., one that has not been deduced. |
Type | The template argument is a type. |
Declaration | The template argument is a declaration that was provided for a pointer, reference, or pointer to member non-type template parameter. |
NullPtr | The template argument is a null pointer or null pointer to member that was provided for a non-type template parameter. |
Integral | The template argument is an integral value stored in an llvm::APSInt that was provided for an integral non-type template parameter. |
Template | The template argument is a template name that was provided for a template template parameter. |
TemplateExpansion | The template argument is a pack expansion of a template name that was provided for a template template parameter. |
Expression | The template argument is an expression, and we've not resolved it to one of the other forms yet, either because it's dependent or because we're representing a non-canonical template argument (for instance, in a TemplateSpecializationType). |
Pack | The template argument is actually a parameter pack. Arguments are stored in the Args struct. |
Definition at line 64 of file TemplateBase.h.
|
inlineconstexpr |
Construct an empty, invalid template argument.
Definition at line 151 of file TemplateBase.h.
References Null.
Referenced by getEmptyPack(), and getPackExpansionPattern().
Construct a template type argument.
Definition at line 154 of file TemplateBase.h.
References clang::QualType::getAsOpaquePtr(), NullPtr, Type, and TypeOrValue.
Construct a template argument that refers to a declaration, which is either an external declaration or a template declaration.
Definition at line 162 of file TemplateBase.h.
References Declaration, DeclArg, and clang::QualType::getAsOpaquePtr().
TemplateArgument::TemplateArgument | ( | ASTContext & | Ctx, |
const llvm::APSInt & | Value, | ||
QualType | Type | ||
) |
Construct an integral constant template argument.
The memory to store the value is allocated with Ctx.
Definition at line 163 of file TemplateBase.cpp.
References clang::ASTContext::Allocate(), Integer, Integral, and memcpy().
|
inline |
Construct an integral constant template argument with the same value as Other but a different type.
Definition at line 175 of file TemplateBase.h.
References Integer.
|
inline |
Construct a template argument that is a template.
This form of template argument is generally used for template template parameters. However, the template name could be a dependent template name that ends up being instantiated to a function template whose address is taken.
Name | The template name. |
Definition at line 188 of file TemplateBase.h.
|
inline |
Construct a template argument that is a template pack expansion.
This form of template argument is generally used for template template parameters. However, the template name could be a dependent template name that ends up being instantiated to a function template whose address is taken.
Name | The template name. |
NumExpansions | The number of expansions that will be generated by instantiating |
Definition at line 205 of file TemplateBase.h.
|
inline |
Construct a template argument that is an expression.
This form of template argument only occurs in template argument lists used for dependent types and for expression; it will not occur in a non-dependent, canonical template argument list.
Definition at line 219 of file TemplateBase.h.
References Expression, and TypeOrValue.
|
inlineexplicit |
Construct a template argument that is a template argument pack.
We assume that storage for the template arguments provided outlives the TemplateArgument itself.
Definition at line 228 of file TemplateBase.h.
|
delete |
bool TemplateArgument::containsUnexpandedParameterPack | ( | ) | const |
Whether this template argument contains an unexpanded parameter pack.
Definition at line 270 of file TemplateBase.cpp.
References getDependence().
Referenced by clang::Sema::DiagnoseUnexpandedParameterPack(), and clang::Sema::getFullyPackExpandedSize().
|
static |
Create a new template argument pack by copying the given set of template arguments.
Definition at line 183 of file TemplateBase.cpp.
Referenced by checkDeducedTemplateArguments(), clang::Sema::CheckTemplateArgumentList(), and clang::ASTContext::getInjectedTemplateArg().
LLVM_DUMP_METHOD void TemplateArgument::dump | ( | ) | const |
Debugging aid that dumps the template argument to standard error.
Definition at line 496 of file TemplateBase.cpp.
void TemplateArgument::dump | ( | raw_ostream & | Out | ) | const |
Debugging aid that dumps the template argument.
Definition at line 489 of file TemplateBase.cpp.
|
inline |
Retrieve the declaration for a declaration non-type template argument.
Definition at line 275 of file TemplateBase.h.
References Declaration, DeclArg, and getKind().
Referenced by clang::ODRHash::AddTemplateArgument(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), checkDeducedTemplateArguments(), DiagTemplateArg(), clang::ASTContext::getCanonicalTemplateArgument(), getDependence(), clang::ASTNodeImporter::import(), isSameTemplateArg(), IsStructurallyEquivalent(), structurallyEquals(), clang::TreeTransform< Derived >::TransformTemplateArgument(), clang::TextNodeDumper::VisitDeclarationTemplateArgument(), and clang::JSONNodeDumper::VisitDeclarationTemplateArgument().
|
inline |
Retrieve the template argument as an expression.
Definition at line 341 of file TemplateBase.h.
References getKind(), and TypeOrValue.
Referenced by clang::ODRHash::AddTemplateArgument(), clang::ASTRecordWriter::AddTemplateArgumentLoc(), checkDeducedTemplateArguments(), clang::Sema::CheckTemplateArgument(), getDependence(), clang::Sema::getFullyPackExpandedSize(), getNonTypeTemplateArgumentType(), getPackExpansionPattern(), clang::Sema::getTemplateArgumentPackExpansionPattern(), clang::ASTNodeImporter::import(), isPackExpansion(), isSameTemplateArg(), IsStructurallyEquivalent(), clang::ASTRecordReader::readTemplateArgumentLoc(), clang::TreeTransform< Derived >::TransformTemplateArgument(), clang::RecursiveASTVisitor< CallGraph >::TraverseTemplateArgument(), and clang::ASTNodeTraverser< ASTDumper, TextNodeDumper >::VisitExpressionTemplateArgument().
|
inline |
Retrieve the template argument as an integral value.
Definition at line 312 of file TemplateBase.h.
References getKind(), Integer, and Integral.
Referenced by clang::Sema::BuildExpressionFromIntegralTemplateArgument(), checkBuiltinTemplateIdType(), checkDeducedTemplateArguments(), DiagTemplateArg(), isSameTemplateArg(), IsStructurallyEquivalent(), structurallyEquals(), clang::TreeTransform< Derived >::TransformTemplateArgument(), clang::TextNodeDumper::VisitIntegralTemplateArgument(), and clang::JSONNodeDumper::VisitIntegralTemplateArgument().
|
inline |
Retrieve the template name for a template name argument.
Definition at line 292 of file TemplateBase.h.
References clang::TemplateName::getFromVoidPointer(), getKind(), Template, and TemplateArg.
Referenced by checkDeducedTemplateArguments(), DiagTemplateArg(), clang::ASTContext::getCanonicalTemplateArgument(), getDependence(), clang::Sema::getFullyPackExpandedSize(), clang::TypeName::getFullyQualifiedTemplateArgument(), clang::ASTNodeImporter::import(), IsStructurallyEquivalent(), clang::TreeTransform< Derived >::RebuildPackExpansion(), SubstDefaultTemplateArgument(), clang::TreeTransform< Derived >::TransformTemplateArgument(), and clang::TextNodeDumper::VisitTemplateTemplateArgument().
|
inline |
Retrieve the template argument as a template name; if the argument is a pack expansion, return the pattern as a template name.
Definition at line 299 of file TemplateBase.h.
References clang::TemplateName::getFromVoidPointer(), getKind(), Template, TemplateArg, and TemplateExpansion.
Referenced by addAssociatedClassesAndNamespaces(), clang::ODRHash::AddTemplateArgument(), checkDeducedTemplateArguments(), clang::Sema::CheckTemplateArgument(), DiagTemplateArg(), clang::ASTContext::getCanonicalTemplateArgument(), getPackExpansionPattern(), clang::ASTNodeImporter::import(), isSameTemplateArg(), IsStructurallyEquivalent(), clang::RecursiveASTVisitor< CallGraph >::TraverseTemplateArgument(), clang::RecursiveASTVisitor< CallGraph >::TraverseTemplateArgumentLoc(), and clang::TextNodeDumper::VisitTemplateExpansionTemplateArgument().
|
inline |
Retrieve the type for a type template argument.
Definition at line 268 of file TemplateBase.h.
References clang::QualType::getFromOpaquePtr(), getKind(), and TypeOrValue.
Referenced by addAssociatedClassesAndNamespaces(), addInstanceOfTransition(), clang::ODRHash::AddTemplateArgument(), checkDeducedTemplateArguments(), clang::Sema::CheckTemplateArgument(), clang::Sema::CheckTemplateTypeArgument(), clang::desugarForDiagnostic(), DiagTemplateArg(), clang::ASTContext::getCanonicalTemplateArgument(), getDependence(), clang::Sema::getFullyPackExpandedSize(), clang::TypeName::getFullyQualifiedTemplateArgument(), getPackExpansionPattern(), clang::Sema::getTemplateArgumentPackExpansionPattern(), clang::Sema::getTrivialTemplateArgumentLoc(), clang::ASTNodeImporter::import(), clang::TemplateSpecializationTypeLoc::initializeArgLocs(), isPackExpansion(), isSameTemplateArg(), IsStructurallyEquivalent(), clang::TreeTransform< Derived >::TransformTemplateArgument(), clang::RecursiveASTVisitor< CallGraph >::TraverseTemplateArgument(), clang::RecursiveASTVisitor< CallGraph >::TraverseTemplateArgumentLoc(), TryDeconstructFunctionLike(), clang::TextNodeDumper::VisitTypeTemplateArgument(), clang::JSONNodeDumper::VisitTypeTemplateArgument(), and clang::ASTNodeTraverser< ASTDumper, TextNodeDumper >::VisitTypeTemplateArgument().
TemplateArgumentDependence TemplateArgument::getDependence | ( | ) | const |
Definition at line 191 of file TemplateBase.cpp.
References Declaration, Expression, getAsDecl(), getAsExpr(), getAsTemplate(), getAsType(), clang::Decl::getDeclContext(), getKind(), Integral, clang::XRayInstrKind::None, Null, NullPtr, P, Pack, pack_elements(), Template, TemplateExpansion, clang::toTemplateArgumentDependence(), and Type.
Referenced by containsUnexpandedParameterPack(), isDependent(), and isInstantiationDependent().
|
inlinestatic |
Definition at line 236 of file TemplateBase.h.
References None, and TemplateArgument().
|
inline |
Retrieve the type of the integral value.
Definition at line 326 of file TemplateBase.h.
References clang::QualType::getFromOpaquePtr(), getKind(), Integer, and Integral.
Referenced by clang::Sema::BuildExpressionFromIntegralTemplateArgument(), checkBuiltinTemplateIdType(), clang::ASTContext::getCanonicalTemplateArgument(), getNonTypeTemplateArgumentType(), clang::ASTNodeImporter::import(), IsStructurallyEquivalent(), and structurallyEquals().
|
inline |
Return the kind of stored template argument.
Definition at line 244 of file TemplateBase.h.
References TypeOrValue.
Referenced by addAssociatedClassesAndNamespaces(), addInstanceOfTransition(), clang::ODRHash::AddTemplateArgument(), clang::ASTRecordWriter::AddTemplateArgumentLoc(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), clang::Sema::BuildExpressionFromIntegralTemplateArgument(), checkDeducedTemplateArguments(), clang::Sema::CheckTemplateArgument(), clang::Sema::CheckTemplateTypeArgument(), clang::desugarForDiagnostic(), DiagTemplateArg(), getAsDecl(), getAsExpr(), getAsIntegral(), getAsTemplate(), getAsTemplateOrTemplatePattern(), getAsType(), clang::ASTContext::getCanonicalTemplateArgument(), getDependence(), clang::Sema::getFullyPackExpandedSize(), clang::TypeName::getFullyQualifiedTemplateArgument(), clang::comments::getFunctionTypeLoc(), getIntegralType(), clang::TemplateArgumentLoc::getLocation(), getNonTypeTemplateArgumentType(), getNullPtrType(), getNumTemplateExpansions(), getPackAsArray(), getPackExpansionPattern(), getParamTypeForDecl(), clang::TemplateArgumentLoc::getSourceDeclExpression(), clang::TemplateArgumentLoc::getSourceExpression(), clang::TemplateArgumentLoc::getSourceIntegralExpression(), clang::TemplateArgumentLoc::getSourceNullPtrExpression(), clang::TemplateArgumentLoc::getSourceRange(), clang::Sema::getTemplateArgumentPackExpansionPattern(), clang::TemplateArgumentLoc::getTemplateEllipsisLoc(), clang::TemplateArgumentLoc::getTemplateNameLoc(), clang::TemplateArgumentLoc::getTemplateQualifierLoc(), clang::Sema::getTrivialTemplateArgumentLoc(), clang::TemplateArgumentLoc::getTypeSourceInfo(), hasTemplateArgumentForDeduction(), clang::ASTNodeImporter::import(), isEnableIf(), isNull(), isPackExpansion(), isSameAsPrimaryTemplate(), isSameTemplateArg(), IsStructurallyEquivalent(), clang::Sema::isTemplateTemplateParameterAtLeastAsSpecializedAs(), pack_begin(), pack_end(), pack_size(), clang::ASTRecordReader::readTemplateArgumentLoc(), clang::TreeTransform< Derived >::RebuildPackExpansion(), ReferencesAnonymousEntity(), setIntegralType(), structurallyEquals(), clang::TemplateArgumentLoc::TemplateArgumentLoc(), clang::TreeTransform< Derived >::TransformTemplateArgument(), clang::RecursiveASTVisitor< CallGraph >::TraverseTemplateArgument(), clang::RecursiveASTVisitor< CallGraph >::TraverseTemplateArgumentLoc(), TryDeconstructFunctionLike(), and clang::templateargumentvisitor::Base< llvm::make_const_ref, TextNodeDumper, void, ParamTys... >::Visit().
QualType TemplateArgument::getNonTypeTemplateArgumentType | ( | ) | const |
If this is a non-type template argument, get its type.
Otherwise, returns a null QualType.
Definition at line 282 of file TemplateBase.cpp.
References Declaration, Expression, getAsExpr(), getIntegralType(), getKind(), getNullPtrType(), getParamTypeForDecl(), clang::Expr::getType(), Integral, Null, NullPtr, Pack, Template, TemplateExpansion, and Type.
Referenced by checkDeducedTemplateArguments(), and clang::TreeTransform< Derived >::TransformTemplateArgument().
|
inline |
Retrieve the type for null non-type template argument.
Definition at line 286 of file TemplateBase.h.
References clang::QualType::getFromOpaquePtr(), getKind(), NullPtr, and TypeOrValue.
Referenced by clang::ASTContext::getCanonicalTemplateArgument(), getNonTypeTemplateArgumentType(), clang::Sema::getTrivialTemplateArgumentLoc(), clang::ASTNodeImporter::import(), and isSameTemplateArg().
Retrieve the number of expansions that a template template argument expansion will produce, if known.
Definition at line 274 of file TemplateBase.cpp.
References getKind(), None, TemplateArg, and TemplateExpansion.
Referenced by clang::ASTContext::getCanonicalTemplateArgument(), clang::Sema::getTemplateArgumentPackExpansionPattern(), and clang::ASTNodeImporter::import().
|
inline |
Return the array of arguments in this template argument pack.
Definition at line 377 of file TemplateBase.h.
TemplateArgument TemplateArgument::getPackExpansionPattern | ( | ) | const |
When the template argument is a pack expansion, returns the pattern of the pack expansion.
Definition at line 394 of file TemplateBase.cpp.
References clang::Type::castAs(), Declaration, Expression, getAsExpr(), getAsTemplateOrTemplatePattern(), getAsType(), getKind(), Integral, isPackExpansion(), Null, NullPtr, Pack, Template, TemplateArgument(), TemplateExpansion, and Type.
Referenced by clang::Sema::getTemplateArgumentPackExpansionPattern(), and isSameAsPrimaryTemplate().
|
inline |
Definition at line 280 of file TemplateBase.h.
References Declaration, DeclArg, clang::QualType::getFromOpaquePtr(), and getKind().
Referenced by clang::ASTContext::getCanonicalTemplateArgument(), getNonTypeTemplateArgumentType(), clang::Sema::getTrivialTemplateArgumentLoc(), and clang::ASTNodeImporter::import().
bool TemplateArgument::isDependent | ( | ) | const |
Whether this template argument is dependent on a template parameter such that its result can change from one instantiation to another.
Definition at line 239 of file TemplateBase.cpp.
References getDependence().
bool TemplateArgument::isInstantiationDependent | ( | ) | const |
Whether this template argument is dependent on a template parameter.
Definition at line 243 of file TemplateBase.cpp.
References getDependence().
|
inline |
Determine whether this template argument has no value.
Definition at line 247 of file TemplateBase.h.
References getKind(), and Null.
Referenced by checkDeducedTemplateArguments(), clang::Sema::CheckTemplateArgument(), clang::Sema::DiagnoseUnexpandedParameterPack(), and clang::TemplateTemplateParmDecl::setDefaultArgument().
bool TemplateArgument::isPackExpansion | ( | ) | const |
Determine whether this template argument is a pack expansion.
Definition at line 247 of file TemplateBase.cpp.
References Declaration, Expression, getAsExpr(), getAsType(), getKind(), Integral, Null, NullPtr, Pack, Template, TemplateExpansion, and Type.
Referenced by getPackExpansionPattern(), clang::Sema::getTemplateArgumentPackExpansionPattern(), isSameAsPrimaryTemplate(), isSameTemplateArg(), and clang::Sema::isTemplateTemplateParameterAtLeastAsSpecializedAs().
|
inline |
Iterator referencing the first argument of a template argument pack.
Definition at line 351 of file TemplateBase.h.
References Args, getKind(), and Pack.
Referenced by checkDeducedTemplateArguments(), clang::ASTContext::getCanonicalTemplateArgument(), clang::ASTContext::getSubstTemplateTemplateParmPack(), clang::ASTNodeImporter::import(), isSameAsPrimaryTemplate(), isSameTemplateArg(), IsStructurallyEquivalent(), clang::Sema::isTemplateTemplateParameterAtLeastAsSpecializedAs(), pack_elements(), clang::RecursiveASTVisitor< CallGraph >::TraverseTemplateArgument(), and clang::RecursiveASTVisitor< CallGraph >::TraverseTemplateArgumentLoc().
|
inline |
Iterator range referencing all of the elements of a template argument pack.
Definition at line 365 of file TemplateBase.h.
References pack_begin(), and pack_end().
Referenced by addAssociatedClassesAndNamespaces(), addInstanceOfTransition(), clang::ODRHash::AddTemplateArgument(), getDependence(), clang::Sema::getFullyPackExpandedSize(), clang::ASTContext::getSubstTemplateTypeParmPackType(), hasTemplateArgumentForDeduction(), clang::SubstTemplateTypeParmPackType::Profile(), and clang::ASTNodeTraverser< ASTDumper, TextNodeDumper >::VisitPackTemplateArgument().
|
inline |
Iterator referencing one past the last argument of a template argument pack.
Definition at line 358 of file TemplateBase.h.
References Args, getKind(), and Pack.
Referenced by clang::ASTContext::getCanonicalTemplateArgument(), and pack_elements().
|
inline |
The number of template arguments in the given template argument pack.
Definition at line 371 of file TemplateBase.h.
References Args, getKind(), and Pack.
Referenced by clang::ODRHash::AddTemplateArgument(), checkDeducedTemplateArguments(), clang::ASTContext::getCanonicalTemplateArgument(), clang::Sema::getFullyPackExpandedSize(), clang::ASTContext::getSubstTemplateTemplateParmPack(), clang::ASTNodeImporter::import(), isSameAsPrimaryTemplate(), isSameTemplateArg(), IsStructurallyEquivalent(), clang::Sema::isTemplateTemplateParameterAtLeastAsSpecializedAs(), clang::SubstTemplateTypeParmPackType::Profile(), clang::RecursiveASTVisitor< CallGraph >::TraverseTemplateArgument(), and clang::RecursiveASTVisitor< CallGraph >::TraverseTemplateArgumentLoc().
void TemplateArgument::print | ( | const PrintingPolicy & | Policy, |
raw_ostream & | Out, | ||
bool | IncludeType | ||
) | const |
Print this template argument to the given output stream.
Definition at line 419 of file TemplateBase.cpp.
void TemplateArgument::Profile | ( | llvm::FoldingSetNodeID & | ID, |
const ASTContext & | Context | ||
) | const |
Used to insert TemplateArguments into FoldingSets.
Definition at line 307 of file TemplateBase.cpp.
|
inline |
Definition at line 331 of file TemplateBase.h.
References clang::QualType::getAsOpaquePtr(), getKind(), Integer, and Integral.
bool TemplateArgument::structurallyEquals | ( | const TemplateArgument & | Other | ) | const |
Determines whether two template arguments are superficially the same.
Definition at line 361 of file TemplateBase.cpp.
References Args, Declaration, Expression, getAsDecl(), getAsIntegral(), getIntegralType(), getKind(), Integral, Null, NullPtr, Pack, Template, TemplateArg, TemplateExpansion, Type, and TypeOrValue.
Referenced by getCanonicalTemplateArguments().
struct A clang::TemplateArgument::Args |
Definition at line 144 of file TemplateBase.h.
Referenced by getPackAsArray(), pack_begin(), pack_end(), pack_size(), structurallyEquals(), and TemplateArgument().
struct DA clang::TemplateArgument::DeclArg |
Definition at line 142 of file TemplateBase.h.
Referenced by getAsDecl(), getParamTypeForDecl(), and TemplateArgument().
struct I clang::TemplateArgument::Integer |
Definition at line 143 of file TemplateBase.h.
Referenced by getAsIntegral(), getIntegralType(), setIntegralType(), and TemplateArgument().
struct TA clang::TemplateArgument::TemplateArg |
Definition at line 145 of file TemplateBase.h.
Referenced by getAsTemplate(), getAsTemplateOrTemplatePattern(), getNumTemplateExpansions(), and structurallyEquals().
struct TV clang::TemplateArgument::TypeOrValue |
Definition at line 146 of file TemplateBase.h.
Referenced by getAsExpr(), getAsType(), getKind(), getNullPtrType(), structurallyEquals(), and TemplateArgument().