clang API Documentation

Classes | Public Member Functions
clang::Sema::InstantiatingTemplate Struct Reference

A stack object to be created when performing template instantiation. More...

#include <Sema.h>

List of all members.

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, ArrayRef< TemplateArgument > TemplateArgs, SourceRange InstantiationRange=SourceRange())
 Note that we are instantiating a default argument in a template-id.
 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.
 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.
 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.
 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.
 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.
 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.
void Clear ()
 Note that we have finished instantiating this template.
 ~InstantiatingTemplate ()
bool isInvalid () const
 Determines whether we have exceeded the maximum recursive template instantiations.

Detailed Description

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.

Definition at line 6471 of file Sema.h.


Constructor & Destructor Documentation

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 229 of file SemaTemplateInstantiate.cpp.

References 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 239 of file SemaTemplateInstantiate.cpp.

References clang::Sema::ActiveTemplateInstantiation::ExceptionSpecInstantiation.

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 249 of file SemaTemplateInstantiate.cpp.

References clang::Sema::ActiveTemplateInstantiation::DefaultTemplateArgumentInstantiation.

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 261 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 274 of file SemaTemplateInstantiate.cpp.

References clang::Sema::ActiveTemplateInstantiation::DeducedTemplateArgumentSubstitution.

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 286 of file SemaTemplateInstantiate.cpp.

References clang::Sema::ActiveTemplateInstantiation::DeducedTemplateArgumentSubstitution.

Sema::InstantiatingTemplate::InstantiatingTemplate ( Sema SemaRef,
SourceLocation  PointOfInstantiation,
ParmVarDecl Param,
ArrayRef< TemplateArgument TemplateArgs,
SourceRange  InstantiationRange = SourceRange() 
)
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 312 of file SemaTemplateInstantiate.cpp.

References clang::Sema::ActiveTemplateInstantiation::PriorTemplateArgumentSubstitution.

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 324 of file SemaTemplateInstantiate.cpp.

References clang::Sema::ActiveTemplateInstantiation::PriorTemplateArgumentSubstitution.

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 336 of file SemaTemplateInstantiate.cpp.

References clang::Sema::ActiveTemplateInstantiation::DefaultTemplateArgumentChecking.

Definition at line 6552 of file Sema.h.


Member Function Documentation

Note that we have finished instantiating this template.

Definition at line 347 of file SemaTemplateInstantiate.cpp.


The documentation for this struct was generated from the following files: