class MemberExpr

Declaration

class MemberExpr : public Expr, private TrailingObjects { /* full declaration omitted */ };

Description

MemberExpr - [C99 6.5.2.3] Structure and Union Members. X->F and X.F.

Declared at: clang/include/clang/AST/Expr.h:3164

Inherits from: Expr, TrailingObjects

Member Variables

private clang::Stmt* Base
Base - the expression for the base pointer or structure references. In X.F, this is "X".
private clang::ValueDecl* MemberDecl
MemberDecl - This is the decl being referenced by the field/member name. In X.F, this is the decl referenced by F.
private clang::DeclarationNameLoc MemberDNLoc
MemberDNLoc - Provides source/type location info for the declaration name embedded in MemberDecl.
private clang::SourceLocation MemberLoc
MemberLoc - This is the location of the member name.

Inherited from Stmt:

protected

Method Overview

  • public static clang::MemberExpr * Create(const clang::ASTContext & C, clang::Expr * Base, bool IsArrow, clang::SourceLocation OperatorLoc, clang::NestedNameSpecifierLoc QualifierLoc, clang::SourceLocation TemplateKWLoc, clang::ValueDecl * MemberDecl, clang::DeclAccessPair FoundDecl, clang::DeclarationNameInfo MemberNameInfo, const clang::TemplateArgumentListInfo * TemplateArgs, clang::QualType T, clang::ExprValueKind VK, clang::ExprObjectKind OK, clang::NonOdrUseReason NOUR)
  • public static clang::MemberExpr * CreateEmpty(const clang::ASTContext & Context, bool HasQualifier, bool HasFoundDecl, bool HasTemplateKWAndArgsInfo, unsigned int NumTemplateArgs)
  • public static clang::MemberExpr * CreateImplicit(const clang::ASTContext & C, clang::Expr * Base, bool IsArrow, clang::ValueDecl * MemberDecl, clang::QualType T, clang::ExprValueKind VK, clang::ExprObjectKind OK)
  • private MemberExpr(clang::Expr * Base, bool IsArrow, clang::SourceLocation OperatorLoc, clang::ValueDecl * MemberDecl, const clang::DeclarationNameInfo & NameInfo, clang::QualType T, clang::ExprValueKind VK, clang::ExprObjectKind OK, clang::NonOdrUseReason NOUR)
  • private MemberExpr(clang::Stmt::EmptyShell Empty)
  • public clang::Stmt::const_child_range children() const
  • public clang::Stmt::child_range children()
  • public static bool classof(const clang::Stmt * T)
  • public void copyTemplateArgumentsInto(clang::TemplateArgumentListInfo & List) const
  • public clang::Expr * getBase() const
  • public clang::SourceLocation getBeginLoc() const
  • public clang::SourceLocation getEndLoc() const
  • public clang::SourceLocation getExprLoc() const
  • public clang::DeclAccessPair getFoundDecl() const
  • public clang::SourceLocation getLAngleLoc() const
  • public clang::ValueDecl * getMemberDecl() const
  • public clang::SourceLocation getMemberLoc() const
  • public clang::DeclarationNameInfo getMemberNameInfo() const
  • public unsigned int getNumTemplateArgs() const
  • public clang::SourceLocation getOperatorLoc() const
  • public clang::NestedNameSpecifier * getQualifier() const
  • public clang::NestedNameSpecifierLoc getQualifierLoc() const
  • public clang::SourceLocation getRAngleLoc() const
  • public const clang::TemplateArgumentLoc * getTemplateArgs() const
  • public clang::SourceLocation getTemplateKeywordLoc() const
  • public bool hadMultipleCandidates() const
  • public bool hasExplicitTemplateArgs() const
  • public bool hasQualifier() const
  • private bool hasQualifierOrFoundDecl() const
  • private bool hasTemplateKWAndArgsInfo() const
  • public bool hasTemplateKeyword() const
  • public bool isArrow() const
  • public bool isImplicitAccess() const
  • public clang::NonOdrUseReason isNonOdrUse() const
  • private size_t numTrailingObjects(OverloadToken<clang::MemberExprNameQualifier>) const
  • private size_t numTrailingObjects(OverloadToken<clang::ASTTemplateKWAndArgsInfo>) const
  • public bool performsVirtualDispatch(const clang::LangOptions & LO) const
  • public void setArrow(bool A)
  • public void setBase(clang::Expr * E)
  • public void setHadMultipleCandidates(bool V = true)
  • public void setMemberDecl(clang::ValueDecl * D)
  • public void setMemberLoc(clang::SourceLocation L)
  • public ArrayRef<clang::TemplateArgumentLoc> template_arguments() const

Inherited from Expr:

Inherited from ValueStmt:

Inherited from Stmt:

Methods

