class VarTemplateDecl

Declaration

class VarTemplateDecl : public RedeclarableTemplateDecl { /* full declaration omitted */ };

Description

Declaration of a variable template.

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

Inherits from: RedeclarableTemplateDecl

Member Variables

Inherited from RedeclarableTemplateDecl:

protected Common = nullptr

Inherited from TemplateDecl:

protected TemplatedDecl
protected TemplateParams

Inherited from Decl:

protected NextInContextAndBits
protected Access
protected FromASTFile
protected IdentifierNamespace
protected CacheValidAndLinkage

Method Overview

Inherited from RedeclarableTemplateDecl:

Inherited from TemplateDecl:

Inherited from NamedDecl:

Inherited from Decl:

Methods

void AddPartialSpecialization(
    clang::VarTemplatePartialSpecializationDecl*
        D,
    void* InsertPos)

Description

Insert the specified partial specialization knowing that it is not already in. InsertPos must be obtained from findPartialSpecialization.

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

Parameters

clang::VarTemplatePartialSpecializationDecl* D
void* InsertPos

void AddSpecialization(
    clang::VarTemplateSpecializationDecl* D,
    void* InsertPos)

Description

Insert the specified specialization knowing that it is not already in. InsertPos must be obtained from findSpecialization.

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

Parameters

clang::VarTemplateSpecializationDecl* D
void* InsertPos

static clang::VarTemplateDecl* Create(
    clang::ASTContext& C,
    clang::DeclContext* DC,
    clang::SourceLocation L,
    clang::DeclarationName Name,
    clang::TemplateParameterList* Params,
    clang::VarDecl* Decl)

Description

Create a variable template node.

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

Parameters

clang::ASTContext& C
clang::DeclContext* DC
clang::SourceLocation L
clang::DeclarationName Name
clang::TemplateParameterList* Params
clang::VarDecl* Decl

static clang::VarTemplateDecl* CreateDeserialized(
    clang::ASTContext& C,
    unsigned int ID)

Description

Create an empty variable template node.

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

Parameters

clang::ASTContext& C
unsigned int ID

void LoadLazySpecializations() const

Description

Load any lazily-loaded specializations from the external source.

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

VarTemplateDecl(
    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:3132

Parameters

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

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

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

Parameters

const clang::Decl* D

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

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

Parameters

clang::Decl::Kind K

clang::VarTemplatePartialSpecializationDecl*
findPartialSpecInstantiatedFromMember(
    clang::VarTemplatePartialSpecializationDecl*
        D)

Description

Find a variable template partial specialization which was instantiated from the given member partial specialization.

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

Parameters

clang::VarTemplatePartialSpecializationDecl* D
a member variable template partial specialization.

Returns

the variable template partial specialization which was instantiated from the given member partial specialization, or nullptr if no such partial specialization exists.

clang::VarTemplatePartialSpecializationDecl*
findPartialSpecialization(
    ArrayRef<clang::TemplateArgument> Args,
    clang::TemplateParameterList* TPL,
    void*& InsertPos)

Description

Return the partial specialization with the provided arguments if it exists, otherwise return the insertion point.

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

Parameters

ArrayRef<clang::TemplateArgument> Args
clang::TemplateParameterList* TPL
void*& InsertPos

clang::VarTemplateSpecializationDecl*
findSpecialization(
    ArrayRef<clang::TemplateArgument> Args,
    void*& InsertPos)

Description

Return the specialization with the provided arguments if it exists, otherwise return the insertion point.

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

Parameters

ArrayRef<clang::TemplateArgument> Args
void*& InsertPos

const clang::VarTemplateDecl* getCanonicalDecl()
    const

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

clang::VarTemplateDecl* getCanonicalDecl()

Description

Retrieves the canonical declaration of this template.

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

clang::VarTemplateDecl::Common* getCommonPtr()
    const

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

clang::VarTemplateDecl* getDefinition()

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

clang::VarTemplateDecl*
getInstantiatedFromMemberTemplate() const

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

clang::VarTemplateDecl* getMostRecentDecl()

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

const clang::VarTemplateDecl* getMostRecentDecl()
    const

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

void getPartialSpecializations(
    SmallVectorImpl<
        clang::
            VarTemplatePartialSpecializationDecl*>&
        PS) const

Description

Retrieve the partial specializations as an ordered list.

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

Parameters

SmallVectorImpl< clang::VarTemplatePartialSpecializationDecl*>& PS

llvm::FoldingSetVector<
    VarTemplatePartialSpecializationDecl>&
getPartialSpecializations() const

Description

Retrieve the set of partial specializations of this class template.

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

clang::VarTemplateDecl* getPreviousDecl()

Description

Retrieve the previous declaration of this variable template, or nullptr if no such declaration exists.

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

const clang::VarTemplateDecl* getPreviousDecl()
    const

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

llvm::FoldingSetVector<
    VarTemplateSpecializationDecl>&
getSpecializations() const

Description

Retrieve the set of specializations of this variable template.

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

clang::VarDecl* getTemplatedDecl() const

Description

Get the underlying variable declarations of the template.

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

bool isThisDeclarationADefinition() const

Description

Returns whether this template declaration defines the primary variable pattern.

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

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

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

Parameters

clang::ASTContext& C

clang::VarTemplateDecl::spec_iterator spec_begin()
    const

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

clang::VarTemplateDecl::spec_iterator spec_end()
    const

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

clang::VarTemplateDecl::spec_range
specializations() const

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