clang
9.0.0
|
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... | |
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) 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 50 of file TemplateBase.h.
using clang::TemplateArgument::pack_iterator = const TemplateArgument * |
Iterator that traverses the elements of a template argument pack.
Definition at line 335 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). Also used to represent a non-dependent __uuidof expression (a Microsoft extension). |
Pack | The template argument is actually a parameter pack. Arguments are stored in the Args struct. |
Definition at line 53 of file TemplateBase.h.
|
inline |
Construct an empty, invalid template argument.
Definition at line 141 of file TemplateBase.h.
Referenced by getPackExpansionPattern().
Construct a template type argument.
Definition at line 144 of file TemplateBase.h.
References clang::QualType::getAsOpaquePtr(), and Type.
Construct a template argument that refers to a declaration, which is either an external declaration or a template declaration.
Definition at line 152 of file TemplateBase.h.
References 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 86 of file TemplateBase.cpp.
References clang::ASTContext::Allocate(), clang::QualType::getAsOpaquePtr(), Integer, Integral, and memcpy().
|
inline |
Construct an integral constant template argument with the same value as Other but a different type.
Definition at line 165 of file TemplateBase.h.
References clang::QualType::getAsOpaquePtr(), Integer, and 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 178 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 195 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 209 of file TemplateBase.h.
|
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 218 of file TemplateBase.h.
|
delete |
bool TemplateArgument::containsUnexpandedParameterPack | ( | ) | const |
Whether this template argument contains an unexpanded parameter pack.
Definition at line 217 of file TemplateBase.cpp.
References Declaration, Expression, getAsExpr(), getAsTemplate(), getAsType(), getKind(), Integral, Null, NullPtr, P, Pack, pack_elements(), Template, TemplateExpansion, and Type.
Referenced by clang::Sema::DiagnoseUnexpandedParameterPack(), clang::Sema::getFullyPackExpandedSize(), and clang::TreeTransform< Derived >::TransformTemplateArguments().
|
static |
Create a new template argument pack by copying the given set of template arguments.
Definition at line 106 of file TemplateBase.cpp.
Referenced by clang::Sema::CheckTemplateArgumentList(), ConvertDeducedTemplateArgument(), and clang::ASTContext::getInjectedTemplateArg().
void TemplateArgument::dump | ( | raw_ostream & | Out | ) | const |
Debugging aid that dumps the template argument.
Definition at line 456 of file TemplateBase.cpp.
References print().
LLVM_DUMP_METHOD void TemplateArgument::dump | ( | ) | const |
Debugging aid that dumps the template argument to standard error.
Definition at line 463 of file TemplateBase.cpp.
|
inline |
Retrieve the declaration for a declaration non-type template argument.
Definition at line 263 of file TemplateBase.h.
References getKind().
Referenced by clang::ODRHash::AddTemplateArgument(), clang::ASTRecordWriter::AddTemplateArgument(), DecodeOperatorCall(), DeduceTemplateArguments(), clang::ASTContext::getCanonicalTemplateArgument(), clang::ASTNodeImporter::import(), isDependent(), isInstantiationDependent(), clang::operator<<(), print(), structurallyEquals(), clang::TextNodeDumper::VisitDeclarationTemplateArgument(), and clang::JSONNodeDumper::VisitDeclarationTemplateArgument().
|
inline |
Retrieve the template argument as an expression.
Definition at line 329 of file TemplateBase.h.
References getKind().
Referenced by clang::ODRHash::AddTemplateArgument(), clang::ASTRecordWriter::AddTemplateArgument(), clang::ASTRecordWriter::AddTemplateArgumentLoc(), CheckNonTypeTemplatePartialSpecializationArgs(), clang::Sema::CheckTemplateArgument(), containsUnexpandedParameterPack(), DecodeOperatorCall(), DeduceTemplateArguments(), clang::Sema::getFullyPackExpandedSize(), getNonTypeTemplateArgumentType(), getPackExpansionPattern(), clang::ASTNodeImporter::import(), isDependent(), isInstantiationDependent(), isPackExpansion(), MarkUsedTemplateParameters(), clang::operator<<(), print(), 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 300 of file TemplateBase.h.
References getKind(), and Integer.
Referenced by clang::ASTRecordWriter::AddTemplateArgument(), DecodeOperatorCall(), DeduceTemplateArguments(), clang::operator<<(), printIntegral(), structurallyEquals(), clang::TextNodeDumper::VisitIntegralTemplateArgument(), and clang::JSONNodeDumper::VisitIntegralTemplateArgument().
|
inline |
Retrieve the template name for a template name argument.
Definition at line 280 of file TemplateBase.h.
References getKind().
Referenced by containsUnexpandedParameterPack(), DeduceTemplateArguments(), clang::ASTContext::getCanonicalTemplateArgument(), clang::Sema::getFullyPackExpandedSize(), clang::TypeName::getFullyQualifiedTemplateArgument(), clang::ASTNodeImporter::import(), isDependent(), isInstantiationDependent(), clang::operator<<(), print(), 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 287 of file TemplateBase.h.
References getKind().
Referenced by addAssociatedClassesAndNamespaces(), clang::ODRHash::AddTemplateArgument(), clang::ASTRecordWriter::AddTemplateArgument(), clang::Sema::CheckTemplateArgument(), DecodeOperatorCall(), clang::ASTContext::getCanonicalTemplateArgument(), getPackExpansionPattern(), clang::ASTNodeImporter::import(), MarkUsedTemplateParameters(), clang::operator<<(), print(), clang::RecursiveASTVisitor< CallGraph >::TraverseTemplateArgument(), clang::RecursiveASTVisitor< CallGraph >::TraverseTemplateArgumentLoc(), and clang::TextNodeDumper::VisitTemplateExpansionTemplateArgument().
|
inline |
Retrieve the type for a type template argument.
Definition at line 256 of file TemplateBase.h.
References getKind().
Referenced by addAssociatedClassesAndNamespaces(), clang::ODRHash::AddTemplateArgument(), clang::ASTRecordWriter::AddTemplateArgument(), clang::Sema::CheckTemplateTypeArgument(), containsUnexpandedParameterPack(), DecodeOperatorCall(), DeduceTemplateArguments(), clang::ASTContext::getCanonicalTemplateArgument(), clang::Sema::getFullyPackExpandedSize(), clang::TypeName::getFullyQualifiedTemplateArgument(), getPackExpansionPattern(), clang::ASTNodeImporter::import(), clang::TemplateSpecializationTypeLoc::initializeArgLocs(), clang::TreeTransform< Derived >::InventTemplateArgumentLoc(), isDependent(), isInstantiationDependent(), isPackExpansion(), clang::Sema::isStdInitializerList(), MarkUsedTemplateParameters(), clang::operator<<(), print(), clang::TreeTransform< Derived >::TransformTemplateArgument(), clang::RecursiveASTVisitor< CallGraph >::TraverseTemplateArgument(), clang::RecursiveASTVisitor< CallGraph >::TraverseTemplateArgumentLoc(), TryDeconstructFunctionLike(), clang::TextNodeDumper::VisitTypeTemplateArgument(), and clang::JSONNodeDumper::VisitTypeTemplateArgument().
|
inlinestatic |
Definition at line 226 of file TemplateBase.h.
References None.
|
inline |
Retrieve the type of the integral value.
Definition at line 314 of file TemplateBase.h.
References getKind(), and Integer.
Referenced by clang::ASTRecordWriter::AddTemplateArgument(), clang::Sema::BuildExpressionFromIntegralTemplateArgument(), DecodeOperatorCall(), DeduceTemplateArguments(), clang::ASTContext::getCanonicalTemplateArgument(), getNonTypeTemplateArgumentType(), clang::ASTNodeImporter::import(), printIntegral(), and structurallyEquals().
|
inline |
Return the kind of stored template argument.
Definition at line 234 of file TemplateBase.h.
Referenced by addAssociatedClassesAndNamespaces(), clang::ODRHash::AddTemplateArgument(), clang::ASTRecordWriter::AddTemplateArgument(), clang::ASTRecordWriter::AddTemplateArgumentLoc(), clang::Sema::BuildExpressionFromIntegralTemplateArgument(), clang::Sema::CheckTemplateArgument(), clang::Sema::CheckTemplateTypeArgument(), containsUnexpandedParameterPack(), ConvertDeducedTemplateArgument(), DecodeOperatorCall(), DeduceTemplateArguments(), describeTemplateParameter(), clang::ASTContext::getCanonicalTemplateArgument(), clang::Sema::getFullyPackExpandedSize(), clang::TypeName::getFullyQualifiedTemplateArgument(), clang::comments::getFunctionTypeLoc(), clang::TemplateArgumentLoc::getLocation(), getNonTypeTemplateArgumentType(), getNumTemplateExpansions(), getPackExpansionPattern(), clang::TemplateArgumentLoc::getSourceDeclExpression(), clang::TemplateArgumentLoc::getSourceExpression(), clang::TemplateArgumentLoc::getSourceIntegralExpression(), clang::TemplateArgumentLoc::getSourceNullPtrExpression(), clang::Sema::getTemplateArgumentPackExpansionPattern(), clang::TemplateArgumentLoc::getTemplateEllipsisLoc(), clang::TemplateArgumentLoc::getTemplateNameLoc(), clang::TemplateArgumentLoc::getTemplateQualifierLoc(), clang::Sema::getTrivialTemplateArgumentLoc(), clang::TemplateArgumentLoc::getTypeSourceInfo(), hasTemplateArgumentForDeduction(), clang::ASTNodeImporter::import(), clang::TreeTransform< Derived >::InventTemplateArgumentLoc(), isDependent(), isEnableIf(), isInstantiationDependent(), isPackExpansion(), isSameAsPrimaryTemplate(), MarkUsedTemplateParameters(), clang::operator<<(), print(), clang::TreeTransform< Derived >::RebuildPackExpansion(), structurallyEquals(), clang::TemplateArgumentLoc::TemplateArgumentLoc(), clang::TreeTransform< Derived >::TransformTemplateArgument(), clang::TreeTransform< Derived >::TransformTemplateArguments(), clang::RecursiveASTVisitor< CallGraph >::TraverseTemplateArgument(), clang::RecursiveASTVisitor< CallGraph >::TraverseTemplateArgumentLoc(), TryDeconstructFunctionLike(), clang::templateargumentvisitor::Base< std::add_lvalue_reference, ImplClass, RetTy, ParamTys... >::Visit(), and clang::TypeLocReader::VisitFunctionTypeLoc().
QualType TemplateArgument::getNonTypeTemplateArgumentType | ( | ) | const |
If this is a non-type template argument, get its type.
Otherwise, returns a null QualType.
Definition at line 260 of file TemplateBase.cpp.
References Declaration, Expression, getAsExpr(), getIntegralType(), getKind(), getNullPtrType(), getParamTypeForDecl(), clang::Expr::getType(), Integral, Null, NullPtr, Pack, Template, TemplateExpansion, and Type.
|
inline |
Retrieve the type for null non-type template argument.
Definition at line 274 of file TemplateBase.h.
References getKind().
Referenced by clang::ASTRecordWriter::AddTemplateArgument(), DecodeOperatorCall(), DeduceTemplateArguments(), clang::ASTContext::getCanonicalTemplateArgument(), getNonTypeTemplateArgumentType(), clang::ASTNodeImporter::import(), and MarkUsedTemplateParameters().
Optional< unsigned > TemplateArgument::getNumTemplateExpansions | ( | ) | const |
Retrieve the number of expansions that a template template argument expansion will produce, if known.
Definition at line 252 of file TemplateBase.cpp.
References getKind(), clang::None, TemplateArg, and TemplateExpansion.
Referenced by clang::ASTRecordWriter::AddTemplateArgument(), clang::ASTContext::getCanonicalTemplateArgument(), and clang::ASTNodeImporter::import().
|
inline |
Return the array of arguments in this template argument pack.
Definition at line 365 of file TemplateBase.h.
References dump(), and getKind().
Referenced by describeTemplateParameter().
TemplateArgument TemplateArgument::getPackExpansionPattern | ( | ) | const |
When the template argument is a pack expansion, returns the pattern of the pack expansion.
Definition at line 368 of file TemplateBase.cpp.
References Declaration, Expression, clang::Type::getAs(), getAsExpr(), getAsTemplateOrTemplatePattern(), getAsType(), getKind(), Integral, isPackExpansion(), Null, NullPtr, Pack, Template, TemplateArgument(), TemplateExpansion, and Type.
Referenced by DeduceTemplateArguments(), and isSameAsPrimaryTemplate().
|
inline |
Definition at line 268 of file TemplateBase.h.
References getKind().
Referenced by clang::ASTRecordWriter::AddTemplateArgument(), DeduceTemplateArguments(), clang::ASTContext::getCanonicalTemplateArgument(), getNonTypeTemplateArgumentType(), 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 114 of file TemplateBase.cpp.
References Declaration, Expression, getAsDecl(), getAsExpr(), getAsTemplate(), getAsType(), clang::Decl::getDeclContext(), getKind(), Integral, clang::TemplateName::isDependent(), clang::DeclContext::isDependentContext(), clang::Type::isDependentType(), Null, NullPtr, P, Pack, pack_elements(), Template, TemplateExpansion, and Type.
bool TemplateArgument::isInstantiationDependent | ( | ) | const |
Whether this template argument is dependent on a template parameter.
Definition at line 155 of file TemplateBase.cpp.
References Declaration, Expression, getAsDecl(), getAsExpr(), getAsTemplate(), getAsType(), clang::Decl::getDeclContext(), getKind(), Integral, clang::DeclContext::isDependentContext(), clang::Expr::isInstantiationDependent(), clang::TemplateName::isInstantiationDependent(), clang::Type::isInstantiationDependentType(), Null, NullPtr, P, Pack, pack_elements(), Template, TemplateExpansion, and Type.
|
inline |
Determine whether this template argument has no value.
Definition at line 237 of file TemplateBase.h.
References getKind().
Referenced by clang::Sema::DiagnoseUnexpandedParameterPack(), clang::TemplateTemplateParmDecl::setDefaultArgument(), and clang::TreeTransform< Derived >::TransformTemplateArguments().
bool TemplateArgument::isPackExpansion | ( | ) | const |
Determine whether this template argument is a pack expansion.
Definition at line 194 of file TemplateBase.cpp.
References Declaration, Expression, getAsExpr(), getAsType(), getKind(), Integral, Null, NullPtr, Pack, Template, TemplateExpansion, and Type.
Referenced by DeduceTemplateArguments(), getPackExpansionPattern(), clang::Sema::getTemplateArgumentPackExpansionPattern(), isSameAsPrimaryTemplate(), and clang::TreeTransform< Derived >::TransformTemplateArguments().
|
inline |
Iterator referencing the first argument of a template argument pack.
Definition at line 339 of file TemplateBase.h.
References getKind().
Referenced by clang::ASTContext::getCanonicalTemplateArgument(), clang::TemplateTypeParmType::getIdentifier(), clang::ASTContext::getSubstTemplateTemplateParmPack(), clang::ASTNodeImporter::import(), isSameAsPrimaryTemplate(), clang::TreeTransform< Derived >::TransformTemplateArguments(), 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 353 of file TemplateBase.h.
Referenced by addAssociatedClassesAndNamespaces(), clang::ODRHash::AddTemplateArgument(), clang::ASTRecordWriter::AddTemplateArgument(), containsUnexpandedParameterPack(), ConvertDeducedTemplateArgument(), DecodeOperatorCall(), clang::Sema::getFullyPackExpandedSize(), clang::ASTContext::getSubstTemplateTypeParmPackType(), hasTemplateArgumentForDeduction(), isDependent(), isInstantiationDependent(), MarkUsedTemplateParameters(), print(), 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 346 of file TemplateBase.h.
References getKind().
Referenced by clang::ASTContext::getCanonicalTemplateArgument(), and clang::TreeTransform< Derived >::TransformTemplateArguments().
|
inline |
The number of template arguments in the given template argument pack.
Definition at line 359 of file TemplateBase.h.
References getKind().
Referenced by clang::ODRHash::AddTemplateArgument(), clang::ASTRecordWriter::AddTemplateArgument(), clang::ASTContext::getCanonicalTemplateArgument(), clang::TemplateTypeParmType::getIdentifier(), clang::ASTContext::getSubstTemplateTemplateParmPack(), clang::ASTNodeImporter::import(), isSameAsPrimaryTemplate(), clang::SubstTemplateTypeParmPackType::Profile(), clang::RecursiveASTVisitor< CallGraph >::TraverseTemplateArgument(), and clang::RecursiveASTVisitor< CallGraph >::TraverseTemplateArgumentLoc().
void TemplateArgument::print | ( | const PrintingPolicy & | Policy, |
raw_ostream & | Out | ||
) | const |
Print this template argument to the given output stream.
Definition at line 393 of file TemplateBase.cpp.
References Declaration, Expression, clang::First, getAsDecl(), getAsExpr(), getAsTemplate(), getAsTemplateOrTemplatePattern(), getAsType(), clang::NamedDecl::getDeclName(), getKind(), Integral, Null, NullPtr, P, Pack, pack_elements(), clang::TemplateName::print(), clang::QualType::print(), printIntegral(), clang::Stmt::printPretty(), clang::NamedDecl::printQualifiedName(), clang::PrintingPolicy::SuppressStrongLifetime, Template, TemplateExpansion, and Type.
Referenced by describeTemplateParameter(), dump(), clang::Sema::getTemplateArgumentBindingsText(), and clang::operator<<().
void TemplateArgument::Profile | ( | llvm::FoldingSetNodeID & | ID, |
const ASTContext & | Context | ||
) | const |
Used to insert TemplateArguments into FoldingSets.
Definition at line 285 of file TemplateBase.cpp.
|
inline |
Definition at line 319 of file TemplateBase.h.
References clang::QualType::getAsOpaquePtr(), getKind(), and Integer.
bool TemplateArgument::structurallyEquals | ( | const TemplateArgument & | Other | ) | const |
Determines whether two template arguments are superficially the same.
Definition at line 338 of file TemplateBase.cpp.
References Args, Declaration, Expression, getAsDecl(), getAsIntegral(), getIntegralType(), getKind(), Integral, Null, NullPtr, Pack, Template, TemplateExpansion, Type, and TypeOrValue.
struct A clang::TemplateArgument::Args |
Definition at line 134 of file TemplateBase.h.
Referenced by structurallyEquals().
struct DA clang::TemplateArgument::DeclArg |
Definition at line 132 of file TemplateBase.h.
struct I clang::TemplateArgument::Integer |
Definition at line 133 of file TemplateBase.h.
Referenced by TemplateArgument().
struct TA clang::TemplateArgument::TemplateArg |
Definition at line 135 of file TemplateBase.h.
Referenced by getNumTemplateExpansions().
struct TV clang::TemplateArgument::TypeOrValue |
Definition at line 136 of file TemplateBase.h.
Referenced by structurallyEquals().