clang API Documentation
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. | |
const TemplateArgumentLoc * | getTemplateArgs () const |
Retrieve the template arguments. | |
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 ('<'). | |
SourceLocation | RAngleLoc |
The source location of the right angle bracket ('>'). | |
union { | |
unsigned NumTemplateArgs | |
The number of template arguments in TemplateArgs. The actual template arguments (if any) are stored after the ExplicitTemplateArgumentList structure. | |
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 552 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().
const ASTTemplateArgumentListInfo * ASTTemplateArgumentListInfo::Create | ( | ASTContext & | C, |
const TemplateArgumentListInfo & | List | ||
) | [static] |
Definition at line 508 of file TemplateBase.cpp.
References clang::ASTContext::Allocate(), initializeFrom(), clang::TemplateArgumentListInfo::size(), and sizeFor().
Referenced by clang::ASTReader::ReadASTTemplateArgumentListInfo().
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().
const TemplateArgumentLoc* clang::ASTTemplateArgumentListInfo::getTemplateArgs | ( | ) | const [inline] |
Retrieve the template arguments.
Definition at line 589 of file TemplateBase.h.
void ASTTemplateArgumentListInfo::initializeFrom | ( | const TemplateArgumentListInfo & | List | ) |
Definition at line 519 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 530 of file TemplateBase.cpp.
References clang::TemplateArgumentListInfo::getLAngleLoc(), clang::TemplateArgumentListInfo::getRAngleLoc(), getTemplateArgs(), LAngleLoc, NumTemplateArgs, RAngleLoc, and clang::TemplateArgumentListInfo::size().
const TemplateArgumentLoc& clang::ASTTemplateArgumentListInfo::operator[] | ( | unsigned | I | ) | const [inline] |
Definition at line 593 of file TemplateBase.h.
std::size_t ASTTemplateArgumentListInfo::sizeFor | ( | unsigned | NumTemplateArgs | ) | [static] |
Reimplemented in clang::ASTTemplateKWAndArgsInfo.
Definition at line 560 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.
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().
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().
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().