clang API Documentation

Public Member Functions
clang::TemplateArgumentLoc Class Reference

#include <TemplateBase.h>

List of all members.

Public Member Functions

 TemplateArgumentLoc ()
 TemplateArgumentLoc (const TemplateArgument &Argument, TemplateArgumentLocInfo Opaque)
 TemplateArgumentLoc (const TemplateArgument &Argument, TypeSourceInfo *TInfo)
 TemplateArgumentLoc (const TemplateArgument &Argument, Expr *E)
 TemplateArgumentLoc (const TemplateArgument &Argument, NestedNameSpecifierLoc QualifierLoc, SourceLocation TemplateNameLoc, SourceLocation EllipsisLoc=SourceLocation())
SourceLocation getLocation () const
 
  • Fetches the primary location of the argument.

SourceRange getSourceRange () const LLVM_READONLY
 
  • Fetches the full source range of the argument.

const TemplateArgumentgetArgument () const
TemplateArgumentLocInfo getLocInfo () const
TypeSourceInfogetTypeSourceInfo () const
ExprgetSourceExpression () const
ExprgetSourceDeclExpression () const
NestedNameSpecifierLoc getTemplateQualifierLoc () const
SourceLocation getTemplateNameLoc () const
SourceLocation getTemplateEllipsisLoc () const
TemplateArgumentLoc getPackExpansionPattern (SourceLocation &Ellipsis, llvm::Optional< unsigned > &NumExpansions, ASTContext &Context) const
 When the template argument is a pack expansion, returns the pattern of the pack expansion.

Detailed Description

Location wrapper for a TemplateArgument. TemplateArgument is to TemplateArgumentLoc as Type is to TypeLoc.

Definition at line 419 of file TemplateBase.h.


Constructor & Destructor Documentation

clang::TemplateArgumentLoc::TemplateArgumentLoc ( ) [inline]

Definition at line 424 of file TemplateBase.h.

Referenced by getPackExpansionPattern().

clang::TemplateArgumentLoc::TemplateArgumentLoc ( const TemplateArgument Argument,
TemplateArgumentLocInfo  Opaque 
) [inline]

Definition at line 426 of file TemplateBase.h.

clang::TemplateArgumentLoc::TemplateArgumentLoc ( const TemplateArgument Argument,
TypeSourceInfo TInfo 
) [inline]
clang::TemplateArgumentLoc::TemplateArgumentLoc ( const TemplateArgument Argument,
Expr E 
) [inline]
clang::TemplateArgumentLoc::TemplateArgumentLoc ( const TemplateArgument Argument,
NestedNameSpecifierLoc  QualifierLoc,
SourceLocation  TemplateNameLoc,
SourceLocation  EllipsisLoc = SourceLocation() 
) [inline]

Member Function Documentation

const TemplateArgument& clang::TemplateArgumentLoc::getArgument ( ) const [inline]
SourceLocation clang::TemplateArgumentLoc::getLocation ( ) const [inline]
TemplateArgumentLocInfo clang::TemplateArgumentLoc::getLocInfo ( ) const [inline]
TemplateArgumentLoc TemplateArgumentLoc::getPackExpansionPattern ( SourceLocation Ellipsis,
llvm::Optional< unsigned > &  NumExpansions,
ASTContext Context 
) const

When the template argument is a pack expansion, returns the pattern of the pack expansion.

Parameters:
EllipsisWill be set to the location of the ellipsis.
NumExpansionsWill be set to the number of expansions that will be generated from this pack expansion, if known a priori.

Definition at line 423 of file TemplateBase.cpp.

References clang::ASTContext::CreateTypeSourceInfo(), clang::TemplateArgument::Declaration, clang::TemplateArgument::Expression, getArgument(), clang::TemplateArgument::getAsExpr(), clang::PackExpansionTypeLoc::getEllipsisLoc(), clang::PackExpansionExpr::getEllipsisLoc(), clang::TypeLoc::getFullDataSize(), clang::TemplateArgument::getKind(), clang::PackExpansionExpr::getNumExpansions(), clang::PackExpansionType::getNumExpansions(), clang::TemplateArgument::getNumTemplateExpansions(), clang::TypeLoc::getOpaqueData(), clang::TemplateArgument::getPackExpansionPattern(), clang::PackExpansionExpr::getPattern(), clang::PackExpansionTypeLoc::getPatternLoc(), getTemplateEllipsisLoc(), getTemplateNameLoc(), getTemplateQualifierLoc(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::TypeLoc::getType(), clang::TypeSourceInfo::getTypeLoc(), clang::ConcreteTypeLoc< Base, Derived, TypeClass, LocalData >::getTypePtr(), getTypeSourceInfo(), clang::TemplateArgument::Integral, clang::TemplateArgument::isPackExpansion(), clang::TemplateArgument::Null, clang::TemplateArgument::Pack, clang::TemplateArgument::Template, TemplateArgumentLoc(), clang::TemplateArgument::TemplateExpansion, and clang::TemplateArgument::Type.

Referenced by clang::TreeTransform< Derived >::TransformTemplateArguments().

Expr* clang::TemplateArgumentLoc::getSourceDeclExpression ( ) const [inline]
Expr* clang::TemplateArgumentLoc::getSourceExpression ( ) const [inline]
SourceRange TemplateArgumentLoc::getSourceRange ( ) const
SourceLocation clang::TemplateArgumentLoc::getTemplateEllipsisLoc ( ) const [inline]
SourceLocation clang::TemplateArgumentLoc::getTemplateNameLoc ( ) const [inline]
NestedNameSpecifierLoc clang::TemplateArgumentLoc::getTemplateQualifierLoc ( ) const [inline]
TypeSourceInfo* clang::TemplateArgumentLoc::getTypeSourceInfo ( ) const [inline]

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