class ParsedTemplateArgument

Declaration

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

Description

Represents the parsed form of a C++ template argument.

Declared at: clang/include/clang/Sema/ParsedTemplate.h:29

Member Variables

private clang::ParsedTemplateArgument::KindType Kind
private void* Arg
The actual template argument representation, which may be an \c Sema::TypeTy* (for a type), an Expr* (for an expression), or an Sema::TemplateTy (for a template).
private clang::CXXScopeSpec SS
The nested-name-specifier that can accompany a template template argument.
private clang::SourceLocation Loc
the location of the template argument.
private clang::SourceLocation EllipsisLoc
The ellipsis location that can accompany a template template argument (turning it into a template template argument expansion).

Method Overview

Methods

ParsedTemplateArgument()

Description

Build an empty template argument. This template argument is invalid.

Declared at: clang/include/clang/Sema/ParsedTemplate.h:44

ParsedTemplateArgument(
    clang::ParsedTemplateArgument::KindType Kind,
    void* Arg,
    clang::SourceLocation Loc)

Description

Create a template type argument or non-type template argument.

Declared at: clang/include/clang/Sema/ParsedTemplate.h:50

Parameters

clang::ParsedTemplateArgument::KindType Kind
void* Arg
the template type argument or non-type template argument.
clang::SourceLocation Loc
the location of the type.

ParsedTemplateArgument(
    const clang::CXXScopeSpec& SS,
    clang::ParsedTemplateTy Template,
    clang::SourceLocation TemplateLoc)

Description

Create a template template argument.

Declared at: clang/include/clang/Sema/ParsedTemplate.h:62

Parameters

const clang::CXXScopeSpec& SS
the C++ scope specifier that precedes the template name, if any.
clang::ParsedTemplateTy Template
the template to which this template template argument refers.
clang::SourceLocation TemplateLoc
the location of the template name.

clang::Expr* getAsExpr() const

Description

Retrieve the non-type template argument's expression.

Declared at: clang/include/clang/Sema/ParsedTemplate.h:81

clang::ParsedTemplateTy getAsTemplate() const

Description

Retrieve the template template argument's template name.

Declared at: clang/include/clang/Sema/ParsedTemplate.h:87

clang::ParsedType getAsType() const

Description

Retrieve the template type argument's type.

Declared at: clang/include/clang/Sema/ParsedTemplate.h:75

clang::SourceLocation getEllipsisLoc() const

Description

Retrieve the location of the ellipsis that makes a template template argument into a pack expansion.

Declared at: clang/include/clang/Sema/ParsedTemplate.h:105

clang::ParsedTemplateArgument::KindType getKind()
    const

Description

Determine what kind of template argument we have.

Declared at: clang/include/clang/Sema/ParsedTemplate.h:72

clang::SourceLocation getLocation() const

Description

Retrieve the location of the template argument.

Declared at: clang/include/clang/Sema/ParsedTemplate.h:93

const clang::CXXScopeSpec& getScopeSpec() const

Description

Retrieve the nested-name-specifier that precedes the template name in a template template argument.

Declared at: clang/include/clang/Sema/ParsedTemplate.h:97

clang::ParsedTemplateArgument
getTemplatePackExpansion(
    clang::SourceLocation EllipsisLoc) const

Description

Retrieve a pack expansion of the given template template argument.

Declared at: clang/include/clang/Sema/ParsedTemplate.h:115

Parameters

clang::SourceLocation EllipsisLoc
The location of the ellipsis.

bool isInvalid() const

Description

Determine whether the given template argument is invalid.

Declared at: clang/include/clang/Sema/ParsedTemplate.h:69