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:
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:
- public Classify
- public ClassifyLValue
- public ClassifyModifiable
- public EvaluateAsBooleanCondition
- public EvaluateAsConstantExpr
- public EvaluateAsFixedPoint
- public EvaluateAsFloat
- public EvaluateAsInitializer
- public EvaluateAsInt
- public EvaluateAsLValue
- public EvaluateAsRValue
- public EvaluateForOverflow
- public EvaluateKnownConstInt
- public EvaluateKnownConstIntCheckOverflow
- public EvaluateWithSubstitution
- public HasSideEffects
- public IgnoreCasts
- public IgnoreCasts
- public IgnoreConversionOperatorSingleStep
- public IgnoreConversionOperatorSingleStep
- public IgnoreImpCasts
- public IgnoreImpCasts
- public IgnoreImplicit
- public IgnoreImplicit
- public IgnoreImplicitAsWritten
- public IgnoreImplicitAsWritten
- public IgnoreParenBaseCasts
- public IgnoreParenBaseCasts
- public IgnoreParenCasts
- public IgnoreParenCasts
- public IgnoreParenImpCasts
- public IgnoreParenImpCasts
- public IgnoreParenLValueCasts
- public IgnoreParenLValueCasts
- public IgnoreParenNoopCasts
- public IgnoreParenNoopCasts
- public IgnoreParens
- public IgnoreParens
- public IgnoreUnlessSpelledInSource
- public IgnoreUnlessSpelledInSource
- public classof
- public containsErrors
- public containsUnexpandedParameterPack
- public findBoundMemberType
- public getAsBuiltinConstantDeclRef
- public getBestDynamicClassType
- public getBestDynamicClassTypeExpr
- public getDependence
- public getExprLoc
- public getFPFeaturesInEffect
- public getIntegerConstantExpr
- public getObjCProperty
- public getObjectKind
- public getReferencedDeclOfCallee
- public getReferencedDeclOfCallee
- public getSourceBitField
- public getSourceBitField
- public getType
- public getValueKind
- public getValueKindForType
- public hasAnyTypeDependentArguments
- public hasNonTrivialCall
- public hasPlaceholderType
- public hasPlaceholderType
- public isBoundMemberFunction
- public isCXX11ConstantExpr
- public isCXX98IntegralConstantExpr
- public isConstantInitializer
- public isDefaultArgument
- public isEvaluatable
- public isGLValue
- public isImplicitCXXThis
- public isInstantiationDependent
- public isIntegerConstantExpr
- public isKnownToHaveBooleanValue
- public isLValue
- public isModifiableLvalue
- public isNullPointerConstant
- public isOBJCGCCandidate
- public isObjCSelfExpr
- public isOrdinaryOrBitFieldObject
- public isPRValue
- public isPotentialConstantExpr
- public isPotentialConstantExprUnevaluated
- public isReadIfDiscardedInCPlusPlus11
- public isSameComparisonOperand
- public isTemporaryObject
- public isTypeDependent
- public isUnusedResultAWarning
- public isValueDependent
- public isXValue
- public refersToBitField
- public refersToGlobalRegisterVar
- public refersToMatrixElement
- public refersToVectorElement
- protected setDependence
- public setObjectKind
- public setType
- public setValueKind
- public skipRValueSubobjectAdjustments
- public skipRValueSubobjectAdjustments
- public tryEvaluateObjectSize
- public tryEvaluateStrLen
Inherited from ValueStmt:
Inherited from Stmt:
- public EnableStatistics
- public IgnoreContainers
- public IgnoreContainers
- public PrintStats
- public ProcessODRHash
- public Profile
- public addStmtClass
- public child_begin
- public child_begin
- public child_end
- public child_end
- public children
- public children
- public determineLikelihoodConflict
- public dump
- public dump
- public dumpColor
- public dumpPretty
- public getBeginLoc
- public getEndLoc
- public getID
- public getLikelihood
- public getLikelihood
- public getLikelihood
- public getLikelihoodAttr
- public getSourceRange
- public getStmtClass
- public getStmtClassName
- public printJson
- public printPretty
- public printPrettyControlled
- public stripLabelLikeStatements
- public stripLabelLikeStatements
- public viewAST
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)
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)
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)
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)
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)
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
clang::Stmt::const_child_range children() const
Declared at: clang/include/clang/AST/Expr.h:3398
¶clang::Stmt::child_range children()
clang::Stmt::child_range children()
Declared at: clang/include/clang/AST/Expr.h:3397
¶static bool classof(const clang::Stmt* T)
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
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::Expr* getBase() const
clang::Expr* getBase() const
Declared at: clang/include/clang/AST/Expr.h:3241
¶clang::SourceLocation getBeginLoc() const
clang::SourceLocation getBeginLoc() const
Declared at: clang/include/clang/AST/Expr.h:3356
¶clang::SourceLocation getEndLoc() const
clang::SourceLocation getEndLoc() const
Declared at: clang/include/clang/AST/Expr.h:3357
¶clang::SourceLocation getExprLoc() const
clang::SourceLocation getExprLoc() const
Declared at: clang/include/clang/AST/Expr.h:3359
¶clang::DeclAccessPair getFoundDecl() const
clang::DeclAccessPair getFoundDecl() const
Description
Retrieves the declaration found by lookup.
Declared at: clang/include/clang/AST/Expr.h:3251
¶clang::SourceLocation getLAngleLoc() const
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
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
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
clang::DeclarationNameInfo getMemberNameInfo()
const
Description
Retrieve the member declaration name info.
Declared at: clang/include/clang/AST/Expr.h:3341
¶unsigned int getNumTemplateArgs() const
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
clang::SourceLocation getOperatorLoc() const
Declared at: clang/include/clang/AST/Expr.h:3346
¶clang::NestedNameSpecifier* getQualifier() const
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
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
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
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
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
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
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
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
bool hasQualifierOrFoundDecl() const
Declared at: clang/include/clang/AST/Expr.h:3197
¶bool hasTemplateKWAndArgsInfo() const
bool hasTemplateKWAndArgsInfo() const
Declared at: clang/include/clang/AST/Expr.h:3201
¶bool hasTemplateKeyword() const
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
bool isArrow() const
Declared at: clang/include/clang/AST/Expr.h:3348
¶bool isImplicitAccess() const
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
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
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
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
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)
void setArrow(bool A)
Declared at: clang/include/clang/AST/Expr.h:3349
Parameters
- bool A
¶void setBase(clang::Expr* E)
void setBase(clang::Expr* E)
Declared at: clang/include/clang/AST/Expr.h:3240
Parameters
- clang::Expr* E
¶void setHadMultipleCandidates(bool V = true)
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)
void setMemberDecl(clang::ValueDecl* D)
Declared at: clang/include/clang/AST/Expr.h:3248
Parameters
¶void setMemberLoc(clang::SourceLocation L)
void setMemberLoc(clang::SourceLocation L)
Declared at: clang/include/clang/AST/Expr.h:3354
Parameters
¶ArrayRef<clang::TemplateArgumentLoc>
template_arguments() const
ArrayRef<clang::TemplateArgumentLoc>
template_arguments() const
Declared at: clang/include/clang/AST/Expr.h:3336