clang API Documentation

Public Member Functions | Static Public Member Functions | Friends
clang::UnresolvedMemberExpr Class Reference

Represents a C++ member access expression for which lookup produced a set of overloaded functions. More...

#include <ExprCXX.h>

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

List of all members.

Public Member Functions

bool isImplicitAccess () const
 True if this is an implicit access, i.e. one in which the member being accessed was not written in the source. The source location of the operator is invalid in this case.
ExprgetBase ()
 Retrieve the base object of this member expressions, e.g., the x in x.m.
const ExprgetBase () const
QualType getBaseType () const
bool hasUnresolvedUsing () const
 Determine whether the lookup results contain an unresolved using declaration.
bool isArrow () const
 Determine whether this member expression used the '->' operator; otherwise, it used the '.' operator.
SourceLocation getOperatorLoc () const
 Retrieve the location of the '->' or '.' operator.
CXXRecordDeclgetNamingClass () const
 Retrieves the naming class of this lookup.
const DeclarationNameInfogetMemberNameInfo () const
 Retrieve the full name info for the member that this expression refers to.
DeclarationName getMemberName () const
 Retrieve the name of the member that this expression refers to.
SourceLocation getMemberLoc () const
SourceRange getSourceRange () const LLVM_READONLY
child_range children ()

Static Public Member Functions

static UnresolvedMemberExprCreate (ASTContext &C, bool HasUnresolvedUsing, Expr *Base, QualType BaseType, bool IsArrow, SourceLocation OperatorLoc, NestedNameSpecifierLoc QualifierLoc, SourceLocation TemplateKWLoc, const DeclarationNameInfo &MemberNameInfo, const TemplateArgumentListInfo *TemplateArgs, UnresolvedSetIterator Begin, UnresolvedSetIterator End)
static UnresolvedMemberExprCreateEmpty (ASTContext &C, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
static bool classof (const Stmt *T)
static bool classof (const UnresolvedMemberExpr *)

Friends

class ASTStmtReader

Detailed Description

Represents a C++ member access expression for which lookup produced a set of overloaded functions.

The member access may be explicit or implicit: struct A { int a, b; int explicitAccess() { return this->a + this->A::b; } int implicitAccess() { return a + A::b; } };

In the final AST, an explicit access always becomes a MemberExpr. An implicit access may become either a MemberExpr or a DeclRefExpr, depending on whether the member is static.

Definition at line 3142 of file ExprCXX.h.


Member Function Documentation

child_range clang::UnresolvedMemberExpr::children ( ) [inline]

Reimplemented from clang::Stmt.

Definition at line 3254 of file ExprCXX.h.

References isImplicitAccess().

static bool clang::UnresolvedMemberExpr::classof ( const Stmt T) [inline, static]

Reimplemented from clang::OverloadExpr.

Definition at line 3248 of file ExprCXX.h.

References clang::Stmt::getStmtClass().

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

Definition at line 3251 of file ExprCXX.h.

UnresolvedMemberExpr * UnresolvedMemberExpr::Create ( ASTContext C,
bool  HasUnresolvedUsing,
Expr Base,
QualType  BaseType,
bool  IsArrow,
SourceLocation  OperatorLoc,
NestedNameSpecifierLoc  QualifierLoc,
SourceLocation  TemplateKWLoc,
const DeclarationNameInfo MemberNameInfo,
const TemplateArgumentListInfo TemplateArgs,
UnresolvedSetIterator  Begin,
UnresolvedSetIterator  End 
) [static]
UnresolvedMemberExpr * UnresolvedMemberExpr::CreateEmpty ( ASTContext C,
bool  HasTemplateKWAndArgsInfo,
unsigned  NumTemplateArgs 
) [static]
Expr* clang::UnresolvedMemberExpr::getBase ( ) [inline]

Retrieve the base object of this member expressions, e.g., the x in x.m.

Definition at line 3199 of file ExprCXX.h.

References isImplicitAccess().

Referenced by clang::Sema::BuildCallToMemberFunction().

const Expr* clang::UnresolvedMemberExpr::getBase ( ) const [inline]

Definition at line 3203 of file ExprCXX.h.

References isImplicitAccess().

QualType clang::UnresolvedMemberExpr::getBaseType ( ) const [inline]
SourceLocation clang::UnresolvedMemberExpr::getMemberLoc ( ) const [inline]
DeclarationName clang::UnresolvedMemberExpr::getMemberName ( ) const [inline]

Retrieve the name of the member that this expression refers to.

Definition at line 3230 of file ExprCXX.h.

References clang::OverloadExpr::getName().

Referenced by clang::Sema::BuildCallToMemberFunction().

const DeclarationNameInfo& clang::UnresolvedMemberExpr::getMemberNameInfo ( ) const [inline]

Retrieve the full name info for the member that this expression refers to.

Definition at line 3226 of file ExprCXX.h.

References clang::OverloadExpr::getNameInfo().

Referenced by getSourceRange().

CXXRecordDecl * UnresolvedMemberExpr::getNamingClass ( ) const
SourceLocation clang::UnresolvedMemberExpr::getOperatorLoc ( ) const [inline]

Retrieve the location of the '->' or '.' operator.

Definition at line 3219 of file ExprCXX.h.

SourceRange clang::UnresolvedMemberExpr::getSourceRange ( ) const [inline]
bool clang::UnresolvedMemberExpr::hasUnresolvedUsing ( ) const [inline]

Determine whether the lookup results contain an unresolved using declaration.

Definition at line 3212 of file ExprCXX.h.

bool clang::UnresolvedMemberExpr::isArrow ( ) const [inline]

Determine whether this member expression used the '->' operator; otherwise, it used the '.' operator.

Definition at line 3216 of file ExprCXX.h.

Referenced by clang::Sema::BuildCallToMemberFunction(), clang::Sema::CheckUnresolvedMemberAccess(), and getNamingClass().

bool UnresolvedMemberExpr::isImplicitAccess ( ) const

True if this is an implicit access, i.e. one in which the member being accessed was not written in the source. The source location of the operator is invalid in this case.

Definition at line 1198 of file ExprCXX.cpp.

References clang::Expr::isImplicitCXXThis().

Referenced by children(), getBase(), and getSourceRange().


Friends And Related Function Documentation

friend class ASTStmtReader [friend]

Reimplemented from clang::OverloadExpr.

Definition at line 3175 of file ExprCXX.h.


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