class TemplateName

Declaration

class TemplateName { /* full declaration omitted */ };

Description

Represents a C++ template name within the type system. A C++ template name refers to a template within the C++ type system. In most cases, a template name is simply a reference to a class template, e.g. Here, the 'X' in \c X<int> is a template name that refers to the declaration of the class template X, above. Template names can also refer to function templates, C++0x template aliases, etc. Some template names are dependent. For example, consider: Here, "apply" is treated as a template name within the typename specifier in the typedef. "apply" is a nested template, and can only be understood in the context of

Declared at: clang/include/clang/AST/TemplateName.h:192

Member Variables

private clang::TemplateName::StorageType Storage

Method Overview

Methods

void Profile(llvm::FoldingSetNodeID& ID)

Declared at: clang/include/clang/AST/TemplateName.h:344

Parameters

llvm::FoldingSetNodeID& ID

TemplateName()

Declared at: clang/include/clang/AST/TemplateName.h:240

TemplateName(void* Ptr)

Declared at: clang/include/clang/AST/TemplateName.h:203

Parameters

void* Ptr

TemplateName(clang::UsingShadowDecl* Using)

Declared at: clang/include/clang/AST/TemplateName.h:248

Parameters

clang::UsingShadowDecl* Using

TemplateName(clang::DependentTemplateName* Dep)

Declared at: clang/include/clang/AST/TemplateName.h:247

Parameters

clang::DependentTemplateName* Dep

TemplateName(clang::QualifiedTemplateName* Qual)

Declared at: clang/include/clang/AST/TemplateName.h:246

Parameters

clang::QualifiedTemplateName* Qual

TemplateName(
    clang::SubstTemplateTemplateParmPackStorage*
        Storage)

Declared at: clang/include/clang/AST/TemplateName.h:245

Parameters

clang::SubstTemplateTemplateParmPackStorage* Storage

TemplateName(
    clang::SubstTemplateTemplateParmStorage*
        Storage)

Declared at: clang/include/clang/AST/TemplateName.h:244

Parameters

clang::SubstTemplateTemplateParmStorage* Storage

TemplateName(
    clang::AssumedTemplateStorage* Storage)

Declared at: clang/include/clang/AST/TemplateName.h:243

Parameters

clang::AssumedTemplateStorage* Storage

TemplateName(
    clang::OverloadedTemplateStorage* Storage)

Declared at: clang/include/clang/AST/TemplateName.h:242

Parameters

clang::OverloadedTemplateStorage* Storage

TemplateName(clang::TemplateDecl* Template)

Declared at: clang/include/clang/AST/TemplateName.h:241

Parameters

clang::TemplateDecl* Template

bool containsUnexpandedParameterPack() const

Description

Determines whether this template name contains an unexpanded parameter pack (for C++0x variadic templates).

Declared at: clang/include/clang/AST/TemplateName.h:323

void dump() const

Description

Debugging aid that dumps the template name to standard error.

Declared at: clang/include/clang/AST/TemplateName.h:342

void dump(llvm::raw_ostream& OS) const

Description

Debugging aid that dumps the template name.

Declared at: clang/include/clang/AST/TemplateName.h:338

Parameters

llvm::raw_ostream& OS

clang::AssumedTemplateStorage*
getAsAssumedTemplateName() const

Description

Retrieve information on a name that has been assumed to be a template-name in order to permit a call via ADL.

Declared at: clang/include/clang/AST/TemplateName.h:276

clang::DependentTemplateName*
getAsDependentTemplateName() const

Description

Retrieve the underlying dependent template name structure, if any.

Declared at: clang/include/clang/AST/TemplateName.h:299

clang::OverloadedTemplateStorage*
getAsOverloadedTemplate() const

Description

Retrieve the underlying, overloaded function template declarations that this template name refers to, if known.

Declared at: clang/include/clang/AST/TemplateName.h:272

Returns

The set of overloaded function templates that this template name refers to, if known. If the template name does not refer to a specific set of function templates because it is a dependent name or refers to a single template, returns NULL.

clang::QualifiedTemplateName*
getAsQualifiedTemplateName() const

Description

Retrieve the underlying qualified template name structure, if any.

Declared at: clang/include/clang/AST/TemplateName.h:295

clang::SubstTemplateTemplateParmStorage*
getAsSubstTemplateTemplateParm() const

Description

Retrieve the substituted template template parameter, if known.

Declared at: clang/include/clang/AST/TemplateName.h:283

Returns

The storage for the substituted template template parameter, if known. Otherwise, returns NULL.

clang::SubstTemplateTemplateParmPackStorage*
getAsSubstTemplateTemplateParmPack() const

Description

Retrieve the substituted template template parameter pack, if known.

Declared at: clang/include/clang/AST/TemplateName.h:291

Returns

The storage for the substituted template template parameter pack, if known. Otherwise, returns NULL.

clang::TemplateDecl* getAsTemplateDecl() const

Description

Retrieve the underlying template declaration that this template name refers to, if known.

Declared at: clang/include/clang/AST/TemplateName.h:263

Returns

The template declaration that this template name refers to, if any. If the template name does not refer to a specific declaration because it is a dependent name, or if it refers to a set of function templates, returns NULL.

clang::UsingShadowDecl* getAsUsingShadowDecl()
    const

Description

Retrieve the using shadow declaration through which the underlying template declaration is introduced, if any.

Declared at: clang/include/clang/AST/TemplateName.h:303

void* getAsVoidPointer() const

Description

Retrieve the template name as a void pointer.

Declared at: clang/include/clang/AST/TemplateName.h:349

clang::TemplateNameDependence getDependence()
    const

Declared at: clang/include/clang/AST/TemplateName.h:312

static clang::TemplateName getFromVoidPointer(
    void* Ptr)

Description

Build a template name from a void pointer.

Declared at: clang/include/clang/AST/TemplateName.h:352

Parameters

void* Ptr

clang::TemplateName::NameKind getKind() const

Declared at: clang/include/clang/AST/TemplateName.h:254

clang::TemplateName getNameToSubstitute() const

Description

Get the template name to substitute when this template name is used as a template template argument. This refers to the most recent declaration of the template, including any default template arguments.

Declared at: clang/include/clang/AST/TemplateName.h:310

clang::TemplateName getUnderlying() const

Declared at: clang/include/clang/AST/TemplateName.h:305

bool isDependent() const

Description

Determines whether this is a dependent template name.

Declared at: clang/include/clang/AST/TemplateName.h:315

bool isInstantiationDependent() const

Description

Determines whether this is a template name that somehow depends on a template parameter.

Declared at: clang/include/clang/AST/TemplateName.h:319

bool isNull() const

Description

Determine whether this template name is NULL.

Declared at: clang/include/clang/AST/TemplateName.h:251

void print(llvm::raw_ostream& OS,
           const clang::PrintingPolicy& Policy,
           clang::TemplateName::Qualified Qual =
               Qualified::AsWritten) const

Description

Print the template name.

Declared at: clang/include/clang/AST/TemplateName.h:334

Parameters

llvm::raw_ostream& OS
the output stream to which the template name will be printed.
const clang::PrintingPolicy& Policy
clang::TemplateName::Qualified Qual = Qualified::AsWritten
print the (Qualified::None) simple name, (Qualified::AsWritten) any written (possibly partial) qualifier, or (Qualified::Fully) the fully qualified name.