|
clang
5.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... | |
| typedef const TemplateArgument * | pack_iterator |
| Iterator that traverses the elements of a template argument pack. More... | |
Public Member Functions | |
| constexpr | TemplateArgument () |
| Construct an empty, invalid 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) |
| 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 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 312 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 43 of file TemplateBase.h.
|
inline |
Construct an empty, invalid template argument.
Definition at line 122 of file TemplateBase.h.
References Null.
Referenced by CreatePackCopy(), getEmptyPack(), and getPackExpansionPattern().
|
inline |
Construct an integral constant template argument with the same value as Other but a different type.
Definition at line 146 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 159 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 176 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 190 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 199 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(), 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 92 of file TemplateBase.cpp.
References getEmptyPack(), and TemplateArgument().
Referenced by checkDeducedTemplateArguments(), 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 443 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 450 of file TemplateBase.cpp.
|
inline |
Retrieve the declaration for a declaration non-type template argument.
Definition at line 242 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(), clang::operator<<(), print(), Profile(), and structurallyEquals().
|
inline |
Retrieve the template argument as an expression.
Definition at line 306 of file TemplateBase.h.
References Expression, getKind(), and TypeOrValue.
Referenced by clang::ODRHash::AddTemplateArgument(), clang::ASTRecordWriter::AddTemplateArgument(), clang::ASTRecordWriter::AddTemplateArgumentLoc(), checkDeducedTemplateArguments(), CheckNonTypeTemplatePartialSpecializationArgs(), clang::Sema::CheckTemplateArgument(), clang::Sema::CheckTemplateTypeArgument(), containsUnexpandedParameterPack(), DeduceTemplateArguments(), clang::Sema::getFullyPackExpandedSize(), getNonTypeTemplateArgumentType(), getPackExpansionPattern(), clang::Sema::getTemplateArgumentPackExpansionPattern(), clang::Sema::getTrivialTemplateArgumentLoc(), clang::ASTNodeImporter::ImportTemplateArgument(), clang::TreeTransform< Derived >::InventTemplateArgumentLoc(), isDependent(), isInstantiationDependent(), isPackExpansion(), isSameTemplateArg(), 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 279 of file TemplateBase.h.
References getKind(), Integer, and Integral.
Referenced by clang::ASTRecordWriter::AddTemplateArgument(), clang::Sema::BuildExpressionFromIntegralTemplateArgument(), checkBuiltinTemplateIdType(), checkDeducedTemplateArguments(), DeduceTemplateArguments(), isSameTemplateArg(), clang::operator<<(), printIntegral(), Profile(), and structurallyEquals().
|
inline |
Retrieve the template name for a template name argument.
Definition at line 259 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::Sema::getFullyPackExpandedSize(), clang::TypeName::getFullyQualifiedTemplateArgument(), clang::Sema::getTrivialTemplateArgumentLoc(), clang::ASTNodeImporter::ImportTemplateArgument(), isDependent(), isInstantiationDependent(), 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 266 of file TemplateBase.h.
References clang::TemplateName::getFromVoidPointer(), getKind(), Template, TemplateArg, and TemplateExpansion.
Referenced by addAssociatedClassesAndNamespaces(), clang::ODRHash::AddTemplateArgument(), clang::ASTRecordWriter::AddTemplateArgument(), checkDeducedTemplateArguments(), clang::Sema::CheckTemplateArgument(), clang::ASTContext::getCanonicalTemplateArgument(), getPackExpansionPattern(), clang::ASTNodeImporter::ImportTemplateArgument(), clang::TemplateSpecializationTypeLoc::initializeArgLocs(), clang::TreeTransform< Derived >::InventTemplateArgumentLoc(), isSameTemplateArg(), 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 235 of file TemplateBase.h.
References clang::QualType::getFromOpaquePtr(), getKind(), and TypeOrValue.
Referenced by addAssociatedClassesAndNamespaces(), clang::ODRHash::AddTemplateArgument(), clang::ASTRecordWriter::AddTemplateArgument(), checkDeducedTemplateArguments(), clang::Sema::CheckTemplateArgument(), clang::Sema::CheckTemplateTypeArgument(), containsUnexpandedParameterPack(), DeduceTemplateArguments(), Desugar(), DiagnoseBadDeduction(), clang::ASTContext::getCanonicalTemplateArgument(), clang::Sema::getFullyPackExpandedSize(), clang::TypeName::getFullyQualifiedTemplateArgument(), getPackExpansionPattern(), clang::Sema::getTemplateArgumentPackExpansionPattern(), clang::Sema::getTrivialTemplateArgumentLoc(), clang::ASTNodeImporter::ImportTemplateArgument(), clang::TemplateSpecializationTypeLoc::initializeArgLocs(), clang::TreeTransform< Derived >::InventTemplateArgumentLoc(), isDependent(), isInstantiationDependent(), isPackExpansion(), isSameTemplateArg(), clang::Sema::isStdInitializerList(), isTemplateArgumentTemplateParameter(), MarkUsedTemplateParameters(), clang::operator<<(), print(), Profile(), clang::TreeTransform< Derived >::TransformTemplateArgument(), clang::RecursiveASTVisitor< Derived >::TraverseTemplateArgument(), and clang::RecursiveASTVisitor< Derived >::TraverseTemplateArgumentLoc().
|
inlinestatic |
Definition at line 205 of file TemplateBase.h.
References clang::None, and TemplateArgument().
Referenced by ConvertDeducedTemplateArguments(), and CreatePackCopy().
|
inline |
Retrieve the type of the integral value.
Definition at line 291 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(), getNonTypeTemplateArgumentType(), clang::ASTNodeImporter::ImportTemplateArgument(), printIntegral(), Profile(), and structurallyEquals().
|
inline |
Return the kind of stored template argument.
Definition at line 213 of file TemplateBase.h.
References TypeOrValue.
Referenced by addAssociatedClassesAndNamespaces(), clang::ODRHash::AddTemplateArgument(), clang::ASTRecordWriter::AddTemplateArgument(), clang::ASTRecordWriter::AddTemplateArgumentLoc(), clang::Sema::BuildExpressionFromDeclTemplateArgument(), clang::Sema::BuildExpressionFromIntegralTemplateArgument(), checkDeducedTemplateArguments(), clang::Sema::CheckTemplateArgument(), clang::Sema::CheckTemplateTypeArgument(), containsUnexpandedParameterPack(), ConvertDeducedTemplateArgument(), DeduceTemplateArguments(), Desugar(), DiagnoseBadDeduction(), getAsDecl(), getAsExpr(), getAsIntegral(), getAsTemplate(), getAsTemplateOrTemplatePattern(), getAsType(), clang::ASTContext::getCanonicalTemplateArgument(), 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::ImportTemplateArgument(), clang::ASTNodeImporter::ImportTemplateArgumentLoc(), clang::TemplateSpecializationTypeLoc::initializeArgLocs(), clang::TreeTransform< Derived >::InventTemplateArgumentLoc(), isDependent(), isEnableIf(), isInstantiationDependent(), isNull(), isPackExpansion(), isSameAsPrimaryTemplate(), isSameTemplateArg(), isTemplateArgumentTemplateParameter(), clang::Sema::isTemplateTemplateParameterAtLeastAsSpecializedAs(), 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().
| QualType TemplateArgument::getNonTypeTemplateArgumentType | ( | ) | const |
If this is a non-type template argument, get its type.
Otherwise, returns a null QualType.
Definition at line 246 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 DiagnoseBadDeduction().
|
inline |
Retrieve the type for null non-type template argument.
Definition at line 253 of file TemplateBase.h.
References clang::QualType::getFromOpaquePtr(), getKind(), NullPtr, and TypeOrValue.
Referenced by clang::ASTRecordWriter::AddTemplateArgument(), DeduceTemplateArguments(), clang::ASTContext::getCanonicalTemplateArgument(), getNonTypeTemplateArgumentType(), clang::Sema::getTrivialTemplateArgumentLoc(), 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 342 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 354 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(), isSameAsPrimaryTemplate(), and isSameTemplateArg().
|
inline |
Definition at line 247 of file TemplateBase.h.
References Declaration, DeclArg, clang::QualType::getFromOpaquePtr(), and getKind().
Referenced by clang::ASTRecordWriter::AddTemplateArgument(), checkDeducedTemplateArguments(), DeduceTemplateArguments(), clang::ASTContext::getCanonicalTemplateArgument(), getNonTypeTemplateArgumentType(), clang::Sema::getTrivialTemplateArgumentLoc(), 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(), clang::Decl::getDeclContext(), getKind(), Integral, clang::TemplateName::isDependent(), clang::DeclContext::isDependentContext(), 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(), clang::Decl::getDeclContext(), getKind(), Integral, clang::DeclContext::isDependentContext(), 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 216 of file TemplateBase.h.
References getKind(), and Null.
Referenced by checkDeducedTemplateArguments(), clang::Sema::CheckTemplateArgument(), ConvertDeducedTemplateArguments(), DeduceTemplateArgumentsByTypeMatch(), clang::Sema::DiagnoseUnexpandedParameterPack(), 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(), isSameAsPrimaryTemplate(), isSameTemplateArg(), clang::Sema::isTemplateTemplateParameterAtLeastAsSpecializedAs(), and clang::TreeTransform< Derived >::TransformTemplateArguments().
|
inline |
Iterator referencing the first argument of a template argument pack.
Definition at line 316 of file TemplateBase.h.
References Args, getKind(), and Pack.
Referenced by checkDeducedTemplateArguments(), clang::ASTContext::getCanonicalTemplateArgument(), getPackSubstitutedTemplateArgument(), clang::ASTContext::getSubstTemplateTemplateParmPack(), clang::ASTNodeImporter::ImportTemplateArgument(), isSameAsPrimaryTemplate(), isSameTemplateArg(), clang::Sema::isTemplateTemplateParameterAtLeastAsSpecializedAs(), 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 330 of file TemplateBase.h.
References pack_begin(), and pack_end().
Referenced by addAssociatedClassesAndNamespaces(), clang::ODRHash::AddTemplateArgument(), clang::ASTRecordWriter::AddTemplateArgument(), containsUnexpandedParameterPack(), ConvertDeducedTemplateArgument(), clang::Sema::getFullyPackExpandedSize(), clang::ASTContext::getSubstTemplateTypeParmPackType(), hasTemplateArgumentForDeduction(), isDependent(), isInstantiationDependent(), MarkUsedTemplateParameters(), print(), and clang::SubstTemplateTypeParmPackType::Profile().
|
inline |
Iterator referencing one past the last argument of a template argument pack.
Definition at line 323 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 336 of file TemplateBase.h.
References Args, getKind(), and Pack.
Referenced by clang::ODRHash::AddTemplateArgument(), clang::ASTRecordWriter::AddTemplateArgument(), checkDeducedTemplateArguments(), clang::ASTContext::getCanonicalTemplateArgument(), getPackSubstitutedTemplateArgument(), clang::ASTContext::getSubstTemplateTemplateParmPack(), clang::ASTNodeImporter::ImportTemplateArgument(), isSameAsPrimaryTemplate(), isSameTemplateArg(), clang::Sema::isTemplateTemplateParameterAtLeastAsSpecializedAs(), 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 379 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::Stmt::printPretty(), 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 271 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::Stmt::Profile(), clang::QualType::Profile(), Template, and TemplateExpansion.
Referenced by clang::SubstTemplateTemplateParmPackStorage::Profile().
|
inline |
Definition at line 296 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 324 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(), and getParamTypeForDecl().
| 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().
1.8.6