class RedeclarableTemplateDecl

Declaration

class RedeclarableTemplateDecl : public TemplateDecl,
                                 public Redeclarable { /* full declaration omitted */ };

Description

Declaration of a redeclarable template.

Declared at: clang/include/clang/AST/DeclTemplate.h:762

Inherits from: TemplateDecl, Redeclarable

Member Variables

protected clang::RedeclarableTemplateDecl::CommonBase* Common = nullptr
Pointer to the common data shared by all declarations of this template.

Inherited from TemplateDecl:

protected TemplatedDecl
protected TemplateParams

Inherited from Decl:

protected NextInContextAndBits
protected Access
protected FromASTFile
protected IdentifierNamespace
protected CacheValidAndLinkage

Method Overview

Inherited from TemplateDecl:

Inherited from NamedDecl:

Inherited from Decl:

Methods

RedeclarableTemplateDecl(
    clang::Decl::Kind DK,
    clang::ASTContext& C,
    clang::DeclContext* DC,
    clang::SourceLocation L,
    clang::DeclarationName Name,
    clang::TemplateParameterList* Params,
    clang::NamedDecl* Decl)

Declared at: clang/include/clang/AST/DeclTemplate.h:862

Parameters

clang::Decl::Kind DK
clang::ASTContext& C
clang::DeclContext* DC
clang::SourceLocation L
clang::DeclarationName Name
clang::TemplateParameterList* Params
clang::NamedDecl* Decl

template <class Derived, class EntryType>
void addSpecializationImpl(
    llvm::FoldingSetVector<EntryType>& Specs,
    EntryType* Entry,
    void* InsertPos)

Declared at: clang/include/clang/AST/DeclTemplate.h:828

Templates

Derived
EntryType

Parameters

llvm::FoldingSetVector<EntryType>& Specs
EntryType* Entry
void* InsertPos

void anchor()

Declared at: clang/include/clang/AST/DeclTemplate.h:779

static bool classof(const clang::Decl* D)

Declared at: clang/include/clang/AST/DeclTemplate.h:966

Parameters

const clang::Decl* D

static bool classofKind(clang::Decl::Kind K)

Declared at: clang/include/clang/AST/DeclTemplate.h:968

Parameters

clang::Decl::Kind K

template <class EntryType,
          typename... ProfileArguments>
typename SpecEntryTraits<EntryType>::DeclType*
findSpecializationImpl(
    llvm::FoldingSetVector<EntryType>& Specs,
    void*& InsertPos,
    ProfileArguments&&... ProfileArgs)

Declared at: clang/include/clang/AST/DeclTemplate.h:824

Templates

EntryType
ProfileArguments

Parameters

llvm::FoldingSetVector<EntryType>& Specs
void*& InsertPos
ProfileArguments&&... ProfileArgs

const clang::RedeclarableTemplateDecl*
getCanonicalDecl() const

Declared at: clang/include/clang/AST/DeclTemplate.h:877

clang::RedeclarableTemplateDecl*
getCanonicalDecl()

Description

Retrieves the canonical declaration of this template.

Declared at: clang/include/clang/AST/DeclTemplate.h:874

clang::RedeclarableTemplateDecl::CommonBase*
getCommonPtr() const

Description

Retrieves the "common" pointer shared by all (re-)declarations of the same template. Calling this routine may implicitly allocate memory for the common pointer.

Declared at: clang/include/clang/AST/DeclTemplate.h:857

clang::RedeclarableTemplateDecl*
getInstantiatedFromMemberTemplate() const

Description

Retrieve the member template from which this template was instantiated, or nullptr if this template was not instantiated from a member template. A template is instantiated from a member template when the member template itself is part of a class template (or member thereof). For example, given \c X<int>::f is a FunctionTemplateDecl that describes the function template which was itself created during the instantiation of \c X<int>. Calling getInstantiatedFromMemberTemplate() on this FunctionTemplateDecl will retrieve the FunctionTemplateDecl for the original template \c f within the class template \c X<T>, i.e.,

Declared at: clang/include/clang/AST/DeclTemplate.h:946

clang::RedeclarableTemplateDecl*
getMostRecentDeclImpl()

Description

Implementation of getMostRecentDecl(), to be overridden by any subclass that has a redeclaration chain.

Declared at: clang/include/clang/AST/DeclTemplate.h:775

clang::RedeclarableTemplateDecl*
getNextRedeclarationImpl()

Description

Returns the next redeclaration or itself if this is the only decl. Decl subclasses that can be redeclared should override this method so that Decl::redecl_iterator can iterate over them.

Declared at: clang/include/clang/AST/DeclTemplate.h:767

clang::RedeclarableTemplateDecl*
getPreviousDeclImpl()

Description

Implementation of getPreviousDecl(), to be overridden by any subclass that has a redeclaration chain.

Declared at: clang/include/clang/AST/DeclTemplate.h:771

bool isMemberSpecialization() const

Description

Determines whether this template was a specialization of a member template. In the following example, the function template \c X<int>::f and the member template \c X<int>::Inner are member specializations.

Declared at: clang/include/clang/AST/DeclTemplate.h:899

void loadLazySpecializationsImpl() const

Declared at: clang/include/clang/AST/DeclTemplate.h:820

template <typename EntryType>
static SpecIterator<EntryType> makeSpecIterator(
    llvm::FoldingSetVector<EntryType>& Specs,
    bool isEnd)

Declared at: clang/include/clang/AST/DeclTemplate.h:816

Templates

EntryType

Parameters

llvm::FoldingSetVector<EntryType>& Specs
bool isEnd

virtual clang::RedeclarableTemplateDecl::
    CommonBase*
    newCommon(clang::ASTContext& C) const

Declared at: clang/include/clang/AST/DeclTemplate.h:859

Parameters

clang::ASTContext& C

void setInstantiatedFromMemberTemplate(
    clang::RedeclarableTemplateDecl* TD)

Declared at: clang/include/clang/AST/DeclTemplate.h:950

Parameters

clang::RedeclarableTemplateDecl* TD

void setMemberSpecialization()

Description

Note that this member template is a specialization.

Declared at: clang/include/clang/AST/DeclTemplate.h:904