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, 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.

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 5571 of file Sema.h.


Constructor & Destructor Documentation

Sema::InstantiatingTemplate::InstantiatingTemplate ( Sema SemaRef,
SourceLocation  PointOfInstantiation,
Decl Entity,
SourceRange  InstantiationRange = SourceRange() 
)
Sema::InstantiatingTemplate::InstantiatingTemplate ( Sema SemaRef,
SourceLocation  PointOfInstantiation,
FunctionDecl Entity,
ExceptionSpecification  ,
SourceRange  InstantiationRange = SourceRange() 
)
Sema::InstantiatingTemplate::InstantiatingTemplate ( Sema SemaRef,
SourceLocation  PointOfInstantiation,
TemplateDecl Template,
const TemplateArgument TemplateArgs,
unsigned  NumTemplateArgs,
SourceRange  InstantiationRange = SourceRange() 
)
Sema::InstantiatingTemplate::InstantiatingTemplate ( Sema SemaRef,
SourceLocation  PointOfInstantiation,
FunctionTemplateDecl FunctionTemplate,
const TemplateArgument TemplateArgs,
unsigned  NumTemplateArgs,
ActiveTemplateInstantiation::InstantiationKind  Kind,
sema::TemplateDeductionInfo DeductionInfo,
SourceRange  InstantiationRange = SourceRange() 
)
Sema::InstantiatingTemplate::InstantiatingTemplate ( Sema SemaRef,
SourceLocation  PointOfInstantiation,
ClassTemplatePartialSpecializationDecl PartialSpec,
const TemplateArgument TemplateArgs,
unsigned  NumTemplateArgs,
sema::TemplateDeductionInfo DeductionInfo,
SourceRange  InstantiationRange = SourceRange() 
)
Sema::InstantiatingTemplate::InstantiatingTemplate ( Sema SemaRef,
SourceLocation  PointOfInstantiation,
ParmVarDecl Param,
const TemplateArgument TemplateArgs,
unsigned  NumTemplateArgs,
SourceRange  InstantiationRange = SourceRange() 
)
Sema::InstantiatingTemplate::InstantiatingTemplate ( Sema SemaRef,
SourceLocation  PointOfInstantiation,
NamedDecl Template,
NonTypeTemplateParmDecl Param,
const TemplateArgument TemplateArgs,
unsigned  NumTemplateArgs,
SourceRange  InstantiationRange 
)
Sema::InstantiatingTemplate::InstantiatingTemplate ( Sema SemaRef,
SourceLocation  PointOfInstantiation,
NamedDecl Template,
TemplateTemplateParmDecl Param,
const TemplateArgument TemplateArgs,
unsigned  NumTemplateArgs,
SourceRange  InstantiationRange 
)
Sema::InstantiatingTemplate::InstantiatingTemplate ( Sema SemaRef,
SourceLocation  PointOfInstantiation,
TemplateDecl Template,
NamedDecl Param,
const TemplateArgument TemplateArgs,
unsigned  NumTemplateArgs,
SourceRange  InstantiationRange 
)
clang::Sema::InstantiatingTemplate::~InstantiatingTemplate ( ) [inline]

Definition at line 5648 of file Sema.h.

References Clear().


Member Function Documentation

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]

Determines whether we have exceeded the maximum recursive template instantiations.

Definition at line 5652 of file Sema.h.


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