clang API Documentation
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. | |
| InstantiatingTemplate (Sema &SemaRef, SourceLocation PointOfInstantiation, FunctionDecl *Entity, ExceptionSpecification, SourceRange InstantiationRange=SourceRange()) | |
| Note that we are instantiating an exception specification of a function template. | |
| InstantiatingTemplate (Sema &SemaRef, SourceLocation PointOfInstantiation, TemplateDecl *Template, const TemplateArgument *TemplateArgs, unsigned NumTemplateArgs, SourceRange InstantiationRange=SourceRange()) | |
| Note that we are instantiating a default argument in a template-id. | |
| InstantiatingTemplate (Sema &SemaRef, SourceLocation PointOfInstantiation, FunctionTemplateDecl *FunctionTemplate, const TemplateArgument *TemplateArgs, unsigned NumTemplateArgs, ActiveTemplateInstantiation::InstantiationKind Kind, sema::TemplateDeductionInfo &DeductionInfo, SourceRange InstantiationRange=SourceRange()) | |
| Note that we are instantiating a default argument in a template-id. | |
| InstantiatingTemplate (Sema &SemaRef, SourceLocation PointOfInstantiation, ClassTemplatePartialSpecializationDecl *PartialSpec, const TemplateArgument *TemplateArgs, unsigned NumTemplateArgs, sema::TemplateDeductionInfo &DeductionInfo, SourceRange InstantiationRange=SourceRange()) | |
| Note that we are instantiating as part of template argument deduction for a class template partial specialization. | |
| InstantiatingTemplate (Sema &SemaRef, SourceLocation PointOfInstantiation, ParmVarDecl *Param, const TemplateArgument *TemplateArgs, unsigned NumTemplateArgs, SourceRange InstantiationRange=SourceRange()) | |
| InstantiatingTemplate (Sema &SemaRef, SourceLocation PointOfInstantiation, NamedDecl *Template, NonTypeTemplateParmDecl *Param, const TemplateArgument *TemplateArgs, unsigned NumTemplateArgs, SourceRange InstantiationRange) | |
| Note that we are substituting prior template arguments into a non-type or template template parameter. | |
| InstantiatingTemplate (Sema &SemaRef, SourceLocation PointOfInstantiation, NamedDecl *Template, TemplateTemplateParmDecl *Param, const TemplateArgument *TemplateArgs, unsigned NumTemplateArgs, SourceRange InstantiationRange) | |
| InstantiatingTemplate (Sema &SemaRef, SourceLocation PointOfInstantiation, TemplateDecl *Template, NamedDecl *Param, const TemplateArgument *TemplateArgs, unsigned NumTemplateArgs, SourceRange InstantiationRange) | |
| Note that we are checking the default template argument against the template parameter for a given template-id. | |
| void | Clear () |
| Note that we have finished instantiating this template. | |
| ~InstantiatingTemplate () | |
| operator bool () const | |
| Determines whether we have exceeded the maximum recursive template instantiations. | |
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 172 of file SemaTemplateInstantiate.cpp.
References clang::Sema::ActiveTemplateInstantiations, clang::Sema::ActiveTemplateInstantiation::Entity, clang::Sema::InNonInstantiationSFINAEContext, clang::Sema::ActiveTemplateInstantiation::InstantiationRange, clang::Sema::ActiveTemplateInstantiation::Kind, clang::Sema::ActiveTemplateInstantiation::NumTemplateArgs, clang::Sema::ActiveTemplateInstantiation::PointOfInstantiation, clang::Sema::ActiveTemplateInstantiation::TemplateArgs, and clang::Sema::ActiveTemplateInstantiation::TemplateInstantiation.
| 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 195 of file SemaTemplateInstantiate.cpp.
References clang::Sema::ActiveTemplateInstantiations, clang::Sema::ActiveTemplateInstantiation::Entity, clang::Sema::ActiveTemplateInstantiation::ExceptionSpecInstantiation, clang::Sema::InNonInstantiationSFINAEContext, clang::Sema::ActiveTemplateInstantiation::InstantiationRange, clang::Sema::ActiveTemplateInstantiation::Kind, clang::Sema::ActiveTemplateInstantiation::NumTemplateArgs, clang::Sema::ActiveTemplateInstantiation::PointOfInstantiation, and clang::Sema::ActiveTemplateInstantiation::TemplateArgs.
| Sema::InstantiatingTemplate::InstantiatingTemplate | ( | Sema & | SemaRef, |
| SourceLocation | PointOfInstantiation, | ||
| TemplateDecl * | Template, | ||
| const TemplateArgument * | TemplateArgs, | ||
| unsigned | NumTemplateArgs, | ||
| SourceRange | InstantiationRange = SourceRange() |
||
| ) |
Note that we are instantiating a default argument in a template-id.
Definition at line 217 of file SemaTemplateInstantiate.cpp.
References clang::Sema::ActiveTemplateInstantiations, clang::Sema::ActiveTemplateInstantiation::DefaultTemplateArgumentInstantiation, clang::Sema::ActiveTemplateInstantiation::Entity, clang::Sema::InNonInstantiationSFINAEContext, clang::Sema::ActiveTemplateInstantiation::InstantiationRange, clang::Sema::ActiveTemplateInstantiation::Kind, clang::Sema::ActiveTemplateInstantiation::NumTemplateArgs, clang::Sema::ActiveTemplateInstantiation::PointOfInstantiation, and clang::Sema::ActiveTemplateInstantiation::TemplateArgs.
| Sema::InstantiatingTemplate::InstantiatingTemplate | ( | Sema & | SemaRef, |
| SourceLocation | PointOfInstantiation, | ||
| FunctionTemplateDecl * | FunctionTemplate, | ||
| const TemplateArgument * | TemplateArgs, | ||
| unsigned | NumTemplateArgs, | ||
| ActiveTemplateInstantiation::InstantiationKind | Kind, | ||
| sema::TemplateDeductionInfo & | DeductionInfo, | ||
| SourceRange | InstantiationRange = SourceRange() |
||
| ) |
Note that we are instantiating a default argument in a template-id.
Definition at line 243 of file SemaTemplateInstantiate.cpp.
References clang::Sema::ActiveTemplateInstantiations, clang::Sema::ActiveTemplateInstantiation::DeductionInfo, clang::Sema::ActiveTemplateInstantiation::Entity, clang::Sema::InNonInstantiationSFINAEContext, clang::Sema::ActiveTemplateInstantiation::InstantiationRange, clang::Sema::ActiveTemplateInstantiation::isInstantiationRecord(), clang::Sema::ActiveTemplateInstantiation::Kind, clang::Sema::NonInstantiationEntries, clang::Sema::ActiveTemplateInstantiation::NumTemplateArgs, clang::Sema::ActiveTemplateInstantiation::PointOfInstantiation, and clang::Sema::ActiveTemplateInstantiation::TemplateArgs.
| Sema::InstantiatingTemplate::InstantiatingTemplate | ( | Sema & | SemaRef, |
| SourceLocation | PointOfInstantiation, | ||
| ClassTemplatePartialSpecializationDecl * | PartialSpec, | ||
| const TemplateArgument * | TemplateArgs, | ||
| unsigned | NumTemplateArgs, | ||
| 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 274 of file SemaTemplateInstantiate.cpp.
References clang::Sema::ActiveTemplateInstantiations, clang::Sema::ActiveTemplateInstantiation::DeducedTemplateArgumentSubstitution, clang::Sema::ActiveTemplateInstantiation::DeductionInfo, clang::Sema::ActiveTemplateInstantiation::Entity, clang::Sema::InNonInstantiationSFINAEContext, clang::Sema::ActiveTemplateInstantiation::InstantiationRange, clang::Sema::ActiveTemplateInstantiation::isInstantiationRecord(), clang::Sema::ActiveTemplateInstantiation::Kind, clang::Sema::NonInstantiationEntries, clang::Sema::ActiveTemplateInstantiation::NumTemplateArgs, clang::Sema::ActiveTemplateInstantiation::PointOfInstantiation, and clang::Sema::ActiveTemplateInstantiation::TemplateArgs.
| Sema::InstantiatingTemplate::InstantiatingTemplate | ( | Sema & | SemaRef, |
| SourceLocation | PointOfInstantiation, | ||
| ParmVarDecl * | Param, | ||
| const TemplateArgument * | TemplateArgs, | ||
| unsigned | NumTemplateArgs, | ||
| SourceRange | InstantiationRange = SourceRange() |
||
| ) |
Definition at line 302 of file SemaTemplateInstantiate.cpp.
References clang::Sema::ActiveTemplateInstantiations, clang::Sema::ActiveTemplateInstantiation::DefaultFunctionArgumentInstantiation, clang::Sema::ActiveTemplateInstantiation::Entity, clang::Sema::InNonInstantiationSFINAEContext, clang::Sema::ActiveTemplateInstantiation::InstantiationRange, clang::Sema::ActiveTemplateInstantiation::Kind, clang::Sema::ActiveTemplateInstantiation::NumTemplateArgs, Param, clang::Sema::ActiveTemplateInstantiation::PointOfInstantiation, and clang::Sema::ActiveTemplateInstantiation::TemplateArgs.
| Sema::InstantiatingTemplate::InstantiatingTemplate | ( | Sema & | SemaRef, |
| SourceLocation | PointOfInstantiation, | ||
| NamedDecl * | Template, | ||
| NonTypeTemplateParmDecl * | Param, | ||
| const TemplateArgument * | TemplateArgs, | ||
| unsigned | NumTemplateArgs, | ||
| SourceRange | InstantiationRange | ||
| ) |
Note that we are substituting prior template arguments into a non-type or template template parameter.
Definition at line 329 of file SemaTemplateInstantiate.cpp.
References clang::Sema::ActiveTemplateInstantiations, clang::Sema::ActiveTemplateInstantiation::Entity, clang::Sema::InNonInstantiationSFINAEContext, clang::Sema::ActiveTemplateInstantiation::InstantiationRange, clang::Sema::ActiveTemplateInstantiation::isInstantiationRecord(), clang::Sema::ActiveTemplateInstantiation::Kind, clang::Sema::NonInstantiationEntries, clang::Sema::ActiveTemplateInstantiation::NumTemplateArgs, Param, clang::Sema::ActiveTemplateInstantiation::PointOfInstantiation, clang::Sema::ActiveTemplateInstantiation::PriorTemplateArgumentSubstitution, clang::Sema::ActiveTemplateInstantiation::Template, and clang::Sema::ActiveTemplateInstantiation::TemplateArgs.
| Sema::InstantiatingTemplate::InstantiatingTemplate | ( | Sema & | SemaRef, |
| SourceLocation | PointOfInstantiation, | ||
| NamedDecl * | Template, | ||
| TemplateTemplateParmDecl * | Param, | ||
| const TemplateArgument * | TemplateArgs, | ||
| unsigned | NumTemplateArgs, | ||
| SourceRange | InstantiationRange | ||
| ) |
Definition at line 357 of file SemaTemplateInstantiate.cpp.
References clang::Sema::ActiveTemplateInstantiations, clang::Sema::ActiveTemplateInstantiation::Entity, clang::Sema::InNonInstantiationSFINAEContext, clang::Sema::ActiveTemplateInstantiation::InstantiationRange, clang::Sema::ActiveTemplateInstantiation::isInstantiationRecord(), clang::Sema::ActiveTemplateInstantiation::Kind, clang::Sema::NonInstantiationEntries, clang::Sema::ActiveTemplateInstantiation::NumTemplateArgs, Param, clang::Sema::ActiveTemplateInstantiation::PointOfInstantiation, clang::Sema::ActiveTemplateInstantiation::PriorTemplateArgumentSubstitution, clang::Sema::ActiveTemplateInstantiation::Template, and clang::Sema::ActiveTemplateInstantiation::TemplateArgs.
| Sema::InstantiatingTemplate::InstantiatingTemplate | ( | Sema & | SemaRef, |
| SourceLocation | PointOfInstantiation, | ||
| TemplateDecl * | Template, | ||
| NamedDecl * | Param, | ||
| const TemplateArgument * | TemplateArgs, | ||
| unsigned | NumTemplateArgs, | ||
| SourceRange | InstantiationRange | ||
| ) |
Note that we are checking the default template argument against the template parameter for a given template-id.
Definition at line 384 of file SemaTemplateInstantiate.cpp.
References clang::Sema::ActiveTemplateInstantiations, clang::Sema::ActiveTemplateInstantiation::DefaultTemplateArgumentChecking, clang::Sema::ActiveTemplateInstantiation::Entity, clang::Sema::InNonInstantiationSFINAEContext, clang::Sema::ActiveTemplateInstantiation::InstantiationRange, clang::Sema::ActiveTemplateInstantiation::isInstantiationRecord(), clang::Sema::ActiveTemplateInstantiation::Kind, clang::Sema::NonInstantiationEntries, clang::Sema::ActiveTemplateInstantiation::NumTemplateArgs, Param, clang::Sema::ActiveTemplateInstantiation::PointOfInstantiation, clang::Sema::ActiveTemplateInstantiation::Template, and clang::Sema::ActiveTemplateInstantiation::TemplateArgs.
| clang::Sema::InstantiatingTemplate::~InstantiatingTemplate | ( | ) | [inline] |
| void Sema::InstantiatingTemplate::Clear | ( | ) |
Note that we have finished instantiating this template.
Definition at line 411 of file SemaTemplateInstantiate.cpp.
Referenced by ~InstantiatingTemplate().
| clang::Sema::InstantiatingTemplate::operator bool | ( | ) | const [inline] |