static clang::MemberExpr* Create(
    const clang::ASTContext& C,
    clang::Expr* Base,
    bool IsArrow,
    clang::SourceLocation OperatorLoc,
    clang::NestedNameSpecifierLoc QualifierLoc,
    clang::SourceLocation TemplateKWLoc,
    clang::ValueDecl* MemberDecl,
    clang::DeclAccessPair FoundDecl,
    clang::DeclarationNameInfo MemberNameInfo,
    const clang::TemplateArgumentListInfo*
        TemplateArgs,
    clang::QualType T,
    clang::ExprValueKind VK,
    clang::ExprObjectKind OK,
    clang::NonOdrUseReason NOUR)

Declared at: clang/include/clang/AST/Expr.h:3213

Parameters

const clang::ASTContext& C
clang::Expr* Base
bool IsArrow
clang::SourceLocation OperatorLoc
clang::NestedNameSpecifierLoc QualifierLoc
clang::SourceLocation TemplateKWLoc
clang::ValueDecl* MemberDecl
clang::DeclAccessPair FoundDecl
clang::DeclarationNameInfo MemberNameInfo
const clang::TemplateArgumentListInfo* TemplateArgs
clang::QualType T
clang::ExprValueKind VK
clang::ExprObjectKind OK
clang::NonOdrUseReason NOUR

static clang::MemberExpr* CreateEmpty(
    const clang::ASTContext& Context,
    bool HasQualifier,
    bool HasFoundDecl,
    bool HasTemplateKWAndArgsInfo,
    unsigned int NumTemplateArgs)

Declared at: clang/include/clang/AST/Expr.h:3235

Parameters

const clang::ASTContext& Context
bool HasQualifier
bool HasFoundDecl
bool HasTemplateKWAndArgsInfo
unsigned int NumTemplateArgs

static clang::MemberExpr* CreateImplicit(
    const clang::ASTContext& C,
    clang::Expr* Base,
    bool IsArrow,
    clang::ValueDecl* MemberDecl,
    clang::QualType T,
    clang::ExprValueKind VK,
    clang::ExprObjectKind OK)

Description

Create an implicit MemberExpr, with no location, qualifier, template arguments, and so on. Suitable only for non-static member access.

Declared at: clang/include/clang/AST/Expr.h:3225

Parameters

const clang::ASTContext& C
clang::Expr* Base
bool IsArrow
clang::ValueDecl* MemberDecl
clang::QualType T
clang::ExprValueKind VK
clang::ExprObjectKind OK

MemberExpr(
    clang::Expr* Base,
    bool IsArrow,
    clang::SourceLocation OperatorLoc,
    clang::ValueDecl* MemberDecl,
    const clang::DeclarationNameInfo& NameInfo,
    clang::QualType T,
    clang::ExprValueKind VK,
    clang::ExprObjectKind OK,
    clang::NonOdrUseReason NOUR)

Declared at: clang/include/clang/AST/Expr.h:3205

Parameters

clang::Expr* Base
bool IsArrow
clang::SourceLocation OperatorLoc
clang::ValueDecl* MemberDecl
const clang::DeclarationNameInfo& NameInfo
clang::QualType T
clang::ExprValueKind VK
clang::ExprObjectKind OK
clang::NonOdrUseReason NOUR

MemberExpr(clang::Stmt::EmptyShell Empty)

Declared at: clang/include/clang/AST/Expr.h:3209

Parameters

clang::Stmt::EmptyShell Empty

clang::Stmt::const_child_range children() const

Declared at: clang/include/clang/AST/Expr.h:3398

clang::Stmt::child_range children()

Declared at: clang/include/clang/AST/Expr.h:3397

static bool classof(const clang::Stmt* T)

Declared at: clang/include/clang/AST/Expr.h:3392

Parameters

const clang::Stmt* T

void copyTemplateArgumentsInto(
    clang::TemplateArgumentListInfo& List) const

Description

Copies the template arguments (if present) into the given structure.

Declared at: clang/include/clang/AST/Expr.h:3312

Parameters

clang::TemplateArgumentListInfo& List

clang::Expr* getBase() const

Declared at: clang/include/clang/AST/Expr.h:3241

clang::SourceLocation getBeginLoc() const

Declared at: clang/include/clang/AST/Expr.h:3356

clang::SourceLocation getEndLoc() const

Declared at: clang/include/clang/AST/Expr.h:3357

clang::SourceLocation getExprLoc() const

Declared at: clang/include/clang/AST/Expr.h:3359

clang::DeclAccessPair getFoundDecl() const

Description

Retrieves the declaration found by lookup.

Declared at: clang/include/clang/AST/Expr.h:3251

clang::SourceLocation getLAngleLoc() const

Description

Retrieve the location of the left angle bracket starting the explicit template argument list following the member name, if any.

Declared at: clang/include/clang/AST/Expr.h:3289

clang::ValueDecl* getMemberDecl() const

Description

Retrieve the member declaration to which this expression refers. The returned declaration will be a FieldDecl or (in C++) a VarDecl (for static data members), a CXXMethodDecl, or an EnumConstantDecl.

Declared at: clang/include/clang/AST/Expr.h:3247

