clang
3.7.0
|
Represents an explicit template argument list in C++, e.g., the "<int>" in "sort<int>". This is safe to be used inside an AST node, in contrast with TemplateArgumentListInfo. More...
#include <TemplateBase.h>
Public Member Functions | |
TemplateArgumentLoc * | getTemplateArgs () |
Retrieve the template arguments. More... | |
const TemplateArgumentLoc * | getTemplateArgs () const |
Retrieve the template arguments. More... | |
const TemplateArgumentLoc & | operator[] (unsigned I) const |
void | initializeFrom (const TemplateArgumentListInfo &List) |
void | initializeFrom (const TemplateArgumentListInfo &List, bool &Dependent, bool &InstantiationDependent, bool &ContainsUnexpandedParameterPack) |
void | copyInto (TemplateArgumentListInfo &List) const |
Static Public Member Functions | |
static const ASTTemplateArgumentListInfo * | Create (ASTContext &C, const TemplateArgumentListInfo &List) |
static std::size_t | sizeFor (unsigned NumTemplateArgs) |
Public Attributes | |
SourceLocation | LAngleLoc |
The source location of the left angle bracket ('<'). More... | |
SourceLocation | RAngleLoc |
The source location of the right angle bracket ('>'). More... | |
union { | |
unsigned NumTemplateArgs | |
The number of template arguments in TemplateArgs. The actual template arguments (if any) are stored after the ExplicitTemplateArgumentList structure. More... | |
llvm::AlignedCharArray < llvm::AlignOf < TemplateArgumentLoc > ::Alignment, 1 > Aligner | |
}; | |
Represents an explicit template argument list in C++, e.g., the "<int>" in "sort<int>". This is safe to be used inside an AST node, in contrast with TemplateArgumentListInfo.
Definition at line 564 of file TemplateBase.h.
void ASTTemplateArgumentListInfo::copyInto | ( | TemplateArgumentListInfo & | List | ) | const |
Definition at line 567 of file TemplateBase.cpp.
References clang::TemplateArgumentListInfo::addArgument(), getTemplateArgs(), LAngleLoc, NumTemplateArgs, RAngleLoc, clang::TemplateArgumentListInfo::setLAngleLoc(), and clang::TemplateArgumentListInfo::setRAngleLoc().
Referenced by clang::DeclRefExpr::copyTemplateArgumentsInto(), clang::OverloadExpr::copyTemplateArgumentsInto(), clang::MemberExpr::copyTemplateArgumentsInto(), clang::DependentScopeDeclRefExpr::copyTemplateArgumentsInto(), clang::CXXDependentScopeMemberExpr::copyTemplateArgumentsInto(), ResolveOverloadForDeduction(), and clang::Sema::ResolveSingleFunctionTemplateSpecialization().
|
static |
Definition at line 523 of file TemplateBase.cpp.
References clang::ASTContext::Allocate(), initializeFrom(), clang::TemplateArgumentListInfo::size(), and sizeFor().
Referenced by clang::FunctionTemplateSpecializationInfo::Create(), clang::ClassTemplatePartialSpecializationDecl::Create(), clang::VarTemplatePartialSpecializationDecl::Create(), and clang::ASTReader::ReadASTTemplateArgumentListInfo().
|
inline |
Retrieve the template arguments.
Definition at line 584 of file TemplateBase.h.
Referenced by clang::ASTWriter::AddASTTemplateArgumentListInfo(), clang::ASTStmtWriter::AddTemplateKWAndArgsInfo(), copyInto(), FinishTemplateArgumentDeduction(), clang::DeclRefExpr::getTemplateArgs(), clang::OverloadExpr::getTemplateArgs(), clang::MemberExpr::getTemplateArgs(), clang::DependentScopeDeclRefExpr::getTemplateArgs(), clang::CXXDependentScopeMemberExpr::getTemplateArgs(), initializeFrom(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), and clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization().
|
inline |
Retrieve the template arguments.
Definition at line 589 of file TemplateBase.h.
void ASTTemplateArgumentListInfo::initializeFrom | ( | const TemplateArgumentListInfo & | List | ) |
Definition at line 534 of file TemplateBase.cpp.
References clang::TemplateArgumentListInfo::getLAngleLoc(), clang::TemplateArgumentListInfo::getRAngleLoc(), getTemplateArgs(), LAngleLoc, NumTemplateArgs, RAngleLoc, and clang::TemplateArgumentListInfo::size().
Referenced by Create(), clang::ASTTemplateKWAndArgsInfo::initializeFrom(), and clang::CXXDependentScopeMemberExpr::initializeTemplateArgumentsFrom().
void ASTTemplateArgumentListInfo::initializeFrom | ( | const TemplateArgumentListInfo & | List, |
bool & | Dependent, | ||
bool & | InstantiationDependent, | ||
bool & | ContainsUnexpandedParameterPack | ||
) |
Definition at line 545 of file TemplateBase.cpp.
References clang::TemplateArgumentListInfo::getLAngleLoc(), clang::TemplateArgumentListInfo::getRAngleLoc(), getTemplateArgs(), LAngleLoc, NumTemplateArgs, RAngleLoc, and clang::TemplateArgumentListInfo::size().
|
inline |
Definition at line 593 of file TemplateBase.h.
|
static |
Definition at line 575 of file TemplateBase.cpp.
References NumTemplateArgs.
Referenced by Create(), and clang::ASTTemplateKWAndArgsInfo::sizeFor().
union { ... } |
llvm::AlignedCharArray< llvm::AlignOf<TemplateArgumentLoc>::Alignment, 1> clang::ASTTemplateArgumentListInfo::Aligner |
Force ASTTemplateArgumentListInfo to the right alignment for the following array of TemplateArgumentLocs.
Definition at line 580 of file TemplateBase.h.
SourceLocation clang::ASTTemplateArgumentListInfo::LAngleLoc |
The source location of the left angle bracket ('<').
Definition at line 566 of file TemplateBase.h.
Referenced by clang::ASTWriter::AddASTTemplateArgumentListInfo(), clang::ASTStmtWriter::AddTemplateKWAndArgsInfo(), copyInto(), FinishTemplateArgumentDeduction(), clang::DeclRefExpr::getLAngleLoc(), clang::OverloadExpr::getLAngleLoc(), clang::MemberExpr::getLAngleLoc(), clang::DependentScopeDeclRefExpr::getLAngleLoc(), clang::CXXDependentScopeMemberExpr::getLAngleLoc(), initializeFrom(), clang::ASTTemplateKWAndArgsInfo::initializeFrom(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), and clang::ASTDeclWriter::VisitFunctionDecl().
unsigned clang::ASTTemplateArgumentListInfo::NumTemplateArgs |
The number of template arguments in TemplateArgs. The actual template arguments (if any) are stored after the ExplicitTemplateArgumentList structure.
Definition at line 575 of file TemplateBase.h.
Referenced by clang::ASTWriter::AddASTTemplateArgumentListInfo(), clang::ASTStmtWriter::AddTemplateKWAndArgsInfo(), copyInto(), FinishTemplateArgumentDeduction(), clang::DeclRefExpr::getNumTemplateArgs(), clang::OverloadExpr::getNumTemplateArgs(), clang::MemberExpr::getNumTemplateArgs(), clang::DependentScopeDeclRefExpr::getNumTemplateArgs(), clang::CXXDependentScopeMemberExpr::getNumTemplateArgs(), initializeFrom(), clang::ASTTemplateKWAndArgsInfo::initializeFrom(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), sizeFor(), and clang::ASTDeclWriter::VisitFunctionDecl().
SourceLocation clang::ASTTemplateArgumentListInfo::RAngleLoc |
The source location of the right angle bracket ('>').
Definition at line 569 of file TemplateBase.h.
Referenced by clang::ASTWriter::AddASTTemplateArgumentListInfo(), clang::ASTStmtWriter::AddTemplateKWAndArgsInfo(), copyInto(), FinishTemplateArgumentDeduction(), clang::DeclRefExpr::getRAngleLoc(), clang::OverloadExpr::getRAngleLoc(), clang::MemberExpr::getRAngleLoc(), clang::DependentScopeDeclRefExpr::getRAngleLoc(), clang::CXXDependentScopeMemberExpr::getRAngleLoc(), initializeFrom(), clang::ASTTemplateKWAndArgsInfo::initializeFrom(), clang::TemplateDeclInstantiator::InstantiateClassTemplatePartialSpecialization(), clang::TemplateDeclInstantiator::InstantiateVarTemplatePartialSpecialization(), and clang::ASTDeclWriter::VisitFunctionDecl().