clang
7.0.0
|
A stack object to be created when performing template instantiation. More...
#include "clang/Sema/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, variable template, alias 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, TemplateParameter Param, 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, CodeSynthesisContext::SynthesisKind Kind, sema::TemplateDeductionInfo &DeductionInfo, SourceRange InstantiationRange=SourceRange()) | |
Note that we are substituting either explicitly-specified or deduced template arguments during function template argument deduction. More... | |
InstantiatingTemplate (Sema &SemaRef, SourceLocation PointOfInstantiation, TemplateDecl *Template, ArrayRef< TemplateArgument > TemplateArgs, sema::TemplateDeductionInfo &DeductionInfo, SourceRange InstantiationRange=SourceRange()) | |
Note that we are instantiating as part of template argument deduction for a class template declaration. 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()) | |
Note that we are instantiating a default argument for a function parameter. More... | |
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... | |
bool | isAlreadyInstantiating () const |
Determine whether we are already instantiating this specialization in some surrounding active instantiation. 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, variable template, alias template, or a member thereof.
Definition at line 247 of file SemaTemplateInstantiate.cpp.
Referenced by clang::Sema::CodeSynthesisContext::isInstantiationRecord().
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 254 of file SemaTemplateInstantiate.cpp.
Sema::InstantiatingTemplate::InstantiatingTemplate | ( | Sema & | SemaRef, |
SourceLocation | PointOfInstantiation, | ||
TemplateParameter | Param, | ||
TemplateDecl * | Template, | ||
ArrayRef< TemplateArgument > | TemplateArgs, | ||
SourceRange | InstantiationRange = SourceRange() |
||
) |
Note that we are instantiating a default argument in a template-id.
Definition at line 261 of file SemaTemplateInstantiate.cpp.
Sema::InstantiatingTemplate::InstantiatingTemplate | ( | Sema & | SemaRef, |
SourceLocation | PointOfInstantiation, | ||
FunctionTemplateDecl * | FunctionTemplate, | ||
ArrayRef< TemplateArgument > | TemplateArgs, | ||
CodeSynthesisContext::SynthesisKind | Kind, | ||
sema::TemplateDeductionInfo & | DeductionInfo, | ||
SourceRange | InstantiationRange = SourceRange() |
||
) |
Note that we are substituting either explicitly-specified or deduced template arguments during function template argument deduction.
Definition at line 271 of file SemaTemplateInstantiate.cpp.
References clang::Sema::CodeSynthesisContext::DeducedTemplateArgumentSubstitution, and clang::Sema::CodeSynthesisContext::ExplicitTemplateArgumentSubstitution.
Sema::InstantiatingTemplate::InstantiatingTemplate | ( | Sema & | SemaRef, |
SourceLocation | PointOfInstantiation, | ||
TemplateDecl * | Template, | ||
ArrayRef< TemplateArgument > | TemplateArgs, | ||
sema::TemplateDeductionInfo & | DeductionInfo, | ||
SourceRange | InstantiationRange = SourceRange() |
||
) |
Note that we are instantiating as part of template argument deduction for a class template declaration.
Definition at line 285 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 296 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 307 of file SemaTemplateInstantiate.cpp.
Sema::InstantiatingTemplate::InstantiatingTemplate | ( | Sema & | SemaRef, |
SourceLocation | PointOfInstantiation, | ||
ParmVarDecl * | Param, | ||
ArrayRef< TemplateArgument > | TemplateArgs, | ||
SourceRange | InstantiationRange = SourceRange() |
||
) |
Note that we are instantiating a default argument for a function parameter.
Definition at line 318 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 327 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 337 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 347 of file SemaTemplateInstantiate.cpp.
|
inline |
void Sema::InstantiatingTemplate::Clear | ( | ) |
Note that we have finished instantiating this template.
Definition at line 395 of file SemaTemplateInstantiate.cpp.
References clang::atTemplateEnd(), clang::Sema::CodeSynthesisContexts, clang::Sema::Diag(), clang::Sema::getLangOpts(), clang::Sema::InstantiatingSpecializations, clang::Sema::NonInstantiationEntries, clang::Sema::popCodeSynthesisContext(), and clang::Sema::TemplateInstCallbacks.
|
inline |
Determine whether we are already instantiating this specialization in some surrounding active instantiation.
Definition at line 7452 of file Sema.h.
Referenced by clang::Sema::InstantiateClass(), clang::Sema::InstantiateEnum(), clang::Sema::InstantiateExceptionSpec(), clang::Sema::InstantiateFunctionDefinition(), clang::Sema::InstantiateInClassInitializer(), and clang::Sema::InstantiateVariableDefinition().
|
inline |
Determines whether we have exceeded the maximum recursive template instantiations.
Definition at line 7448 of file Sema.h.
Referenced by clang::Sema::BuildVarTemplateInstantiation(), clang::Sema::CheckTemplateArgument(), clang::Sema::DeclareImplicitDeductionGuides(), clang::Sema::InstantiateClass(), clang::Sema::InstantiateEnum(), clang::Sema::InstantiateExceptionSpec(), clang::Sema::InstantiateFunctionDefinition(), clang::Sema::InstantiateInClassInitializer(), clang::Sema::InstantiateVariableDefinition(), and SubstDefaultTemplateArgument().