clang
3.9.0
|
Represents a template argument. More...
#include <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... | |
typedef const TemplateArgument * | pack_iterator |
Iterator that traverses the elements of a template argument pack. More... | |
Public Member Functions | |
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... | |
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) |
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... | |
llvm::iterator_range < pack_iterator > | 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 40 of file TemplateBase.h.
typedef const TemplateArgument* clang::TemplateArgument::pack_iterator |
Iterator that traverses the elements of a template argument pack.
Definition at line 311 of file TemplateBase.h.
The kind of template argument we're storing.
Definition at line 43 of file TemplateBase.h.
|
inline |
Construct an empty, invalid template argument.
Definition at line 122 of file TemplateBase.h.
References Null, and TypeOrValue.
Referenced by CreatePackCopy(), getEmptyPack(), and getPackExpansionPattern().
Construct a template type argument.
Definition at line 128 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 136 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 72 of file TemplateBase.cpp.
References clang::ASTContext::Allocate(), clang::QualType::getAsOpaquePtr(), Integer, and Integral.
|
inline |
Construct an integral constant template argument with the same value as Other but a different type.
Definition at line 149 of file TemplateBase.h.
References clang::QualType::getAsOpaquePtr(), 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 162 of file TemplateBase.h.
References clang::TemplateName::getAsVoidPointer(), Template, and TemplateArg.
|
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 179 of file TemplateBase.h.
References clang::TemplateName::getAsVoidPointer(), TemplateArg, and TemplateExpansion.
|
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 193 of file TemplateBase.h.
References E, 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 202 of file TemplateBase.h.
References Pack.
bool TemplateArgument::containsUnexpandedParameterPack | ( | ) | const |
Whether this template argument contains an unexpanded parameter pack.
Definition at line 203 of file TemplateBase.cpp.
References Declaration, Expression, getAsExpr(), getAsTemplate(), getAsType(), getKind(), Integral, Null, NullPtr, P, Pack, pack_elements(), Template, and TemplateExpansion.
Referenced by clang::Sema::DiagnoseUnexpandedParameterPack(), and clang::TreeTransform< Derived >::TransformTemplateArguments().
|
static |
Create a new template argument pack by copying the given set of template arguments.
Definition at line 92 of file TemplateBase.cpp.
References getEmptyPack(), and TemplateArgument().
Referenced by clang::Sema::CheckTemplateArgumentList(), ConvertDeducedTemplateArgument(), and GenerateInjectedTemplateArgs().
void TemplateArgument::dump | ( | raw_ostream & | Out | ) | const |
Debugging aid that dumps the template argument.
Definition at line 418 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 425 of file TemplateBase.cpp.
|
inline |
Retrieve the declaration for a declaration non-type template argument.
Definition at line 245 of file TemplateBase.h.
References Declaration, DeclArg, and getKind().
Referenced by clang::ASTRecordWriter::AddTemplateArgument(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), checkDeducedTemplateArguments(), DeduceTemplateArguments(), clang::ASTContext::getCanonicalTemplateArgument(), clang::ASTNodeImporter::ImportTemplateArgument(), isDependent(), isInstantiationDependent(), isSameTemplateArg(), IsStructurallyEquivalent(), clang::operator<<(), print(), Profile(), and structurallyEquals().
|
inline |
Retrieve the template argument as an expression.
Definition at line 305 of file TemplateBase.h.
References Expression, getKind(), and TypeOrValue.
Referenced by clang::ASTRecordWriter::AddTemplateArgument(), clang::ASTRecordWriter::AddTemplateArgumentLoc(), checkDeducedTemplateArguments(), CheckNonTypeTemplatePartialSpecializationArgs(), clang::Sema::CheckTemplateArgument(), clang::Sema::CheckTemplateTypeArgument(), containsUnexpandedParameterPack(), DeduceTemplateArguments(), getPackExpansionPattern(), clang::Sema::getTemplateArgumentPackExpansionPattern(), getTrivialTemplateArgumentLoc(), clang::ASTNodeImporter::ImportTemplateArgument(), clang::TreeTransform< Derived >::InventTemplateArgumentLoc(), isDependent(), isInstantiationDependent(), isPackExpansion(), isSameTemplateArg(), IsStructurallyEquivalent(), isTemplateArgumentTemplateParameter(), MarkUsedTemplateParameters(), clang::operator<<(), print(), Profile(), clang::ASTReader::ReadTemplateArgumentLoc(), clang::TreeTransform< Derived >::TransformTemplateArgument(), and clang::RecursiveASTVisitor< Derived >::TraverseTemplateArgument().
|
inline |
Retrieve the template argument as an integral value.
Definition at line 282 of file TemplateBase.h.
References getKind(), Integer, and Integral.
Referenced by clang::ASTRecordWriter::AddTemplateArgument(), clang::Sema::BuildExpressionFromIntegralTemplateArgument(), checkBuiltinTemplateIdType(), checkDeducedTemplateArguments(), DeduceTemplateArguments(), isSameTemplateArg(), IsStructurallyEquivalent(), clang::operator<<(), printIntegral(), Profile(), and structurallyEquals().
|
inline |
Retrieve the template name for a template name argument.
Definition at line 262 of file TemplateBase.h.
References clang::TemplateName::getFromVoidPointer(), getKind(), Template, and TemplateArg.
Referenced by clang::Sema::ActOnTemplateTemplateParameter(), checkDeducedTemplateArguments(), clang::Sema::CheckTemplateTypeArgument(), containsUnexpandedParameterPack(), DeduceTemplateArguments(), DiagnoseBadDeduction(), clang::ASTContext::getCanonicalTemplateArgument(), clang::TypeName::getFullyQualifiedTemplateArgument(), getTrivialTemplateArgumentLoc(), clang::ASTNodeImporter::ImportTemplateArgument(), isDependent(), isInstantiationDependent(), IsStructurallyEquivalent(), clang::operator<<(), print(), clang::TreeTransform< Derived >::RebuildPackExpansion(), SubstDefaultTemplateArgument(), and clang::TreeTransform< Derived >::TransformTemplateArgument().
|
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 269 of file TemplateBase.h.
References clang::TemplateName::getFromVoidPointer(), getKind(), Template, TemplateArg, and TemplateExpansion.
Referenced by addAssociatedClassesAndNamespaces(), clang::ASTRecordWriter::AddTemplateArgument(), checkDeducedTemplateArguments(), clang::Sema::CheckTemplateArgument(), clang::ASTContext::getCanonicalTemplateArgument(), getPackExpansionPattern(), clang::ASTNodeImporter::ImportTemplateArgument(), clang::TemplateSpecializationTypeLoc::initializeArgLocs(), clang::TreeTransform< Derived >::InventTemplateArgumentLoc(), isSameTemplateArg(), IsStructurallyEquivalent(), isTemplateArgumentTemplateParameter(), MarkUsedTemplateParameters(), clang::operator<<(), print(), Profile(), clang::RecursiveASTVisitor< Derived >::TraverseTemplateArgument(), and clang::RecursiveASTVisitor< Derived >::TraverseTemplateArgumentLoc().
|
inline |
Retrieve the type for a type template argument.
Definition at line 238 of file TemplateBase.h.
References clang::QualType::getFromOpaquePtr(), getKind(), and TypeOrValue.
Referenced by addAssociatedClassesAndNamespaces(), clang::ASTRecordWriter::AddTemplateArgument(), checkDeducedTemplateArguments(), clang::Sema::CheckTemplateArgument(), clang::Sema::CheckTemplateTypeArgument(), containsUnexpandedParameterPack(), DeduceTemplateArguments(), Desugar(), DiagnoseBadDeduction(), clang::ASTContext::getCanonicalTemplateArgument(), clang::TypeName::getFullyQualifiedTemplateArgument(), getPackExpansionPattern(), clang::Sema::getTemplateArgumentPackExpansionPattern(), getTrivialTemplateArgumentLoc(), clang::ASTNodeImporter::ImportTemplateArgument(), clang::TemplateSpecializationTypeLoc::initializeArgLocs(), clang::TreeTransform< Derived >::InventTemplateArgumentLoc(), isDependent(), isInstantiationDependent(), isPackExpansion(), isSameTemplateArg(), clang::Sema::isStdInitializerList(), IsStructurallyEquivalent(), isTemplateArgumentTemplateParameter(), MarkUsedTemplateParameters(), clang::operator<<(), print(), Profile(), clang::TreeTransform< Derived >::TransformTemplateArgument(), clang::RecursiveASTVisitor< Derived >::TraverseTemplateArgument(), and clang::RecursiveASTVisitor< Derived >::TraverseTemplateArgumentLoc().
|
inlinestatic |
Definition at line 208 of file TemplateBase.h.
References clang::None, and TemplateArgument().
Referenced by CreatePackCopy(), and clang::Sema::FinishTemplateArgumentDeduction().
|
inline |
Retrieve the type of the integral value.
Definition at line 294 of file TemplateBase.h.
References clang::QualType::getFromOpaquePtr(), getKind(), Integer, and Integral.
Referenced by clang::ASTRecordWriter::AddTemplateArgument(), clang::Sema::BuildExpressionFromIntegralTemplateArgument(), checkBuiltinTemplateIdType(), DeduceTemplateArguments(), clang::ASTContext::getCanonicalTemplateArgument(), clang::ASTNodeImporter::ImportTemplateArgument(), IsStructurallyEquivalent(), printIntegral(), Profile(), and structurallyEquals().
|
inline |
Return the kind of stored template argument.
Definition at line 216 of file TemplateBase.h.
References TypeOrValue.
Referenced by addAssociatedClassesAndNamespaces(), clang::ASTRecordWriter::AddTemplateArgument(), clang::ASTRecordWriter::AddTemplateArgumentLoc(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), clang::Sema::BuildExpressionFromIntegralTemplateArgument(), checkDeducedTemplateArguments(), clang::Sema::CheckTemplateArgument(), clang::Sema::CheckTemplateTypeArgument(), containsUnexpandedParameterPack(), ConvertDeducedTemplateArgument(), DeduceTemplateArguments(), Desugar(), DiagnoseBadDeduction(), clang::comments::DeclInfo::fill(), getAsDecl(), getAsExpr(), getAsIntegral(), getAsTemplate(), getAsTemplateOrTemplatePattern(), getAsType(), clang::ASTContext::getCanonicalTemplateArgument(), clang::TypeName::getFullyQualifiedTemplateArgument(), getIntegralType(), clang::TemplateArgumentLoc::getLocation(), 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(), getTrivialTemplateArgumentLoc(), clang::TemplateArgumentLoc::getTypeSourceInfo(), hasTemplateArgumentForDeduction(), clang::ASTNodeImporter::ImportTemplateArgument(), clang::TemplateSpecializationTypeLoc::initializeArgLocs(), clang::TreeTransform< Derived >::InventTemplateArgumentLoc(), isDependent(), isInstantiationDependent(), isNull(), isPackExpansion(), isSameAsPrimaryTemplate(), isSameTemplateArg(), IsStructurallyEquivalent(), isTemplateArgumentTemplateParameter(), MarkUsedTemplateParameters(), clang::operator<<(), pack_begin(), pack_end(), pack_size(), print(), Profile(), clang::ASTReader::ReadTemplateArgumentLoc(), clang::ASTReader::ReadTemplateName(), clang::TreeTransform< Derived >::RebuildPackExpansion(), setIntegralType(), structurallyEquals(), clang::Sema::SubstituteExplicitTemplateArguments(), clang::TemplateArgumentLoc::TemplateArgumentLoc(), clang::TreeTransform< Derived >::TransformTemplateArgument(), clang::TreeTransform< Derived >::TransformTemplateArguments(), clang::RecursiveASTVisitor< Derived >::TraverseTemplateArgument(), and clang::RecursiveASTVisitor< Derived >::TraverseTemplateArgumentLoc().
|
inline |
Retrieve the type for null non-type template argument.
Definition at line 256 of file TemplateBase.h.
References clang::QualType::getFromOpaquePtr(), getKind(), NullPtr, and TypeOrValue.
Referenced by clang::ASTRecordWriter::AddTemplateArgument(), checkDeducedTemplateArguments(), DeduceTemplateArguments(), clang::ASTContext::getCanonicalTemplateArgument(), clang::ASTNodeImporter::ImportTemplateArgument(), isSameTemplateArg(), MarkUsedTemplateParameters(), and Profile().
Retrieve the number of expansions that a template template argument expansion will produce, if known.
Definition at line 238 of file TemplateBase.cpp.
References getKind(), clang::None, TemplateArg, and TemplateExpansion.
Referenced by clang::ASTRecordWriter::AddTemplateArgument(), clang::ASTContext::getCanonicalTemplateArgument(), clang::Sema::getTemplateArgumentPackExpansionPattern(), and clang::ASTNodeImporter::ImportTemplateArgument().
|
inline |
Return the array of arguments in this template argument pack.
Definition at line 341 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 329 of file TemplateBase.cpp.
References Declaration, Expression, clang::Type::getAs(), getAsExpr(), getAsTemplateOrTemplatePattern(), getAsType(), getKind(), Integral, isPackExpansion(), Null, NullPtr, Pack, Template, TemplateArgument(), and TemplateExpansion.
Referenced by DeduceTemplateArguments(), getPackSubstitutedTemplateArgument(), clang::Sema::getTemplateArgumentPackExpansionPattern(), and isSameAsPrimaryTemplate().
|
inline |
Definition at line 250 of file TemplateBase.h.
References Declaration, DeclArg, clang::QualType::getFromOpaquePtr(), and getKind().
Referenced by clang::ASTRecordWriter::AddTemplateArgument(), clang::ASTContext::getCanonicalTemplateArgument(), and clang::ASTNodeImporter::ImportTemplateArgument().
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 100 of file TemplateBase.cpp.
References Declaration, Expression, getAsDecl(), getAsExpr(), getAsTemplate(), getAsType(), getKind(), Integral, clang::TemplateName::isDependent(), clang::Type::isDependentType(), Null, NullPtr, P, Pack, pack_elements(), Template, and TemplateExpansion.
bool TemplateArgument::isInstantiationDependent | ( | ) | const |
Whether this template argument is dependent on a template parameter.
Definition at line 141 of file TemplateBase.cpp.
References Declaration, Expression, getAsDecl(), getAsExpr(), getAsTemplate(), getAsType(), getKind(), Integral, clang::Expr::isInstantiationDependent(), clang::TemplateName::isInstantiationDependent(), clang::Type::isInstantiationDependentType(), Null, NullPtr, P, Pack, pack_elements(), Template, and TemplateExpansion.
|
inline |
Determine whether this template argument has no value.
Definition at line 219 of file TemplateBase.h.
References getKind(), and Null.
Referenced by checkDeducedTemplateArguments(), DeduceNonTypeTemplateArgument(), DeduceTemplateArgumentsByTypeMatch(), clang::Sema::DiagnoseUnexpandedParameterPack(), clang::Sema::FinishTemplateArgumentDeduction(), clang::ASTImporter::Import(), clang::ASTNodeImporter::ImportTemplateArguments(), clang::TemplateTemplateParmDecl::setDefaultArgument(), and clang::TreeTransform< Derived >::TransformTemplateArguments().
bool TemplateArgument::isPackExpansion | ( | ) | const |
Determine whether this template argument is a pack expansion.
Definition at line 180 of file TemplateBase.cpp.
References Declaration, Expression, getAsExpr(), getAsType(), getKind(), Integral, Null, NullPtr, Pack, Template, and TemplateExpansion.
Referenced by DeduceTemplateArguments(), getPackExpansionPattern(), clang::Sema::getTemplateArgumentPackExpansionPattern(), hasPackExpansionBeforeEnd(), isSameAsPrimaryTemplate(), and clang::TreeTransform< Derived >::TransformTemplateArguments().
|
inline |
Iterator referencing the first argument of a template argument pack.
Definition at line 315 of file TemplateBase.h.
References Args, getKind(), and Pack.
Referenced by checkDeducedTemplateArguments(), clang::ASTContext::getCanonicalTemplateArgument(), getPackSubstitutedTemplateArgument(), clang::ASTContext::getSubstTemplateTemplateParmPack(), hasPackExpansionBeforeEnd(), hasTemplateArgumentForDeduction(), clang::ASTNodeImporter::ImportTemplateArgument(), isSameAsPrimaryTemplate(), isSameTemplateArg(), IsStructurallyEquivalent(), pack_elements(), clang::Sema::SubstituteExplicitTemplateArguments(), clang::TreeTransform< Derived >::TransformTemplateArguments(), clang::RecursiveASTVisitor< Derived >::TraverseTemplateArgument(), and clang::RecursiveASTVisitor< Derived >::TraverseTemplateArgumentLoc().
|
inline |
Iterator range referencing all of the elements of a template argument pack.
Definition at line 329 of file TemplateBase.h.
References pack_begin(), and pack_end().
Referenced by addAssociatedClassesAndNamespaces(), clang::ASTRecordWriter::AddTemplateArgument(), containsUnexpandedParameterPack(), ConvertDeducedTemplateArgument(), clang::ASTContext::getSubstTemplateTypeParmPackType(), isDependent(), isInstantiationDependent(), MarkUsedTemplateParameters(), print(), and clang::SubstTemplateTypeParmPackType::Profile().
|
inline |
Iterator referencing one past the last argument of a template argument pack.
Definition at line 322 of file TemplateBase.h.
References Args, getKind(), and Pack.
Referenced by checkDeducedTemplateArguments(), clang::ASTContext::getCanonicalTemplateArgument(), isSameTemplateArg(), pack_elements(), and clang::TreeTransform< Derived >::TransformTemplateArguments().
|
inline |
The number of template arguments in the given template argument pack.
Definition at line 335 of file TemplateBase.h.
References Args, getKind(), and Pack.
Referenced by clang::ASTRecordWriter::AddTemplateArgument(), checkDeducedTemplateArguments(), clang::ASTContext::getCanonicalTemplateArgument(), getPackSubstitutedTemplateArgument(), clang::ASTContext::getSubstTemplateTemplateParmPack(), hasPackExpansionBeforeEnd(), hasTemplateArgumentForDeduction(), clang::ASTNodeImporter::ImportTemplateArgument(), isSameAsPrimaryTemplate(), isSameTemplateArg(), IsStructurallyEquivalent(), clang::SubstTemplateTypeParmPackType::Profile(), clang::Sema::SubstituteExplicitTemplateArguments(), clang::RecursiveASTVisitor< Derived >::TraverseTemplateArgument(), and clang::RecursiveASTVisitor< Derived >::TraverseTemplateArgumentLoc().
void TemplateArgument::print | ( | const PrintingPolicy & | Policy, |
raw_ostream & | Out | ||
) | const |
Print this template argument to the given output stream.
Definition at line 354 of file TemplateBase.cpp.
References Declaration, Expression, getAsDecl(), getAsExpr(), getAsTemplate(), getAsTemplateOrTemplatePattern(), getAsType(), clang::NamedDecl::getDeclName(), getKind(), Integral, Null, NullPtr, P, Pack, pack_elements(), clang::TemplateName::print(), clang::QualType::print(), printIntegral(), clang::NamedDecl::printQualifiedName(), clang::PrintingPolicy::SuppressStrongLifetime, Template, and TemplateExpansion.
Referenced by clang::PredefinedExpr::ComputeName(), 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 246 of file TemplateBase.cpp.
References Args, Declaration, Expression, getAsDecl(), getAsExpr(), getAsIntegral(), clang::TemplateName::getAsTemplateDecl(), getAsTemplateOrTemplatePattern(), getAsType(), clang::TemplateName::getAsVoidPointer(), getCanonicalDecl(), clang::ASTContext::getCanonicalTemplateName(), getIntegralType(), getKind(), getNullPtrType(), I, Integral, Null, NullPtr, Pack, clang::QualType::Profile(), Template, and TemplateExpansion.
Referenced by clang::SubstTemplateTemplateParmPackStorage::Profile().
|
inline |
Definition at line 299 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 299 of file TemplateBase.cpp.
References Args, Declaration, E, Expression, getAsDecl(), getAsIntegral(), getIntegralType(), getKind(), I, Integral, Null, NullPtr, Pack, Template, TemplateExpansion, and TypeOrValue.
struct A clang::TemplateArgument::Args |
Definition at line 113 of file TemplateBase.h.
Referenced by getPackAsArray(), pack_begin(), pack_end(), pack_size(), Profile(), and structurallyEquals().
struct DA clang::TemplateArgument::DeclArg |
Definition at line 111 of file TemplateBase.h.
Referenced by getAsDecl(), getParamTypeForDecl(), and TemplateArgument().
struct I clang::TemplateArgument::Integer |
Definition at line 112 of file TemplateBase.h.
Referenced by getAsIntegral(), getIntegralType(), setIntegralType(), and TemplateArgument().
struct TA clang::TemplateArgument::TemplateArg |
Definition at line 114 of file TemplateBase.h.
Referenced by getAsTemplate(), getAsTemplateOrTemplatePattern(), getNumTemplateExpansions(), and TemplateArgument().
struct TV clang::TemplateArgument::TypeOrValue |
Definition at line 115 of file TemplateBase.h.
Referenced by getAsExpr(), getAsType(), getKind(), getNullPtrType(), structurallyEquals(), and TemplateArgument().