clang API Documentation

Public Types | Public Member Functions
clang::ParsedTemplateArgument Class Reference

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

#include <ParsedTemplate.h>

List of all members.

Public Types

enum  KindType { Type, NonType, Template }
 Describes the kind of template argument that was parsed. More...

Public Member Functions

 ParsedTemplateArgument ()
 Build an empty template argument.
 ParsedTemplateArgument (KindType Kind, void *Arg, SourceLocation Loc)
 Create a template type argument or non-type template argument.
 ParsedTemplateArgument (const CXXScopeSpec &SS, ParsedTemplateTy Template, SourceLocation TemplateLoc)
 Create a template template argument.
bool isInvalid () const
 Determine whether the given template argument is invalid.
KindType getKind () const
 Determine what kind of template argument we have.
ParsedType getAsType () const
 Retrieve the template type argument's type.
ExprgetAsExpr () const
 Retrieve the non-type template argument's expression.
ParsedTemplateTy getAsTemplate () const
 Retrieve the template template argument's template name.
SourceLocation getLocation () const
 Retrieve the location of the template argument.
const CXXScopeSpecgetScopeSpec () const
 Retrieve the nested-name-specifier that precedes the template name in a template template argument.
SourceLocation getEllipsisLoc () const
 Retrieve the location of the ellipsis that makes a template template argument into a pack expansion.
ParsedTemplateArgument getTemplatePackExpansion (SourceLocation EllipsisLoc) const
 Retrieve a pack expansion of the given template template argument.

Detailed Description

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

Definition at line 23 of file ParsedTemplate.h.


Member Enumeration Documentation

Describes the kind of template argument that was parsed.

Enumerator:
Type 

A template type parameter, stored as a type.

NonType 

A non-type template parameter, stored as an expression.

Template 

A template template argument, stored as a template name.

Definition at line 26 of file ParsedTemplate.h.


Constructor & Destructor Documentation

Build an empty template argument.

This template argument is invalid.

Definition at line 38 of file ParsedTemplate.h.

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

Parameters:
Argthe template type argument or non-type template argument.
Locthe location of the type.

Definition at line 44 of file ParsedTemplate.h.

Create a template template argument.

Parameters:
SSthe C++ scope specifier that precedes the template name, if any.
Templatethe template to which this template template argument refers.
TemplateLocthe location of the template name.

Definition at line 56 of file ParsedTemplate.h.


Member Function Documentation

Retrieve the non-type template argument's expression.

Definition at line 76 of file ParsedTemplate.h.

References NonType.

Referenced by clang::Sema::ActOnPackExpansion(), and translateTemplateArgument().

Retrieve the template template argument's template name.

Definition at line 82 of file ParsedTemplate.h.

References clang::OpaquePtr< TemplateName >::getFromOpaquePtr(), and Template.

Referenced by clang::Sema::ActOnPackExpansion(), and translateTemplateArgument().

Retrieve the template type argument's type.

Definition at line 70 of file ParsedTemplate.h.

References clang::OpaquePtr< QualType >::getFromOpaquePtr().

Referenced by clang::Sema::ActOnPackExpansion(), and translateTemplateArgument().

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

Definition at line 100 of file ParsedTemplate.h.

References Template.

Referenced by translateTemplateArgument().

Determine what kind of template argument we have.

Definition at line 67 of file ParsedTemplate.h.

Referenced by clang::Sema::ActOnPackExpansion(), and translateTemplateArgument().

Retrieve the location of the template argument.

Definition at line 88 of file ParsedTemplate.h.

Referenced by clang::Sema::ActOnPackExpansion(), and translateTemplateArgument().

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

Definition at line 92 of file ParsedTemplate.h.

References Template.

Referenced by clang::Sema::ActOnPackExpansion(), and translateTemplateArgument().

Retrieve a pack expansion of the given template template argument.

Parameters:
EllipsisLocThe location of the ellipsis.

Definition at line 473 of file SemaTemplate.cpp.

Referenced by clang::Sema::ActOnPackExpansion().

Determine whether the given template argument is invalid.

Definition at line 64 of file ParsedTemplate.h.

Referenced by clang::Sema::ActOnPackExpansion(), and clang::Sema::ActOnTemplateTemplateParameter().


The documentation for this class was generated from the following files: