|
clang
5.0.0
|
Stores a list of template parameters for a TemplateDecl and its derived classes. More...
#include "clang/AST/DeclTemplate.h"
Public Types | |
| typedef NamedDecl ** | iterator |
| Iterates through the template parameters in this list. More... | |
| typedef NamedDecl *const * | const_iterator |
| Iterates through the template parameters in this list. More... | |
| using | FixedSizeStorageOwner = TrailingObjects::FixedSizeStorageOwner |
Public Member Functions | |
| iterator | begin () |
| const_iterator | begin () const |
| iterator | end () |
| const_iterator | end () const |
| unsigned | size () const |
| ArrayRef< NamedDecl * > | asArray () |
| ArrayRef< const NamedDecl * > | asArray () const |
| NamedDecl * | getParam (unsigned Idx) |
| const NamedDecl * | getParam (unsigned Idx) const |
| unsigned | getMinRequiredArguments () const |
| Returns the minimum number of arguments needed to form a template specialization. More... | |
| unsigned | getDepth () const |
| Get the depth of this template parameter list in the set of template parameter lists. More... | |
| bool | containsUnexpandedParameterPack () const |
| Determine whether this template parameter list contains an unexpanded parameter pack. More... | |
| Expr * | getRequiresClause () |
| The constraint-expression of the associated requires-clause. More... | |
| const Expr * | getRequiresClause () const |
| The constraint-expression of the associated requires-clause. More... | |
| SourceLocation | getTemplateLoc () const |
| SourceLocation | getLAngleLoc () const |
| SourceLocation | getRAngleLoc () const |
| SourceRange | getSourceRange () const LLVM_READONLY |
Static Public Member Functions | |
| static TemplateParameterList * | Create (const ASTContext &C, SourceLocation TemplateLoc, SourceLocation LAngleLoc, ArrayRef< NamedDecl * > Params, SourceLocation RAngleLoc, Expr *RequiresClause) |
Public Attributes | |
| friend | TrailingObjects |
Protected Member Functions | |
| size_t | numTrailingObjects (OverloadToken< NamedDecl * >) const |
| size_t | numTrailingObjects (OverloadToken< Expr * >) const |
| TemplateParameterList (SourceLocation TemplateLoc, SourceLocation LAngleLoc, ArrayRef< NamedDecl * > Params, SourceLocation RAngleLoc, Expr *RequiresClause) | |
Friends | |
| template<size_t N, bool HasRequiresClause> | |
| class | FixedSizeTemplateParameterListStorage |
Stores a list of template parameters for a TemplateDecl and its derived classes.
Definition at line 50 of file DeclTemplate.h.
| typedef NamedDecl* const* clang::TemplateParameterList::const_iterator |
Iterates through the template parameters in this list.
Definition at line 96 of file DeclTemplate.h.
| using clang::TemplateParameterList::FixedSizeStorageOwner = TrailingObjects::FixedSizeStorageOwner |
Definition at line 167 of file DeclTemplate.h.
Iterates through the template parameters in this list.
Definition at line 93 of file DeclTemplate.h.
|
protected |
Definition at line 31 of file DeclTemplate.cpp.
References begin(), clang::Decl::isTemplateParameterPack(), and P.
Referenced by Create().
Definition at line 105 of file DeclTemplate.h.
References begin(), and end().
Referenced by getMinRequiredArguments().
Definition at line 108 of file DeclTemplate.h.
|
inline |
Definition at line 98 of file DeclTemplate.h.
Referenced by asArray(), clang::Sema::CheckTemplateArgumentList(), clang::Sema::CheckTemplateParameterList(), end(), getParam(), TemplateParameterList(), and clang::Sema::TemplateParameterListsAreEqual().
|
inline |
Definition at line 99 of file DeclTemplate.h.
|
inline |
Determine whether this template parameter list contains an unexpanded parameter pack.
Definition at line 138 of file DeclTemplate.h.
|
static |
Definition at line 62 of file DeclTemplate.cpp.
References clang::ASTContext::Allocate(), and TemplateParameterList().
Referenced by clang::Sema::ActOnTemplateParameterList(), createMakeIntegerSeqParameterList(), createTypePackElementParameterList(), getGenericLambdaTemplateParameterList(), clang::ASTNodeImporter::ImportTemplateParameterList(), clang::Sema::MatchTemplateParametersToScopeSpecifier(), clang::ASTReader::ReadTemplateParameterList(), and clang::TemplateDeclInstantiator::SubstTemplateParams().
|
inline |
Definition at line 100 of file DeclTemplate.h.
References begin().
Referenced by asArray(), clang::Sema::CheckTemplateArgumentList(), clang::Sema::CheckTemplateParameterList(), and clang::Sema::TemplateParameterListsAreEqual().
|
inline |
Definition at line 101 of file DeclTemplate.h.
References begin().
| unsigned TemplateParameterList::getDepth | ( | ) | const |
Get the depth of this template parameter list in the set of template parameter lists.
The first template parameter list in a declaration will have depth 0, the second template parameter list will have depth 1, etc.
Definition at line 101 of file DeclTemplate.cpp.
References getParam(), and size().
Referenced by checkTemplatePartialSpecialization(), hasDeducibleTemplateParameters(), isAtLeastAsSpecializedAs(), isSameAsPrimaryTemplate(), clang::Sema::isTemplateTemplateParameterAtLeastAsSpecializedAs(), and clang::Sema::MarkDeducedTemplateParameters().
|
inline |
| unsigned TemplateParameterList::getMinRequiredArguments | ( | ) | const |
Returns the minimum number of arguments needed to form a template specialization.
This may be fewer than the number of template parameters, if some of the parameters have default arguments or if there is a parameter pack.
Definition at line 73 of file DeclTemplate.cpp.
Referenced by clang::Sema::isStdInitializerList(), and LookupStdInitializerList().
Definition at line 112 of file DeclTemplate.h.
References begin(), and size().
Referenced by clang::Sema::ActOnClassTemplateSpecialization(), clang::comments::Sema::actOnTParamCommandParamNameArg(), clang::Sema::CheckDeductionGuideTemplate(), checkLiteralOperatorTemplateParameterList(), clang::Sema::CheckTemplatePartialSpecializationArgs(), clang::PredefinedExpr::ComputeName(), ConvertDeducedTemplateArguments(), DeduceTemplateArgumentsByTypeMatch(), DiagnoseUnexpandedParameterPacks(), FinishTemplateArgumentDeduction(), getDepth(), clang::comments::TParamCommandComment::getParamName(), clang::Sema::getTemplateArgumentBindingsText(), isSameAsPrimaryTemplate(), isSameTemplateParameterList(), clang::Sema::isStdInitializerList(), clang::Sema::isTemplateTemplateParameterAtLeastAsSpecializedAs(), LookupStdInitializerList(), noteNonDeducibleParameters(), clang::Sema::RebuildTemplateParamsInCurrentInstantiation(), and clang::Sema::SubstituteExplicitTemplateArguments().
Definition at line 117 of file DeclTemplate.h.
|
inline |
Definition at line 154 of file DeclTemplate.h.
Referenced by clang::Sema::ActOnClassTemplateSpecialization(), clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnTemplateTemplateParameter(), clang::Sema::ActOnVariableDeclarator(), clang::ASTRecordWriter::AddTemplateParameterList(), DiagnoseTemplateParameterListArityMismatch(), clang::ASTNodeImporter::ImportTemplateParameterList(), and clang::Sema::isTemplateTemplateParameterAtLeastAsSpecializedAs().
|
inline |
The constraint-expression of the associated requires-clause.
Definition at line 143 of file DeclTemplate.h.
Referenced by clang::formAssociatedConstraints(), clang::TemplateDecl::getRequiresClause(), and clang::ASTNodeImporter::ImportTemplateParameterList().
|
inline |
The constraint-expression of the associated requires-clause.
Definition at line 148 of file DeclTemplate.h.
|
inline |
Definition at line 156 of file DeclTemplate.h.
Referenced by checkLiteralOperatorTemplateParameterList(), clang::Sema::CheckTemplateArgumentList(), clang::Sema::CheckTemplateDeclScope(), and diagnoseArityMismatch().
|
inline |
Definition at line 152 of file DeclTemplate.h.
Referenced by clang::Sema::ActOnClassTemplateSpecialization(), clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnVariableDeclarator(), clang::ASTRecordWriter::AddTemplateParameterList(), clang::Sema::CheckTemplateDeclScope(), DiagnoseTemplateParameterListArityMismatch(), and clang::ASTNodeImporter::ImportTemplateParameterList().
|
inlineprotected |
Definition at line 72 of file DeclTemplate.h.
|
inlineprotected |
Definition at line 76 of file DeclTemplate.h.
|
inline |
Definition at line 103 of file DeclTemplate.h.
Referenced by clang::Sema::ActOnClassTemplateSpecialization(), clang::Sema::ActOnCXXMemberDeclarator(), clang::Sema::ActOnTemplateTemplateParameter(), clang::comments::Sema::actOnTParamCommandParamNameArg(), clang::Sema::ActOnVariableDeclarator(), clang::ASTRecordWriter::AddTemplateParameterList(), asArray(), clang::Sema::CheckClassTemplate(), clang::Sema::CheckDeductionGuideTemplate(), checkLiteralOperatorTemplateParameterList(), checkTemplatePartialSpecialization(), clang::Sema::CheckTemplatePartialSpecializationArgs(), clang::PredefinedExpr::ComputeName(), ConvertDeducedTemplateArguments(), clang::Sema::DeduceTemplateArguments(), diagnoseArityMismatch(), DiagnoseTemplateParameterListArityMismatch(), DiagnoseUnexpandedParameterPacks(), clang::Sema::FindInstantiatedDecl(), FinishTemplateArgumentDeduction(), getDepth(), getFirstInnerIndex(), clang::FunctionTemplateDecl::getInjectedTemplateArgs(), clang::ASTContext::getInjectedTemplateArgs(), getParam(), clang::Sema::getTemplateArgumentBindingsText(), hasDeducibleTemplateParameters(), clang::ASTNodeImporter::ImportTemplateParameterList(), isAtLeastAsSpecializedAs(), isSameAsPrimaryTemplate(), isSameTemplateParameterList(), clang::Sema::isTemplateTemplateParameterAtLeastAsSpecializedAs(), clang::Sema::LookupLiteralOperator(), clang::Sema::MarkDeducedTemplateParameters(), clang::Sema::RebuildTemplateParamsInCurrentInstantiation(), ResolveOverloadForDeduction(), clang::Sema::SubstituteExplicitTemplateArguments(), clang::TemplateDeclInstantiator::SubstTemplateParams(), and clang::Sema::TemplateParameterListsAreEqual().
|
friend |
Definition at line 163 of file DeclTemplate.h.
| friend clang::TemplateParameterList::TrailingObjects |
Definition at line 160 of file DeclTemplate.h.
1.8.6