clang API Documentation
#include <DeclTemplate.h>
Public Member Functions | |
ClassTemplatePartialSpecializationDecl * | 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. | |
ClassTemplatePartialSpecializationDecl * | getInstantiatedFromMember () |
Retrieve the member class template partial specialization from which this particular class template partial specialization was instantiated. | |
void | setInstantiatedFromMember (ClassTemplatePartialSpecializationDecl *PartialSpec) |
bool | isMemberSpecialization () |
Determines whether this class template partial specialization template was a specialization of a member partial specialization. | |
void | setMemberSpecialization () |
Note that this member template is a specialization. | |
QualType | getInjectedSpecializationType () const |
Static Public Member Functions | |
static ClassTemplatePartialSpecializationDecl * | Create (ASTContext &Context, TagKind TK, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, TemplateParameterList *Params, ClassTemplateDecl *SpecializedTemplate, const TemplateArgument *Args, unsigned NumArgs, const TemplateArgumentListInfo &ArgInfos, QualType CanonInjectedType, ClassTemplatePartialSpecializationDecl *PrevDecl) |
static ClassTemplatePartialSpecializationDecl * | CreateDeserialized (ASTContext &C, unsigned ID) |
static bool | classof (const Decl *D) |
static bool | classofKind (Kind K) |
Friends | |
class | ASTDeclReader |
class | ASTDeclWriter |
Definition at line 1650 of file DeclTemplate.h.
static bool clang::ClassTemplatePartialSpecializationDecl::classof | ( | const Decl * | D | ) | [inline, static] |
Reimplemented from clang::ClassTemplateSpecializationDecl.
Definition at line 1791 of file DeclTemplate.h.
References classofKind(), and clang::Decl::getKind().
static bool clang::ClassTemplatePartialSpecializationDecl::classofKind | ( | Kind | K | ) | [inline, static] |
Reimplemented from clang::ClassTemplateSpecializationDecl.
Definition at line 1792 of file DeclTemplate.h.
Referenced by classof().
ClassTemplatePartialSpecializationDecl * ClassTemplatePartialSpecializationDecl::Create | ( | ASTContext & | Context, |
TagKind | TK, | ||
DeclContext * | DC, | ||
SourceLocation | StartLoc, | ||
SourceLocation | IdLoc, | ||
TemplateParameterList * | Params, | ||
ClassTemplateDecl * | SpecializedTemplate, | ||
const TemplateArgument * | Args, | ||
unsigned | NumArgs, | ||
const TemplateArgumentListInfo & | ArgInfos, | ||
QualType | CanonInjectedType, | ||
ClassTemplatePartialSpecializationDecl * | PrevDecl | ||
) | [static] |
Definition at line 825 of file DeclTemplate.cpp.
References Context, clang::ASTContext::getInjectedClassNameType(), clang::TagDecl::MayHaveOutOfDateDef, clang::ClassTemplateSpecializationDecl::setSpecializationKind(), and clang::TSK_ExplicitSpecialization.
Referenced by clang::Sema::ActOnClassTemplateSpecialization(), and clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization().
ClassTemplatePartialSpecializationDecl * ClassTemplatePartialSpecializationDecl::CreateDeserialized | ( | ASTContext & | C, |
unsigned | ID | ||
) | [static] |
Reimplemented from clang::ClassTemplateSpecializationDecl.
Definition at line 849 of file DeclTemplate.cpp.
References AttributeLangSupport::C, and clang::TagDecl::MayHaveOutOfDateDef.
QualType clang::ClassTemplatePartialSpecializationDecl::getInjectedSpecializationType | ( | ) | const [inline] |
Retrieves the injected specialization type for this partial specialization. This is not the same as the type-decl-type for this partial specialization, which is an InjectedClassNameType.
Definition at line 1783 of file DeclTemplate.h.
References clang::TypeDecl::getTypeForDecl().
Referenced by clang::Sema::getMoreSpecializedPartialSpecialization().
ClassTemplatePartialSpecializationDecl* clang::ClassTemplatePartialSpecializationDecl::getInstantiatedFromMember | ( | ) | [inline] |
Retrieve the member class template partial specialization from which this particular class template partial specialization was instantiated.
template<typename T> struct Outer { template<typename U> struct Inner; template<typename U> struct Inner<U*> { }; // #1 }; Outer<float>::Inner<int*> ii;
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 class template partial specialization Outer<T>::Inner<U*>
. Given Outer<float>::Inner<U*>
, this function would return Outer<T>::Inner<U*>
.
Definition at line 1736 of file DeclTemplate.h.
References clang::Redeclarable< TagDecl >::getFirstDecl().
Referenced by clang::Sema::ActOnClassTemplateSpecialization(), clang::ClassTemplateSpecializationDecl::getSourceRange(), clang::Sema::InstantiateClassTemplateSpecialization(), isInstantiationOf(), and clang::ASTDeclWriter::VisitClassTemplatePartialSpecializationDecl().
ClassTemplatePartialSpecializationDecl* clang::ClassTemplatePartialSpecializationDecl::getMostRecentDecl | ( | ) | [inline] |
Returns the most recent (re)declaration of this declaration.
Reimplemented from clang::ClassTemplateSpecializationDecl.
Definition at line 1700 of file DeclTemplate.h.
const ASTTemplateArgumentListInfo* clang::ClassTemplatePartialSpecializationDecl::getTemplateArgsAsWritten | ( | ) | const [inline] |
Get the template arguments as written.
Definition at line 1712 of file DeclTemplate.h.
Referenced by FinishTemplateArgumentDeduction(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), and clang::ASTDeclWriter::VisitClassTemplatePartialSpecializationDecl().
TemplateParameterList* clang::ClassTemplatePartialSpecializationDecl::getTemplateParameters | ( | ) | const [inline] |
Get the list of template parameters.
Definition at line 1707 of file DeclTemplate.h.
Referenced by clang::Sema::DeduceTemplateArguments(), clang::comments::DeclInfo::fill(), FinishTemplateArgumentDeduction(), clang::Sema::getMoreSpecializedPartialSpecialization(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), and clang::ASTDeclWriter::VisitClassTemplatePartialSpecializationDecl().
Determines whether this class template partial specialization template 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> struct Inner; template<typename U> struct Inner<U*>; }; template<> template<typename T> struct X<int>::Inner<T*> { /* ... */ };
Definition at line 1765 of file DeclTemplate.h.
References clang::Redeclarable< TagDecl >::getFirstDecl().
Referenced by clang::Sema::InstantiateClassTemplateSpecialization(), and clang::ASTDeclWriter::VisitClassTemplatePartialSpecializationDecl().
void clang::ClassTemplatePartialSpecializationDecl::setInstantiatedFromMember | ( | ClassTemplatePartialSpecializationDecl * | PartialSpec | ) | [inline] |
Definition at line 1742 of file DeclTemplate.h.
References clang::Redeclarable< TagDecl >::getFirstDecl().
Referenced by clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization().
void clang::ClassTemplatePartialSpecializationDecl::setMemberSpecialization | ( | ) | [inline] |
Note that this member template is a specialization.
Definition at line 1772 of file DeclTemplate.h.
References clang::Redeclarable< TagDecl >::getFirstDecl().
Referenced by clang::Sema::ActOnClassTemplateSpecialization().
friend class ASTDeclReader [friend] |
Reimplemented from clang::ClassTemplateSpecializationDecl.
Definition at line 1796 of file DeclTemplate.h.
friend class ASTDeclWriter [friend] |
Reimplemented from clang::ClassTemplateSpecializationDecl.
Definition at line 1797 of file DeclTemplate.h.