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
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
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 ()
 Retrieves the optional explicit template arguments. This points to the same data as getExplicitTemplateArgs(), but returns null if there are no explicit template arguments.

Static Public Member Functions

static FindResult find (Expr *E)
static bool classof (const Stmt *T)
static bool classof (const OverloadExpr *)

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, 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 (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 2232 of file ExprCXX.h.


Member Typedef Documentation

Definition at line 2315 of file ExprCXX.h.


Constructor & Destructor Documentation

OverloadExpr::OverloadExpr ( StmtClass  K,
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 2269 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 2403 of file ExprCXX.h.

References clang::Stmt::getStmtClass().

static bool clang::OverloadExpr::classof ( const OverloadExpr ) [inline, static]

Definition at line 2407 of file ExprCXX.h.

void clang::OverloadExpr::copyTemplateArgumentsInto ( TemplateArgumentListInfo List) const [inline]
decls_iterator clang::OverloadExpr::decls_begin ( ) const [inline]
decls_iterator clang::OverloadExpr::decls_end ( ) const [inline]
static FindResult clang::OverloadExpr::find ( Expr E) [inline, static]

Finds the overloaded expression in the given expression of OverloadTy.

Returns:
the expression (which must be there) and true if it has the particular form of a member pointer expression

Definition at line 2289 of file ExprCXX.h.

References getQualifier(), clang::Expr::getType(), clang::Expr::IgnoreParens(), and clang::UO_AddrOf.

Referenced by clang::Sema::ActOnCallExpr(), clang::Sema::CheckAddressOfMemberAccess(), clang::Sema::DiagnoseAssignmentResult(), clang::Sema::isExprCallable(), and ResolveOverloadForDeduction().

ASTTemplateArgumentListInfo& clang::OverloadExpr::getExplicitTemplateArgs ( ) [inline]
const ASTTemplateArgumentListInfo& clang::OverloadExpr::getExplicitTemplateArgs ( ) const [inline]

Definition at line 2378 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 2351 of file ExprCXX.h.

References getTemplateKWAndArgsInfo(), HasTemplateKWAndArgsInfo, and clang::ASTTemplateArgumentListInfo::LAngleLoc.

Referenced by hasExplicitTemplateArgs().

DeclarationName clang::OverloadExpr::getName ( ) const [inline]
const DeclarationNameInfo& clang::OverloadExpr::getNameInfo ( ) const [inline]

Gets the full name info.

Definition at line 2325 of file ExprCXX.h.

Referenced by clang::UnresolvedMemberExpr::getMemberNameInfo(), and clang::UnresolvedLookupExpr::getSourceRange().

SourceLocation clang::OverloadExpr::getNameLoc ( ) const [inline]
CXXRecordDecl * OverloadExpr::getNamingClass ( ) const

Gets the naming class of this lookup, if any.

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

Definition at line 324 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 2322 of file ExprCXX.h.

Referenced by isParenthesizedADLCallee().

unsigned clang::OverloadExpr::getNumTemplateArgs ( ) const [inline]
const ASTTemplateArgumentListInfo* clang::OverloadExpr::getOptionalExplicitTemplateArgs ( ) [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 2398 of file ExprCXX.h.

References getExplicitTemplateArgs(), and hasExplicitTemplateArgs().

NestedNameSpecifier* clang::OverloadExpr::getQualifier ( ) const [inline]
NestedNameSpecifierLoc clang::OverloadExpr::getQualifierLoc ( ) const [inline]

Fetches the nested-name qualifier with source-location information, if one was given.

Definition at line 2340 of file ExprCXX.h.

Referenced by clang::BuildRecoveryCallExpr(), clang::Sema::DiagnoseEmptyLookup(), clang::UnresolvedLookupExpr::getSourceRange(), and clang::UnresolvedMemberExpr::getSourceRange().

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 2358 of file ExprCXX.h.

References getTemplateKWAndArgsInfo(), HasTemplateKWAndArgsInfo, and clang::ASTTemplateArgumentListInfo::RAngleLoc.

Referenced by clang::UnresolvedLookupExpr::getSourceRange(), and clang::UnresolvedMemberExpr::getSourceRange().

TemplateArgumentLoc const* clang::OverloadExpr::getTemplateArgs ( ) const [inline]
SourceLocation clang::OverloadExpr::getTemplateKeywordLoc ( ) const [inline]

Retrieve the location of the template keyword preceding this name, if any.

Definition at line 2344 of file ExprCXX.h.

References clang::ASTTemplateKWAndArgsInfo::getTemplateKeywordLoc(), getTemplateKWAndArgsInfo(), and HasTemplateKWAndArgsInfo.

Referenced by clang::BuildRecoveryCallExpr(), clang::Sema::DiagnoseEmptyLookup(), and hasTemplateKeyword().

ASTTemplateKWAndArgsInfo * clang::OverloadExpr::getTemplateKWAndArgsInfo ( ) [inline, protected]

Return the optional template keyword and arguments info.

Definition at line 3380 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 2255 of file ExprCXX.h.

References getTemplateKWAndArgsInfo().

bool clang::OverloadExpr::hasExplicitTemplateArgs ( ) const [inline]
bool clang::OverloadExpr::hasTemplateKeyword ( ) const [inline]

Determines whether the name was preceded by the template keyword.

Definition at line 2364 of file ExprCXX.h.

References getTemplateKeywordLoc(), and clang::SourceLocation::isValid().

void OverloadExpr::initializeResults ( ASTContext C,
UnresolvedSetIterator  Begin,
UnresolvedSetIterator  End 
) [protected]

Definition at line 309 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 2409 of file ExprCXX.h.

friend class ASTStmtWriter [friend]

Reimplemented from clang::Stmt.

Definition at line 2410 of file ExprCXX.h.


Member Data Documentation

Whether the name includes info for explicit template keyword and arguments.

Definition at line 2249 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: