clang API Documentation
A stack-allocated class that identifies which local variable declaration instantiations are present in this scope. More...
#include <Template.h>
Public Types | |
typedef SmallVector< Decl *, 4 > | DeclArgumentPack |
A set of declarations. | |
Public Member Functions | |
LocalInstantiationScope (Sema &SemaRef, bool CombineWithOuterScope=false) | |
~LocalInstantiationScope () | |
const Sema & | getSema () const |
void | Exit () |
Exit this local instantiation scope early. | |
LocalInstantiationScope * | cloneScopes (LocalInstantiationScope *Outermost) |
Clone this scope, and all outer scopes, down to the given outermost scope. | |
llvm::PointerUnion< Decl *, DeclArgumentPack * > * | findInstantiationOf (const Decl *D) |
Find the instantiation of the declaration D within the current instantiation scope. | |
void | InstantiatedLocal (const Decl *D, Decl *Inst) |
void | InstantiatedLocalPackArg (const Decl *D, Decl *Inst) |
void | MakeInstantiatedLocalArgPack (const Decl *D) |
void | SetPartiallySubstitutedPack (NamedDecl *Pack, const TemplateArgument *ExplicitArgs, unsigned NumExplicitArgs) |
Note that the given parameter pack has been partially substituted via explicit specification of template arguments (C++0x [temp.arg.explicit]p9). | |
void | ResetPartiallySubstitutedPack () |
Reset the partially-substituted pack when it is no longer of interest. | |
NamedDecl * | getPartiallySubstitutedPack (const TemplateArgument **ExplicitArgs=nullptr, unsigned *NumExplicitArgs=nullptr) const |
Retrieve the partially-substitued template parameter pack. | |
Static Public Member Functions | |
static void | deleteScopes (LocalInstantiationScope *Scope, LocalInstantiationScope *Outermost) |
deletes the given scope, and all otuer scopes, down to the given outermost scope. |
A stack-allocated class that identifies which local variable declaration instantiations are present in this scope.
A new instance of this class type will be created whenever we instantiate a new function declaration, which will have its own set of parameter declarations.
Definition at line 178 of file Template.h.
typedef SmallVector<Decl *, 4> clang::LocalInstantiationScope::DeclArgumentPack |
A set of declarations.
Definition at line 181 of file Template.h.
clang::LocalInstantiationScope::LocalInstantiationScope | ( | Sema & | SemaRef, |
bool | CombineWithOuterScope = false |
||
) | [inline] |
Definition at line 246 of file Template.h.
Definition at line 254 of file Template.h.
References Exit().
LocalInstantiationScope* clang::LocalInstantiationScope::cloneScopes | ( | LocalInstantiationScope * | Outermost | ) | [inline] |
Clone this scope, and all outer scopes, down to the given outermost scope.
Definition at line 274 of file Template.h.
References cloneScopes().
Referenced by cloneScopes(), and clang::Sema::InstantiateAttrs().
static void clang::LocalInstantiationScope::deleteScopes | ( | LocalInstantiationScope * | Scope, |
LocalInstantiationScope * | Outermost | ||
) | [inline, static] |
deletes the given scope, and all otuer scopes, down to the given outermost scope.
Definition at line 307 of file Template.h.
Referenced by clang::Sema::InstantiateClass().
void clang::LocalInstantiationScope::Exit | ( | ) | [inline] |
Exit this local instantiation scope early.
Definition at line 261 of file Template.h.
References clang::Sema::CurrentInstantiationScope.
Referenced by clang::Sema::InstantiateFunctionDefinition(), clang::Sema::InstantiateVariableDefinition(), and ~LocalInstantiationScope().
llvm::PointerUnion< Decl *, LocalInstantiationScope::DeclArgumentPack * > * LocalInstantiationScope::findInstantiationOf | ( | const Decl * | D | ) |
Find the instantiation of the declaration D within the current instantiation scope.
D | The declaration whose instantiation we are searching for. |
D
is instantiated, if found. Otherwise, returns NULL. Definition at line 2779 of file SemaTemplateInstantiate.cpp.
References Current, getCanonicalParmVarDecl(), and clang::Decl::getPreviousDecl().
Referenced by clang::Sema::CheckParameterPacksForExpansion(), clang::Sema::FindInstantiatedDecl(), and clang::Sema::getNumArgumentsInExpansion().
NamedDecl * LocalInstantiationScope::getPartiallySubstitutedPack | ( | const TemplateArgument ** | ExplicitArgs = nullptr , |
unsigned * | NumExplicitArgs = nullptr |
||
) | const |
Retrieve the partially-substitued template parameter pack.
If there is no partially-substituted parameter pack, returns NULL.
Definition at line 2857 of file SemaTemplateInstantiate.cpp.
References Current.
Referenced by clang::Sema::CheckParameterPacksForExpansion(), and PackDeductionScope::PackDeductionScope().
const Sema& clang::LocalInstantiationScope::getSema | ( | ) | const [inline] |
Definition at line 258 of file Template.h.
void LocalInstantiationScope::InstantiatedLocal | ( | const Decl * | D, |
Decl * | Inst | ||
) |
Definition at line 2817 of file SemaTemplateInstantiate.cpp.
References getCanonicalParmVarDecl().
Referenced by addInstantiatedParametersToScope(), clang::Sema::BuildVariableInstantiation(), clang::Sema::FindInstantiatedDecl(), clang::TemplateDeclInstantiator::InstantiateEnumDefinition(), RebuildLambdaScopeInfo(), clang::TemplateDeclInstantiator::SubstFunctionType(), and clang::Sema::SubstParmVarDecl().
void LocalInstantiationScope::InstantiatedLocalPackArg | ( | const Decl * | D, |
Decl * | Inst | ||
) |
Definition at line 2828 of file SemaTemplateInstantiate.cpp.
References getCanonicalParmVarDecl().
Referenced by addInstantiatedParametersToScope(), clang::TemplateDeclInstantiator::SubstFunctionType(), and clang::Sema::SubstParmVarDecl().
void LocalInstantiationScope::MakeInstantiatedLocalArgPack | ( | const Decl * | D | ) |
Definition at line 2835 of file SemaTemplateInstantiate.cpp.
References getCanonicalParmVarDecl().
Referenced by addInstantiatedParametersToScope(), and clang::TemplateDeclInstantiator::SubstFunctionType().
void clang::LocalInstantiationScope::ResetPartiallySubstitutedPack | ( | ) | [inline] |
Reset the partially-substituted pack when it is no longer of interest.
Definition at line 349 of file Template.h.
void LocalInstantiationScope::SetPartiallySubstitutedPack | ( | NamedDecl * | Pack, |
const TemplateArgument * | ExplicitArgs, | ||
unsigned | NumExplicitArgs | ||
) |
Note that the given parameter pack has been partially substituted via explicit specification of template arguments (C++0x [temp.arg.explicit]p9).
Pack | The parameter pack, which will always be a template parameter pack. |
ExplicitArgs | The explicitly-specified template arguments provided for this parameter pack. |
NumExplicitArgs | The number of explicitly-specified template arguments provided for this parameter pack. |
Definition at line 2844 of file SemaTemplateInstantiate.cpp.