clang
3.7.0
|
A stack object to be created when performing template instantiation. More...
#include <Sema.h>
Classes | |
struct | ExceptionSpecification |
Public Member Functions | |
InstantiatingTemplate (Sema &SemaRef, SourceLocation PointOfInstantiation, Decl *Entity, SourceRange InstantiationRange=SourceRange()) | |
Note that we are instantiating a class template, function template, or a member thereof. More... | |
InstantiatingTemplate (Sema &SemaRef, SourceLocation PointOfInstantiation, FunctionDecl *Entity, ExceptionSpecification, SourceRange InstantiationRange=SourceRange()) | |
Note that we are instantiating an exception specification of a function template. More... | |
InstantiatingTemplate (Sema &SemaRef, SourceLocation PointOfInstantiation, TemplateDecl *Template, ArrayRef< TemplateArgument > TemplateArgs, SourceRange InstantiationRange=SourceRange()) | |
Note that we are instantiating a default argument in a template-id. More... | |
InstantiatingTemplate (Sema &SemaRef, SourceLocation PointOfInstantiation, FunctionTemplateDecl *FunctionTemplate, ArrayRef< TemplateArgument > TemplateArgs, ActiveTemplateInstantiation::InstantiationKind Kind, sema::TemplateDeductionInfo &DeductionInfo, SourceRange InstantiationRange=SourceRange()) | |
Note that we are instantiating a default argument in a template-id. More... | |
InstantiatingTemplate (Sema &SemaRef, SourceLocation PointOfInstantiation, ClassTemplatePartialSpecializationDecl *PartialSpec, ArrayRef< TemplateArgument > TemplateArgs, sema::TemplateDeductionInfo &DeductionInfo, SourceRange InstantiationRange=SourceRange()) | |
Note that we are instantiating as part of template argument deduction for a class template partial specialization. More... | |
InstantiatingTemplate (Sema &SemaRef, SourceLocation PointOfInstantiation, VarTemplatePartialSpecializationDecl *PartialSpec, ArrayRef< TemplateArgument > TemplateArgs, sema::TemplateDeductionInfo &DeductionInfo, SourceRange InstantiationRange=SourceRange()) | |
Note that we are instantiating as part of template argument deduction for a variable template partial specialization. More... | |
InstantiatingTemplate (Sema &SemaRef, SourceLocation PointOfInstantiation, ParmVarDecl *Param, ArrayRef< TemplateArgument > TemplateArgs, SourceRange InstantiationRange=SourceRange()) | |
InstantiatingTemplate (Sema &SemaRef, SourceLocation PointOfInstantiation, NamedDecl *Template, NonTypeTemplateParmDecl *Param, ArrayRef< TemplateArgument > TemplateArgs, SourceRange InstantiationRange) | |
Note that we are substituting prior template arguments into a non-type parameter. More... | |
InstantiatingTemplate (Sema &SemaRef, SourceLocation PointOfInstantiation, NamedDecl *Template, TemplateTemplateParmDecl *Param, ArrayRef< TemplateArgument > TemplateArgs, SourceRange InstantiationRange) | |
Note that we are substituting prior template arguments into a template template parameter. More... | |
InstantiatingTemplate (Sema &SemaRef, SourceLocation PointOfInstantiation, TemplateDecl *Template, NamedDecl *Param, ArrayRef< TemplateArgument > TemplateArgs, SourceRange InstantiationRange) | |
Note that we are checking the default template argument against the template parameter for a given template-id. More... | |
void | Clear () |
Note that we have finished instantiating this template. More... | |
~InstantiatingTemplate () | |
bool | isInvalid () const |
Determines whether we have exceeded the maximum recursive template instantiations. More... | |
A stack object to be created when performing template instantiation.
Construction of an object of type InstantiatingTemplate
pushes the current instantiation onto the stack of active instantiations. If the size of this stack exceeds the maximum number of recursive template instantiations, construction produces an error and evaluates true.
Destruction of this object will pop the named instantiation off the stack.
Sema::InstantiatingTemplate::InstantiatingTemplate | ( | Sema & | SemaRef, |
SourceLocation | PointOfInstantiation, | ||
Decl * | Entity, | ||
SourceRange | InstantiationRange = SourceRange() |
||
) |
Note that we are instantiating a class template, function template, or a member thereof.
Definition at line 234 of file SemaTemplateInstantiate.cpp.
Sema::InstantiatingTemplate::InstantiatingTemplate | ( | Sema & | SemaRef, |
SourceLocation | PointOfInstantiation, | ||
FunctionDecl * | Entity, | ||
ExceptionSpecification | , | ||
SourceRange | InstantiationRange = SourceRange() |
||
) |
Note that we are instantiating an exception specification of a function template.
Definition at line 241 of file SemaTemplateInstantiate.cpp.
Sema::InstantiatingTemplate::InstantiatingTemplate | ( | Sema & | SemaRef, |
SourceLocation | PointOfInstantiation, | ||
TemplateDecl * | Template, | ||
ArrayRef< TemplateArgument > | TemplateArgs, | ||
SourceRange | InstantiationRange = SourceRange() |
||
) |
Note that we are instantiating a default argument in a template-id.
Definition at line 248 of file SemaTemplateInstantiate.cpp.
Sema::InstantiatingTemplate::InstantiatingTemplate | ( | Sema & | SemaRef, |
SourceLocation | PointOfInstantiation, | ||
FunctionTemplateDecl * | FunctionTemplate, | ||
ArrayRef< TemplateArgument > | TemplateArgs, | ||
ActiveTemplateInstantiation::InstantiationKind | Kind, | ||
sema::TemplateDeductionInfo & | DeductionInfo, | ||
SourceRange | InstantiationRange = SourceRange() |
||
) |
Note that we are instantiating a default argument in a template-id.
Definition at line 257 of file SemaTemplateInstantiate.cpp.
Sema::InstantiatingTemplate::InstantiatingTemplate | ( | Sema & | SemaRef, |
SourceLocation | PointOfInstantiation, | ||
ClassTemplatePartialSpecializationDecl * | PartialSpec, | ||
ArrayRef< TemplateArgument > | TemplateArgs, | ||
sema::TemplateDeductionInfo & | DeductionInfo, | ||
SourceRange | InstantiationRange = SourceRange() |
||
) |
Note that we are instantiating as part of template argument deduction for a class template partial specialization.
Definition at line 267 of file SemaTemplateInstantiate.cpp.
Sema::InstantiatingTemplate::InstantiatingTemplate | ( | Sema & | SemaRef, |
SourceLocation | PointOfInstantiation, | ||
VarTemplatePartialSpecializationDecl * | PartialSpec, | ||
ArrayRef< TemplateArgument > | TemplateArgs, | ||
sema::TemplateDeductionInfo & | DeductionInfo, | ||
SourceRange | InstantiationRange = SourceRange() |
||
) |
Note that we are instantiating as part of template argument deduction for a variable template partial specialization.
Definition at line 278 of file SemaTemplateInstantiate.cpp.
Sema::InstantiatingTemplate::InstantiatingTemplate | ( | Sema & | SemaRef, |
SourceLocation | PointOfInstantiation, | ||
ParmVarDecl * | Param, | ||
ArrayRef< TemplateArgument > | TemplateArgs, | ||
SourceRange | InstantiationRange = SourceRange() |
||
) |
Definition at line 289 of file SemaTemplateInstantiate.cpp.
Sema::InstantiatingTemplate::InstantiatingTemplate | ( | Sema & | SemaRef, |
SourceLocation | PointOfInstantiation, | ||
NamedDecl * | Template, | ||
NonTypeTemplateParmDecl * | Param, | ||
ArrayRef< TemplateArgument > | TemplateArgs, | ||
SourceRange | InstantiationRange | ||
) |
Note that we are substituting prior template arguments into a non-type parameter.
Definition at line 298 of file SemaTemplateInstantiate.cpp.
Sema::InstantiatingTemplate::InstantiatingTemplate | ( | Sema & | SemaRef, |
SourceLocation | PointOfInstantiation, | ||
NamedDecl * | Template, | ||
TemplateTemplateParmDecl * | Param, | ||
ArrayRef< TemplateArgument > | TemplateArgs, | ||
SourceRange | InstantiationRange | ||
) |
Note that we are substituting prior template arguments into a template template parameter.
Definition at line 308 of file SemaTemplateInstantiate.cpp.
Sema::InstantiatingTemplate::InstantiatingTemplate | ( | Sema & | SemaRef, |
SourceLocation | PointOfInstantiation, | ||
TemplateDecl * | Template, | ||
NamedDecl * | Param, | ||
ArrayRef< TemplateArgument > | TemplateArgs, | ||
SourceRange | InstantiationRange | ||
) |
Note that we are checking the default template argument against the template parameter for a given template-id.
Definition at line 318 of file SemaTemplateInstantiate.cpp.
|
inline |
void Sema::InstantiatingTemplate::Clear | ( | ) |
Note that we have finished instantiating this template.
Definition at line 327 of file SemaTemplateInstantiate.cpp.
References clang::Sema::ActiveTemplateInstantiationLookupModules, clang::Sema::ActiveTemplateInstantiations, clang::Sema::InNonInstantiationSFINAEContext, clang::Sema::LookupModulesCache, and clang::Sema::NonInstantiationEntries.
|
inline |
Determines whether we have exceeded the maximum recursive template instantiations.
Definition at line 6695 of file Sema.h.
Referenced by clang::Sema::BuildVarTemplateInstantiation(), clang::Sema::CheckTemplateArgument(), clang::Sema::CheckTemplateArgumentList(), clang::Sema::CheckTemplateIdType(), clang::Sema::InstantiateClass(), clang::Sema::InstantiateEnum(), clang::Sema::InstantiateExceptionSpec(), clang::Sema::InstantiateFunctionDefinition(), clang::Sema::InstantiateInClassInitializer(), clang::Sema::InstantiateVariableDefinition(), and SubstDefaultTemplateArgument().