clang API Documentation
A reference to an overloaded function set, either an UnresolvedLookupExpr
or an UnresolvedMemberExpr
.
More...
#include <ExprCXX.h>
Classes | |
struct | FindResult |
Public Types | |
typedef UnresolvedSetImpl::iterator | decls_iterator |
Public Member Functions | |
CXXRecordDecl * | getNamingClass () const |
Gets the naming class of this lookup, if any. | |
decls_iterator | decls_begin () const |
decls_iterator | decls_end () const |
llvm::iterator_range < decls_iterator > | decls () const |
unsigned | getNumDecls () const |
Gets the number of declarations in the unresolved set. | |
const DeclarationNameInfo & | getNameInfo () const |
Gets the full name info. | |
DeclarationName | getName () const |
Gets the name looked up. | |
SourceLocation | getNameLoc () const |
Gets the location of the name. | |
NestedNameSpecifier * | getQualifier () const |
Fetches the nested-name qualifier, if one was given. | |
NestedNameSpecifierLoc | getQualifierLoc () const |
Fetches the nested-name qualifier with source-location information, if one was given. | |
SourceLocation | getTemplateKeywordLoc () const |
Retrieve the location of the template keyword preceding this name, if any. | |
SourceLocation | getLAngleLoc () const |
Retrieve the location of the left angle bracket starting the explicit template argument list following the name, if any. | |
SourceLocation | getRAngleLoc () const |
Retrieve the location of the right angle bracket ending the explicit template argument list following the name, if any. | |
bool | hasTemplateKeyword () const |
Determines whether the name was preceded by the template keyword. | |
bool | hasExplicitTemplateArgs () const |
Determines whether this expression had explicit template arguments. | |
ASTTemplateArgumentListInfo & | getExplicitTemplateArgs () |
const ASTTemplateArgumentListInfo & | getExplicitTemplateArgs () const |
TemplateArgumentLoc const * | getTemplateArgs () const |
unsigned | getNumTemplateArgs () const |
void | copyTemplateArgumentsInto (TemplateArgumentListInfo &List) const |
Copies the template arguments into the given structure. | |
const ASTTemplateArgumentListInfo * | getOptionalExplicitTemplateArgs () const |
Retrieves the optional explicit template arguments. | |
Static Public Member Functions | |
static FindResult | find (Expr *E) |
Finds the overloaded expression in the given expression E of OverloadTy. | |
static bool | classof (const Stmt *T) |
Protected Member Functions | |
ASTTemplateKWAndArgsInfo * | getTemplateKWAndArgsInfo () |
Return the optional template keyword and arguments info. | |
const ASTTemplateKWAndArgsInfo * | getTemplateKWAndArgsInfo () const |
Return the optional template keyword and arguments info. | |
OverloadExpr (StmtClass K, const ASTContext &C, NestedNameSpecifierLoc QualifierLoc, SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs, UnresolvedSetIterator Begin, UnresolvedSetIterator End, bool KnownDependent, bool KnownInstantiationDependent, bool KnownContainsUnexpandedParameterPack) | |
OverloadExpr (StmtClass K, EmptyShell Empty) | |
void | initializeResults (const ASTContext &C, UnresolvedSetIterator Begin, UnresolvedSetIterator End) |
Protected Attributes | |
bool | HasTemplateKWAndArgsInfo |
Whether the name includes info for explicit template keyword and arguments. | |
Friends | |
class | ASTStmtReader |
class | ASTStmtWriter |
A reference to an overloaded function set, either an UnresolvedLookupExpr
or an UnresolvedMemberExpr
.
OverloadExpr::OverloadExpr | ( | StmtClass | K, |
const ASTContext & | C, | ||
NestedNameSpecifierLoc | QualifierLoc, | ||
SourceLocation | TemplateKWLoc, | ||
const DeclarationNameInfo & | NameInfo, | ||
const TemplateArgumentListInfo * | TemplateArgs, | ||
UnresolvedSetIterator | Begin, | ||
UnresolvedSetIterator | End, | ||
bool | KnownDependent, | ||
bool | KnownInstantiationDependent, | ||
bool | KnownContainsUnexpandedParameterPack | ||
) | [protected] |
Definition at line 322 of file ExprCXX.cpp.
References clang::ASTContext::Allocate(), clang::ASTContext::DependentTy, clang::Stmt::ExprBits, getTemplateKWAndArgsInfo(), clang::ASTTemplateKWAndArgsInfo::initializeFrom(), clang::Expr::isTypeDependent(), clang::SourceLocation::isValid(), and clang::Expr::setType().
clang::OverloadExpr::OverloadExpr | ( | StmtClass | K, |
EmptyShell | Empty | ||
) | [inline, protected] |
static bool clang::OverloadExpr::classof | ( | const Stmt * | T | ) | [inline, static] |
Reimplemented from clang::Expr.
Reimplemented in clang::UnresolvedMemberExpr, and clang::UnresolvedLookupExpr.
Definition at line 2467 of file ExprCXX.h.
References clang::Stmt::getStmtClass().
void clang::OverloadExpr::copyTemplateArgumentsInto | ( | TemplateArgumentListInfo & | List | ) | const [inline] |
Copies the template arguments into the given structure.
Definition at line 2454 of file ExprCXX.h.
References clang::ASTTemplateArgumentListInfo::copyInto(), and getExplicitTemplateArgs().
Referenced by clang::Sema::AddOverloadedCallCandidates(), clang::Sema::BuildCallToMemberFunction(), and BuildRecoveryCallExpr().
llvm::iterator_range<decls_iterator> clang::OverloadExpr::decls | ( | ) | const [inline] |
Definition at line 2380 of file ExprCXX.h.
References decls_begin(), and decls_end().
Referenced by clang::Sema::FindAssociatedClassesAndNamespaces().
decls_iterator clang::OverloadExpr::decls_begin | ( | ) | const [inline] |
Definition at line 2376 of file ExprCXX.h.
Referenced by clang::Sema::AddOverloadedCallCandidates(), clang::Sema::BuildCallToMemberFunction(), clang::Sema::buildOverloadedCallSet(), decls(), isParenthesizedADLCallee(), clang::Sema::NoteAllOverloadCandidates(), ResolveOverloadForDeduction(), clang::Sema::ResolveSingleFunctionTemplateSpecialization(), and clang::Sema::tryExprAsCall().
decls_iterator clang::OverloadExpr::decls_end | ( | ) | const [inline] |
Definition at line 2377 of file ExprCXX.h.
Referenced by clang::Sema::AddOverloadedCallCandidates(), clang::Sema::BuildCallToMemberFunction(), clang::Sema::buildOverloadedCallSet(), decls(), clang::Sema::NoteAllOverloadCandidates(), ResolveOverloadForDeduction(), clang::Sema::ResolveSingleFunctionTemplateSpecialization(), and clang::Sema::tryExprAsCall().
static FindResult clang::OverloadExpr::find | ( | Expr * | E | ) | [inline, static] |
Finds the overloaded expression in the given expression E
of OverloadTy.
Definition at line 2349 of file ExprCXX.h.
References getQualifier(), clang::Expr::getType(), clang::Expr::IgnoreParens(), clang::Type::isSpecificBuiltinType(), and clang::UO_AddrOf.
Referenced by clang::Sema::ActOnCallExpr(), clang::Sema::CheckAddressOfMemberAccess(), clang::Sema::DiagnoseAssignmentResult(), DiagnoseBadDeduction(), clang::Sema::NoteAllOverloadCandidates(), clang::Sema::ResolveAndFixSingleFunctionTemplateSpecialization(), ResolveOverloadForDeduction(), and clang::Sema::tryExprAsCall().
Definition at line 2436 of file ExprCXX.h.
References getTemplateKWAndArgsInfo(), and hasExplicitTemplateArgs().
Referenced by copyTemplateArgumentsInto(), getExplicitTemplateArgs(), getNumTemplateArgs(), getOptionalExplicitTemplateArgs(), getTemplateArgs(), ResolveOverloadForDeduction(), and clang::Sema::ResolveSingleFunctionTemplateSpecialization().
const ASTTemplateArgumentListInfo& clang::OverloadExpr::getExplicitTemplateArgs | ( | ) | const [inline] |
Definition at line 2441 of file ExprCXX.h.
References getExplicitTemplateArgs().
SourceLocation clang::OverloadExpr::getLAngleLoc | ( | ) | const [inline] |
Retrieve the location of the left angle bracket starting the explicit template argument list following the name, if any.
Definition at line 2414 of file ExprCXX.h.
References getTemplateKWAndArgsInfo(), HasTemplateKWAndArgsInfo, and clang::ASTTemplateArgumentListInfo::LAngleLoc.
Referenced by hasExplicitTemplateArgs().
DeclarationName clang::OverloadExpr::getName | ( | ) | const [inline] |
Gets the name looked up.
Definition at line 2391 of file ExprCXX.h.
References clang::DeclarationNameInfo::getName().
Referenced by clang::Sema::AddOverloadedCallCandidates(), BuildRecoveryCallExpr(), DiagnoseBadDeduction(), FinishOverloadedCallExpr(), clang::UnresolvedMemberExpr::getMemberName(), and clang::Sema::ResolveSingleFunctionTemplateSpecialization().
const DeclarationNameInfo& clang::OverloadExpr::getNameInfo | ( | ) | const [inline] |
Gets the full name info.
Definition at line 2388 of file ExprCXX.h.
Referenced by clang::UnresolvedLookupExpr::getLocEnd(), clang::UnresolvedLookupExpr::getLocStart(), and clang::UnresolvedMemberExpr::getMemberNameInfo().
SourceLocation clang::OverloadExpr::getNameLoc | ( | ) | const [inline] |
Gets the location of the name.
Definition at line 2394 of file ExprCXX.h.
References clang::DeclarationNameInfo::getLoc().
Referenced by clang::Sema::BuildCallToMemberFunction(), BuildRecoveryCallExpr(), clang::Sema::CheckAddressOfMemberAccess(), clang::Sema::CheckUnresolvedLookupAccess(), FinishOverloadedCallExpr(), clang::UnresolvedMemberExpr::getMemberLoc(), ResolveOverloadForDeduction(), and clang::Sema::ResolveSingleFunctionTemplateSpecialization().
CXXRecordDecl * OverloadExpr::getNamingClass | ( | ) | const |
Gets the naming class of this lookup, if any.
Reimplemented in clang::UnresolvedMemberExpr, and clang::UnresolvedLookupExpr.
Definition at line 409 of file ExprCXX.cpp.
Referenced by clang::Sema::CheckAddressOfMemberAccess().
unsigned clang::OverloadExpr::getNumDecls | ( | ) | const [inline] |
Gets the number of declarations in the unresolved set.
Definition at line 2385 of file ExprCXX.h.
Referenced by isParenthesizedADLCallee().
unsigned clang::OverloadExpr::getNumTemplateArgs | ( | ) | const [inline] |
Definition at line 2449 of file ExprCXX.h.
References getExplicitTemplateArgs(), and clang::ASTTemplateArgumentListInfo::NumTemplateArgs.
const ASTTemplateArgumentListInfo* clang::OverloadExpr::getOptionalExplicitTemplateArgs | ( | ) | const [inline] |
Retrieves the optional explicit template arguments.
This points to the same data as getExplicitTemplateArgs(), but returns null if there are no explicit template arguments.
Definition at line 2462 of file ExprCXX.h.
References getExplicitTemplateArgs(), and hasExplicitTemplateArgs().
NestedNameSpecifier* clang::OverloadExpr::getQualifier | ( | ) | const [inline] |
Fetches the nested-name qualifier, if one was given.
Definition at line 2397 of file ExprCXX.h.
References clang::NestedNameSpecifierLoc::getNestedNameSpecifier().
Referenced by clang::Sema::BuildCallToMemberFunction(), clang::Sema::buildOverloadedCallSet(), find(), clang::UnresolvedMemberExpr::getNamingClass(), and isParenthesizedADLCallee().
NestedNameSpecifierLoc clang::OverloadExpr::getQualifierLoc | ( | ) | const [inline] |
Fetches the nested-name qualifier with source-location information, if one was given.
Definition at line 2403 of file ExprCXX.h.
Referenced by BuildRecoveryCallExpr(), clang::UnresolvedLookupExpr::getLocStart(), and clang::UnresolvedMemberExpr::getLocStart().
SourceLocation clang::OverloadExpr::getRAngleLoc | ( | ) | const [inline] |
Retrieve the location of the right angle bracket ending the explicit template argument list following the name, if any.
Definition at line 2421 of file ExprCXX.h.
References getTemplateKWAndArgsInfo(), HasTemplateKWAndArgsInfo, and clang::ASTTemplateArgumentListInfo::RAngleLoc.
Referenced by clang::UnresolvedLookupExpr::getLocEnd(), and clang::UnresolvedMemberExpr::getLocEnd().
TemplateArgumentLoc const* clang::OverloadExpr::getTemplateArgs | ( | ) | const [inline] |
Definition at line 2445 of file ExprCXX.h.
References getExplicitTemplateArgs(), and clang::ASTTemplateArgumentListInfo::getTemplateArgs().
SourceLocation clang::OverloadExpr::getTemplateKeywordLoc | ( | ) | const [inline] |
Retrieve the location of the template keyword preceding this name, if any.
Definition at line 2407 of file ExprCXX.h.
References clang::ASTTemplateKWAndArgsInfo::getTemplateKeywordLoc(), getTemplateKWAndArgsInfo(), and HasTemplateKWAndArgsInfo.
Referenced by BuildRecoveryCallExpr(), and hasTemplateKeyword().
ASTTemplateKWAndArgsInfo * clang::OverloadExpr::getTemplateKWAndArgsInfo | ( | ) | [inline, protected] |
Return the optional template keyword and arguments info.
Definition at line 3440 of file ExprCXX.h.
References HasTemplateKWAndArgsInfo.
Referenced by getExplicitTemplateArgs(), getLAngleLoc(), getRAngleLoc(), getTemplateKeywordLoc(), getTemplateKWAndArgsInfo(), and OverloadExpr().
const ASTTemplateKWAndArgsInfo* clang::OverloadExpr::getTemplateKWAndArgsInfo | ( | ) | const [inline, protected] |
Return the optional template keyword and arguments info.
Definition at line 2315 of file ExprCXX.h.
References getTemplateKWAndArgsInfo().
bool clang::OverloadExpr::hasExplicitTemplateArgs | ( | ) | const [inline] |
Determines whether this expression had explicit template arguments.
Definition at line 2430 of file ExprCXX.h.
References getLAngleLoc(), and clang::SourceLocation::isValid().
Referenced by clang::Sema::AddOverloadedCallCandidates(), clang::Sema::BuildCallToMemberFunction(), BuildRecoveryCallExpr(), getExplicitTemplateArgs(), clang::UnresolvedLookupExpr::getLocEnd(), clang::UnresolvedMemberExpr::getLocEnd(), getOptionalExplicitTemplateArgs(), ResolveOverloadForDeduction(), and clang::Sema::ResolveSingleFunctionTemplateSpecialization().
bool clang::OverloadExpr::hasTemplateKeyword | ( | ) | const [inline] |
Determines whether the name was preceded by the template keyword.
Definition at line 2427 of file ExprCXX.h.
References getTemplateKeywordLoc(), and clang::SourceLocation::isValid().
void OverloadExpr::initializeResults | ( | const ASTContext & | C, |
UnresolvedSetIterator | Begin, | ||
UnresolvedSetIterator | End | ||
) | [protected] |
Definition at line 394 of file ExprCXX.cpp.
References clang::ASTContext::Allocate().
friend class ASTStmtReader [friend] |
Reimplemented from clang::Stmt.
Reimplemented in clang::UnresolvedMemberExpr, and clang::UnresolvedLookupExpr.
friend class ASTStmtWriter [friend] |
Reimplemented from clang::Stmt.
bool clang::OverloadExpr::HasTemplateKWAndArgsInfo [protected] |
Whether the name includes info for explicit template keyword and arguments.
Definition at line 2309 of file ExprCXX.h.
Referenced by clang::UnresolvedLookupExpr::CreateEmpty(), clang::UnresolvedMemberExpr::CreateEmpty(), getLAngleLoc(), getRAngleLoc(), getTemplateKeywordLoc(), and getTemplateKWAndArgsInfo().