clang
6.0.0
|
Stores a list of template parameters for a TemplateDecl and its derived classes. More...
#include "clang/AST/DeclTemplate.h"
Public Types | |
using | iterator = NamedDecl ** |
Iterates through the template parameters in this list. More... | |
using | const_iterator = NamedDecl *const * |
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 | |
TemplateParameterList (SourceLocation TemplateLoc, SourceLocation LAngleLoc, ArrayRef< NamedDecl *> Params, SourceLocation RAngleLoc, Expr *RequiresClause) | |
size_t | numTrailingObjects (OverloadToken< NamedDecl *>) const |
size_t | numTrailingObjects (OverloadToken< Expr *>) const |
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 68 of file DeclTemplate.h.
using clang::TemplateParameterList::const_iterator = NamedDecl * const * |
Iterates through the template parameters in this list.
Definition at line 117 of file DeclTemplate.h.
using clang::TemplateParameterList::FixedSizeStorageOwner = TrailingObjects::FixedSizeStorageOwner |
Definition at line 182 of file DeclTemplate.h.
using clang::TemplateParameterList::iterator = NamedDecl ** |
Iterates through the template parameters in this list.
Definition at line 114 of file DeclTemplate.h.
|
protected |
Definition at line 46 of file DeclTemplate.cpp.
References begin(), clang::Decl::isTemplateParameterPack(), and P.
Referenced by Create().
Definition at line 126 of file DeclTemplate.h.
References begin(), and end().
Referenced by clang::ODRHash::AddTemplateParameterList(), and getMinRequiredArguments().
Definition at line 129 of file DeclTemplate.h.
|
inline |
Definition at line 119 of file DeclTemplate.h.
Referenced by asArray(), clang::Sema::CheckTemplateArgumentList(), clang::Sema::CheckTemplateParameterList(), end(), getParam(), TemplateParameterList(), and clang::Sema::TemplateParameterListsAreEqual().
|
inline |
Definition at line 120 of file DeclTemplate.h.
|
inline |
Determine whether this template parameter list contains an unexpanded parameter pack.
Definition at line 158 of file DeclTemplate.h.
|
static |
Definition at line 77 of file DeclTemplate.cpp.
References clang::ASTContext::Allocate(), and TemplateParameterList().
Referenced by clang::Sema::ActOnTemplateParameterList(), createMakeIntegerSeqParameterList(), createTypePackElementParameterList(), getGenericLambdaTemplateParameterList(), clang::TypeAliasTemplateDecl::getInstantiatedFromMemberTemplate(), clang::ASTNodeImporter::ImportTemplateParameterList(), clang::ClassTemplateDecl::isThisDeclarationADefinition(), clang::ASTReader::ReadTemplateParameterList(), clang::FunctionTemplateDecl::spec_end(), and clang::TemplateDeclInstantiator::SubstTemplateParams().
|
inline |
Definition at line 121 of file DeclTemplate.h.
References begin().
Referenced by asArray(), clang::Sema::CheckTemplateArgumentList(), clang::Sema::CheckTemplateParameterList(), and clang::Sema::TemplateParameterListsAreEqual().
|
inline |
Definition at line 122 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 116 of file DeclTemplate.cpp.
References getParam(), and size().
Referenced by clang::TemplateTypeParmDecl::getDepth(), getParam(), hasDeducibleTemplateParameters(), isSameAsPrimaryTemplate(), and clang::TemplateTypeParmDecl::setDeclaredWithTypename().
|
inline |
Definition at line 173 of file DeclTemplate.h.
Referenced by clang::ASTRecordWriter::AddTemplateParameterList(), and clang::ASTNodeImporter::ImportTemplateParameterList().
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 88 of file DeclTemplate.cpp.
Referenced by getParam(), clang::Sema::isStdInitializerList(), and LookupStdInitializerList().
|
inline |
Definition at line 133 of file DeclTemplate.h.
References begin(), and size().
Referenced by checkLiteralOperatorTemplateParameterList(), DeduceTemplateArgumentsByTypeMatch(), getDepth(), clang::comments::TParamCommandComment::getParamName(), clang::Sema::isStdInitializerList(), and LookupStdInitializerList().
|
inline |
Definition at line 137 of file DeclTemplate.h.
References begin(), getDepth(), getMinRequiredArguments(), and size().
|
inline |
Definition at line 174 of file DeclTemplate.h.
Referenced by clang::ASTRecordWriter::AddTemplateParameterList(), DiagnoseTemplateParameterListArityMismatch(), and clang::ASTNodeImporter::ImportTemplateParameterList().
|
inline |
The constraint-expression of the associated requires-clause.
Definition at line 163 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 168 of file DeclTemplate.h.
|
inline |
Definition at line 176 of file DeclTemplate.h.
Referenced by checkLiteralOperatorTemplateParameterList(), clang::Sema::CheckTemplateDeclScope(), diagnoseArityMismatch(), clang::NonTypeTemplateParmDecl::getSourceRange(), clang::ClassTemplateSpecializationDecl::getTemplateKeywordLoc(), and clang::TemplateTypeParmDecl::setDeclaredWithTypename().
|
inline |
Definition at line 172 of file DeclTemplate.h.
Referenced by clang::ASTRecordWriter::AddTemplateParameterList(), clang::Sema::CheckTemplateDeclScope(), DiagnoseTemplateParameterListArityMismatch(), clang::TemplateDecl::getSourceRange(), clang::TemplateTemplateParmDecl::getSourceRange(), and clang::ASTNodeImporter::ImportTemplateParameterList().
|
inlineprotected |
Definition at line 93 of file DeclTemplate.h.
|
inlineprotected |
Definition at line 97 of file DeclTemplate.h.
|
inline |
Definition at line 124 of file DeclTemplate.h.
Referenced by clang::ODRHash::AddTemplateParameterList(), clang::ASTRecordWriter::AddTemplateParameterList(), asArray(), clang::TemplateArgumentList::asArray(), checkLiteralOperatorTemplateParameterList(), clang::Sema::DeduceTemplateArguments(), diagnoseArityMismatch(), DiagnoseTemplateParameterListArityMismatch(), clang::Sema::FindInstantiatedDecl(), getDepth(), getFirstInnerIndex(), clang::ASTContext::getInjectedTemplateArgs(), getParam(), clang::Sema::getTemplateArgumentBindingsText(), hasDeducibleTemplateParameters(), clang::ASTNodeImporter::ImportTemplateParameterList(), isAtLeastAsSpecializedAs(), isSameAsPrimaryTemplate(), isSameTemplateParameterList(), clang::Sema::MarkDeducedTemplateParameters(), clang::TemplateDeclInstantiator::SubstTemplateParams(), and clang::Sema::TemplateParameterListsAreEqual().
|
friend |
Definition at line 103 of file DeclTemplate.h.
friend clang::TemplateParameterList::TrailingObjects |
Definition at line 104 of file DeclTemplate.h.