clang API Documentation

Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends
clang::OverloadExpr Class Reference

A reference to an overloaded function set, either an UnresolvedLookupExpr or an UnresolvedMemberExpr. More...

#include <ExprCXX.h>

Inheritance diagram for clang::OverloadExpr:
Inheritance graph
[legend]
Collaboration diagram for clang::OverloadExpr:
Collaboration graph
[legend]

List of all members.

Classes

struct  FindResult

Public Types

typedef UnresolvedSetImpl::iterator decls_iterator

Public Member Functions

CXXRecordDeclgetNamingClass () 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 DeclarationNameInfogetNameInfo () const
 Gets the full name info.
DeclarationName getName () const
 Gets the name looked up.
SourceLocation getNameLoc () const
 Gets the location of the name.
NestedNameSpecifiergetQualifier () 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.
ASTTemplateArgumentListInfogetExplicitTemplateArgs ()
const ASTTemplateArgumentListInfogetExplicitTemplateArgs () const
TemplateArgumentLoc const * getTemplateArgs () const
unsigned getNumTemplateArgs () const
void copyTemplateArgumentsInto (TemplateArgumentListInfo &List) const
 Copies the template arguments into the given structure.
const ASTTemplateArgumentListInfogetOptionalExplicitTemplateArgs () 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

ASTTemplateKWAndArgsInfogetTemplateKWAndArgsInfo ()
 Return the optional template keyword and arguments info.
const ASTTemplateKWAndArgsInfogetTemplateKWAndArgsInfo () 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

Detailed Description

A reference to an overloaded function set, either an UnresolvedLookupExpr or an UnresolvedMemberExpr.

Definition at line 2292 of file ExprCXX.h.


Member Typedef Documentation

Definition at line 2375 of file ExprCXX.h.


Constructor & Destructor Documentation

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]
clang::OverloadExpr::OverloadExpr ( StmtClass  K,
EmptyShell  Empty 
) [inline, protected]

Definition at line 2329 of file ExprCXX.h.


Member Function Documentation

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().

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().

static FindResult clang::OverloadExpr::find ( Expr E) [inline, static]

Definition at line 2441 of file ExprCXX.h.

References getExplicitTemplateArgs().

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().

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().

Gets the number of declarations in the unresolved set.

Definition at line 2385 of file ExprCXX.h.

Referenced by isParenthesizedADLCallee().

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().

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().

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().

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().

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().

Return the optional template keyword and arguments info.

Definition at line 2315 of file ExprCXX.h.

References getTemplateKWAndArgsInfo().

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().


Friends And Related Function Documentation

friend class ASTStmtReader [friend]

Reimplemented from clang::Stmt.

Reimplemented in clang::UnresolvedMemberExpr, and clang::UnresolvedLookupExpr.

Definition at line 2472 of file ExprCXX.h.

friend class ASTStmtWriter [friend]

Reimplemented from clang::Stmt.

Definition at line 2473 of file ExprCXX.h.


Member Data Documentation

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().


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