15 #ifndef LLVM_CLANG_SEMA_PARSEDTEMPLATE_H
16 #define LLVM_CLANG_SEMA_PARSEDTEMPLATE_H
23 #include "llvm/ADT/SmallVector.h"
52 : Kind(Kind), Arg(Arg), Loc(Loc) { }
67 Arg(Template.getAsOpaquePtr()),
68 SS(SS), Loc(TemplateLoc), EllipsisLoc() { }
78 assert(
Kind ==
Type &&
"Not a template type argument");
84 assert(
Kind ==
NonType &&
"Not a non-type template argument");
85 return static_cast<Expr*
>(Arg);
90 assert(
Kind ==
Template &&
"Not a template template argument");
101 "Only template template arguments can have a scope specifier");
109 "Only template template arguments can have an ellipsis");
206 List.push_back(TemplateId);
221 #endif // LLVM_CLANG_SEMA_PARSEDTEMPLATE_H
IdentifierInfo * Name
FIXME: Temporarily stores the name of a specialization.
SourceLocation TemplateNameLoc
TemplateNameLoc - The location of the template name within the source.
ParsedType getAsType() const
Retrieve the template type argument's type.
The base class of the type hierarchy.
TemplateNameKind Kind
The kind of template that Template refers to.
SourceLocation getLocation() const
Retrieve the location of the template argument.
Information about a template-id annotation token.
One of these records is kept for each identifier that is lexed.
A non-type template parameter, stored as an expression.
ParsedTemplateTy getAsTemplate() const
Retrieve the template template argument's template name.
KindType getKind() const
Determine what kind of template argument we have.
ParsedTemplateArgument * getTemplateArgs()
Retrieves a pointer to the template arguments.
Represents a C++ nested-name-specifier or a global scope specifier.
ParsedTemplateArgument getTemplatePackExpansion(SourceLocation EllipsisLoc) const
Retrieve a pack expansion of the given template template argument.
detail::InMemoryDirectory::const_iterator I
SourceLocation TemplateKWLoc
TemplateKWLoc - The location of the template keyword within the source.
SourceLocation LAngleLoc
The location of the '<' before the template argument list.
Defines the clang::TemplateNameKind enum.
ParsedTemplateArgument(const CXXScopeSpec &SS, ParsedTemplateTy Template, SourceLocation TemplateLoc)
Create a template template argument.
KindType
Describes the kind of template argument that was parsed.
ParsedTemplateArgument(KindType Kind, void *Arg, SourceLocation Loc)
Create a template type argument or non-type template argument.
Expr - This represents one expression.
This file defines the classes used to store parsed information about declaration-specifiers and decla...
SourceLocation getEllipsisLoc() const
Retrieve the location of the ellipsis that makes a template template argument into a pack expansion...
Defines an enumeration for C++ overloaded operators.
TemplateNameKind
Specifies the kind of template name that an identifier refers to.
ParsedTemplateArgument()
Build an empty template argument.
Represents the parsed form of a C++ template argument.
Encodes a location in the source.
Expr * getAsExpr() const
Retrieve the non-type template argument's expression.
A template type parameter, stored as a type.
const CXXScopeSpec & getScopeSpec() const
Retrieve the nested-name-specifier that precedes the template name in a template template argument...
OverloadedOperatorKind
Enumeration specifying the different kinds of C++ overloaded operators.
CXXScopeSpec SS
The nested-name-specifier that precedes the template name.
SourceLocation RAngleLoc
The location of the '>' after the template argument list.
OverloadedOperatorKind Operator
FIXME: Temporarily stores the overloaded operator kind.
bool isInvalid() const
Determine whether the given template argument is invalid.
SourceRange getTemplateParamsRange(TemplateParameterList const *const *Params, unsigned NumParams)
Retrieves the range of the given template parameter lists.
Defines the clang::SourceLocation class and associated facilities.
static TemplateIdAnnotation * Allocate(unsigned NumArgs, SmallVectorImpl< TemplateIdAnnotation * > &List)
Creates a new TemplateIdAnnotation with NumArgs arguments and appends it to List. ...
A template template argument, stored as a template name.
unsigned NumArgs
NumArgs - The number of template arguments.
static OpaquePtr getFromOpaquePtr(void *P)
ParsedTemplateTy Template
The declaration of the template corresponding to the template-name.