clang::SourceLocation getMemberLoc() const

Description

getMemberLoc - Return the location of the "member", in X->F, it is the location of 'F'.

Declared at: clang/include/clang/AST/Expr.h:3353

clang::DeclarationNameInfo getMemberNameInfo()
    const

Description

Retrieve the member declaration name info.

Declared at: clang/include/clang/AST/Expr.h:3341

unsigned int getNumTemplateArgs() const

Description

Retrieve the number of template arguments provided as part of this template-id.

Declared at: clang/include/clang/AST/Expr.h:3329

clang::SourceLocation getOperatorLoc() const

Declared at: clang/include/clang/AST/Expr.h:3346

clang::NestedNameSpecifier* getQualifier() const

Description

If the member name was qualified, retrieves the nested-name-specifier that precedes the member name. Otherwise, returns NULL.

Declared at: clang/include/clang/AST/Expr.h:3275

clang::NestedNameSpecifierLoc getQualifierLoc()
    const

Description

If the member name was qualified, retrieves the nested-name-specifier that precedes the member name, with source-location information.

Declared at: clang/include/clang/AST/Expr.h:3266

clang::SourceLocation getRAngleLoc() const

Description

Retrieve the location of the right angle bracket ending the explicit template argument list following the member name, if any.

Declared at: clang/include/clang/AST/Expr.h:3297

const clang::TemplateArgumentLoc*
getTemplateArgs() const

Description

Retrieve the template arguments provided as part of this template-id.

Declared at: clang/include/clang/AST/Expr.h:3320

clang::SourceLocation getTemplateKeywordLoc()
    const

Description

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

Declared at: clang/include/clang/AST/Expr.h:3281

bool hadMultipleCandidates() const

Description

Returns true if this member expression refers to a method that was resolved from an overloaded set having size greater than 1.

Declared at: clang/include/clang/AST/Expr.h:3368

bool hasExplicitTemplateArgs() const

Description

Determines whether the member name was followed by an explicit template argument list.

Declared at: clang/include/clang/AST/Expr.h:3308

bool hasQualifier() const

Description

Determines whether this member expression actually had a C++ nested-name-specifier prior to the name of the member, e.g., x->Base::foo.

Declared at: clang/include/clang/AST/Expr.h:3261

bool hasQualifierOrFoundDecl() const

Declared at: clang/include/clang/AST/Expr.h:3197

bool hasTemplateKWAndArgsInfo() const

Declared at: clang/include/clang/AST/Expr.h:3201

bool hasTemplateKeyword() const

Description

Determines whether the member name was preceded by the template keyword.

Declared at: clang/include/clang/AST/Expr.h:3304

bool isArrow() const

Declared at: clang/include/clang/AST/Expr.h:3348

bool isImplicitAccess() const

Description

Determine whether the base of this explicit is implicit.

Declared at: clang/include/clang/AST/Expr.h:3362

clang::NonOdrUseReason isNonOdrUse() const

Description

Is this expression a non-odr-use reference, and if so, why? This is only meaningful if the named member is a static member.

Declared at: clang/include/clang/AST/Expr.h:3388

size_t numTrailingObjects(
    OverloadToken<clang::MemberExprNameQualifier>)
    const

Declared at: clang/include/clang/AST/Expr.h:3189

Parameters

OverloadToken<clang::MemberExprNameQualifier>

size_t numTrailingObjects(
    OverloadToken<
        clang::ASTTemplateKWAndArgsInfo>) const

Declared at: clang/include/clang/AST/Expr.h:3193

Parameters

OverloadToken<clang::ASTTemplateKWAndArgsInfo>

bool performsVirtualDispatch(
    const clang::LangOptions& LO) const

Description

Returns true if virtual dispatch is performed. If the member access is fully qualified, (i.e. X::f()), virtual dispatching is not performed. In -fapple-kext mode qualified calls to virtual method will still go through the vtable.

Declared at: clang/include/clang/AST/Expr.h:3382

Parameters

const clang::LangOptions& LO

void setArrow(bool A)

Declared at: clang/include/clang/AST/Expr.h:3349

Parameters

bool A

void setBase(clang::Expr* E)

Declared at: clang/include/clang/AST/Expr.h:3240

Parameters

clang::Expr* E

void setHadMultipleCandidates(bool V = true)

Description

Sets the flag telling whether this expression refers to a method that was resolved from an overloaded set having size greater than 1.

Declared at: clang/include/clang/AST/Expr.h:3374

Parameters

bool V = true

void setMemberDecl(clang::ValueDecl* D)

Declared at: clang/include/clang/AST/Expr.h:3248

Parameters

clang::ValueDecl* D

void setMemberLoc(clang::SourceLocation L)

Declared at: clang/include/clang/AST/Expr.h:3354

Parameters

clang::SourceLocation L

ArrayRef<clang::TemplateArgumentLoc>
template_arguments() const

Declared at: clang/include/clang/AST/Expr.h:3336