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.
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
 Retrieve 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
SourceLocation getExprLoc () const LLVM_READONLY
SourceLocation getLocStart () const LLVM_READONLY
SourceLocation getLocEnd () const LLVM_READONLY
child_range children ()

Static Public Member Functions

static UnresolvedMemberExprCreate (const 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 (const ASTContext &C, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs)
static bool classof (const Stmt *T)

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


Member Function Documentation

Reimplemented from clang::Stmt.

Definition at line 3313 of file ExprCXX.h.

References isImplicitAccess().

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

Reimplemented from clang::OverloadExpr.

Definition at line 3308 of file ExprCXX.h.

References clang::Stmt::getStmtClass().

UnresolvedMemberExpr * UnresolvedMemberExpr::Create ( const 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 ( const ASTContext C,
bool  HasTemplateKWAndArgsInfo,
unsigned  NumTemplateArgs 
) [static]

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

Definition at line 3254 of file ExprCXX.h.

References clang::CodeGen::Base, and isImplicitAccess().

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

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

Definition at line 3258 of file ExprCXX.h.

References clang::CodeGen::Base, and isImplicitAccess().

getExprLoc - Return the preferred location for the arrow when diagnosing a problem with a generic expression.

Reimplemented from clang::Expr.

Definition at line 3293 of file ExprCXX.h.

References getMemberLoc().

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

Definition at line 3285 of file ExprCXX.h.

References clang::OverloadExpr::getName().

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

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

Definition at line 3281 of file ExprCXX.h.

References clang::OverloadExpr::getNameInfo().

Referenced by getLocEnd(), and getLocStart().

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

Definition at line 3274 of file ExprCXX.h.

Determine whether the lookup results contain an unresolved using declaration.

Definition at line 3267 of file ExprCXX.h.

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

Definition at line 3271 of file ExprCXX.h.

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

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 1356 of file ExprCXX.cpp.

References clang::CodeGen::Base, and clang::Expr::isImplicitCXXThis().

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


Friends And Related Function Documentation

friend class ASTStmtReader [friend]

Reimplemented from clang::OverloadExpr.

Definition at line 3229 of file ExprCXX.h.


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