clang API Documentation
#include <DeclTemplate.h>
Public Member Functions | |
VarTemplatePartialSpecializationDecl * | getMostRecentDecl () |
Returns the most recent (re)declaration of this declaration. | |
TemplateParameterList * | getTemplateParameters () const |
Get the list of template parameters. | |
const ASTTemplateArgumentListInfo * | getTemplateArgsAsWritten () const |
Get the template arguments as written. | |
VarTemplatePartialSpecializationDecl * | getInstantiatedFromMember () |
Retrieve the member variable template partial specialization from which this particular variable template partial specialization was instantiated. | |
void | setInstantiatedFromMember (VarTemplatePartialSpecializationDecl *PartialSpec) |
bool | isMemberSpecialization () |
Determines whether this variable template partial specialization was a specialization of a member partial specialization. | |
void | setMemberSpecialization () |
Note that this member template is a specialization. | |
Static Public Member Functions | |
static VarTemplatePartialSpecializationDecl * | Create (ASTContext &Context, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, TemplateParameterList *Params, VarTemplateDecl *SpecializedTemplate, QualType T, TypeSourceInfo *TInfo, StorageClass S, const TemplateArgument *Args, unsigned NumArgs, const TemplateArgumentListInfo &ArgInfos) |
static VarTemplatePartialSpecializationDecl * | CreateDeserialized (ASTContext &C, unsigned ID) |
static bool | classof (const Decl *D) |
static bool | classofKind (Kind K) |
Friends | |
class | ASTDeclReader |
class | ASTDeclWriter |
Definition at line 2507 of file DeclTemplate.h.
static bool clang::VarTemplatePartialSpecializationDecl::classof | ( | const Decl * | D | ) | [inline, static] |
Reimplemented from clang::VarTemplateSpecializationDecl.
Definition at line 2629 of file DeclTemplate.h.
References classofKind(), and clang::Decl::getKind().
static bool clang::VarTemplatePartialSpecializationDecl::classofKind | ( | Kind | K | ) | [inline, static] |
Reimplemented from clang::VarTemplateSpecializationDecl.
Definition at line 2630 of file DeclTemplate.h.
Referenced by classof().
VarTemplatePartialSpecializationDecl * VarTemplatePartialSpecializationDecl::Create | ( | ASTContext & | Context, |
DeclContext * | DC, | ||
SourceLocation | StartLoc, | ||
SourceLocation | IdLoc, | ||
TemplateParameterList * | Params, | ||
VarTemplateDecl * | SpecializedTemplate, | ||
QualType | T, | ||
TypeSourceInfo * | TInfo, | ||
StorageClass | S, | ||
const TemplateArgument * | Args, | ||
unsigned | NumArgs, | ||
const TemplateArgumentListInfo & | ArgInfos | ||
) | [static] |
Definition at line 1136 of file DeclTemplate.cpp.
References Context, clang::VarTemplateSpecializationDecl::setSpecializationKind(), and clang::TSK_ExplicitSpecialization.
Referenced by clang::Sema::ActOnVarTemplateSpecialization(), and clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization().
VarTemplatePartialSpecializationDecl * VarTemplatePartialSpecializationDecl::CreateDeserialized | ( | ASTContext & | C, |
unsigned | ID | ||
) | [static] |
Reimplemented from clang::VarTemplateSpecializationDecl.
Definition at line 1154 of file DeclTemplate.cpp.
References AttributeLangSupport::C.
VarTemplatePartialSpecializationDecl* clang::VarTemplatePartialSpecializationDecl::getInstantiatedFromMember | ( | ) | [inline] |
Retrieve the member variable template partial specialization from which this particular variable template partial specialization was instantiated.
template<typename T> struct Outer { template<typename U> U Inner; template<typename U> U* Inner<U*> = (U*)(0); // #1 }; template int* Outer<float>::Inner<int*>;
In this example, the instantiation of Outer<float>::Inner<int*>
will end up instantiating the partial specialization Outer<float>::Inner<U*>
, which itself was instantiated from the variable template partial specialization Outer<T>::Inner<U*>
. Given Outer<float>::Inner<U*>
, this function would return Outer<T>::Inner<U*>
.
Definition at line 2585 of file DeclTemplate.h.
References clang::Redeclarable< VarDecl >::getFirstDecl().
Referenced by clang::Sema::ActOnVarTemplateSpecialization(), clang::Sema::InstantiateVariableDefinition(), and clang::ASTDeclWriter::VisitVarTemplatePartialSpecializationDecl().
VarTemplatePartialSpecializationDecl* clang::VarTemplatePartialSpecializationDecl::getMostRecentDecl | ( | ) | [inline] |
Returns the most recent (re)declaration of this declaration.
Reimplemented from clang::VarTemplateSpecializationDecl.
Definition at line 2549 of file DeclTemplate.h.
const ASTTemplateArgumentListInfo* clang::VarTemplatePartialSpecializationDecl::getTemplateArgsAsWritten | ( | ) | const [inline] |
Get the template arguments as written.
Definition at line 2561 of file DeclTemplate.h.
Referenced by FinishTemplateArgumentDeduction(), clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), and clang::ASTDeclWriter::VisitVarTemplatePartialSpecializationDecl().
TemplateParameterList* clang::VarTemplatePartialSpecializationDecl::getTemplateParameters | ( | ) | const [inline] |
Get the list of template parameters.
Definition at line 2556 of file DeclTemplate.h.
Referenced by clang::Sema::DeduceTemplateArguments(), FinishTemplateArgumentDeduction(), clang::Sema::getMoreSpecializedPartialSpecialization(), clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), and clang::ASTDeclWriter::VisitVarTemplatePartialSpecializationDecl().
Determines whether this variable template partial specialization was a specialization of a member partial specialization.
In the following example, the member template partial specialization X<int>::Inner<T*>
is a member specialization.
template<typename T> struct X { template<typename U> U Inner; template<typename U> U* Inner<U*> = (U*)(0); }; template<> template<typename T> U* X<int>::Inner<T*> = (T*)(0) + 1;
Definition at line 2614 of file DeclTemplate.h.
References clang::Redeclarable< VarDecl >::getFirstDecl().
Referenced by clang::Sema::InstantiateVariableDefinition(), and clang::ASTDeclWriter::VisitVarTemplatePartialSpecializationDecl().
void clang::VarTemplatePartialSpecializationDecl::setInstantiatedFromMember | ( | VarTemplatePartialSpecializationDecl * | PartialSpec | ) | [inline] |
Definition at line 2592 of file DeclTemplate.h.
References clang::Redeclarable< VarDecl >::getFirstDecl().
Referenced by clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization().
void clang::VarTemplatePartialSpecializationDecl::setMemberSpecialization | ( | ) | [inline] |
Note that this member template is a specialization.
Definition at line 2621 of file DeclTemplate.h.
References clang::Redeclarable< VarDecl >::getFirstDecl().
Referenced by clang::Sema::ActOnVarTemplateSpecialization().
friend class ASTDeclReader [friend] |
Reimplemented from clang::VarTemplateSpecializationDecl.
Definition at line 2634 of file DeclTemplate.h.
friend class ASTDeclWriter [friend] |
Reimplemented from clang::VarTemplateSpecializationDecl.
Definition at line 2635 of file DeclTemplate.h.