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
- public ParsedTemplateArgument()
- public ParsedTemplateArgument(clang::ParsedTemplateArgument::KindType Kind, void * Arg, clang::SourceLocation Loc)
- public ParsedTemplateArgument(const clang::CXXScopeSpec & SS, clang::ParsedTemplateTy Template, clang::SourceLocation TemplateLoc)
- public clang::Expr * getAsExpr() const
- public clang::ParsedTemplateTy getAsTemplate() const
- public clang::ParsedType getAsType() const
- public clang::SourceLocation getEllipsisLoc() const
- public clang::ParsedTemplateArgument::KindType getKind() const
- public clang::SourceLocation getLocation() const
- public const clang::CXXScopeSpec & getScopeSpec() const
- public clang::ParsedTemplateArgument getTemplatePackExpansion(clang::SourceLocation EllipsisLoc) const
- public bool isInvalid() const
Methods
¶ParsedTemplateArgument()
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)
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)
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
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
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
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
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
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
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
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
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
bool isInvalid() const
Description
Determine whether the given template argument is invalid.
Declared at: clang/include/clang/Sema/ParsedTemplate.h:69