class CXXMemberCallExpr

Declaration

class CXXMemberCallExpr : public CallExpr { /* full declaration omitted */ };

Description

Represents a call to a member function that may be written either with member call syntax (e.g., "obj.func()" or "objptr->func()") or with normal function-call syntax ("func()") within a member function that ends up calling a member function. The callee in either case is a MemberExpr that contains both the object argument and the member function, while the arguments are the arguments within the parentheses (not including the object argument).

Declared at: clang/include/clang/AST/ExprCXX.h:177

Inherits from: CallExpr

Member Variables

Inherited from CallExpr:

public static NotADL = ADLCallKind::NotADL
public static UsesADL = ADLCallKind::UsesADL

Inherited from Stmt:

protected

Method Overview

  • private CXXMemberCallExpr(clang::Expr * Fn, ArrayRef<clang::Expr *> Args, clang::QualType Ty, clang::ExprValueKind VK, clang::SourceLocation RP, clang::FPOptionsOverride FPOptions, unsigned int MinNumArgs)
  • private CXXMemberCallExpr(unsigned int NumArgs, bool HasFPFeatures, clang::Stmt::EmptyShell Empty)
  • public static clang::CXXMemberCallExpr * Create(const clang::ASTContext & Ctx, clang::Expr * Fn, ArrayRef<clang::Expr *> Args, clang::QualType Ty, clang::ExprValueKind VK, clang::SourceLocation RP, clang::FPOptionsOverride FPFeatures, unsigned int MinNumArgs = 0)
  • public static clang::CXXMemberCallExpr * CreateEmpty(const clang::ASTContext & Ctx, unsigned int NumArgs, bool HasFPFeatures, clang::Stmt::EmptyShell Empty)
  • public static bool classof(const clang::Stmt * T)
  • public clang::SourceLocation getExprLoc() const
  • public clang::Expr * getImplicitObjectArgument() const
  • public clang::CXXMethodDecl * getMethodDecl() const
  • public clang::QualType getObjectType() const
  • public clang::CXXRecordDecl * getRecordDecl() const

Inherited from CallExpr:

Inherited from Expr:

Inherited from ValueStmt:

Inherited from Stmt:

Methods

CXXMemberCallExpr(
    clang::Expr* Fn,
    ArrayRef<clang::Expr*> Args,
    clang::QualType Ty,
    clang::ExprValueKind VK,
    clang::SourceLocation RP,
    clang::FPOptionsOverride FPOptions,
    unsigned int MinNumArgs)

Declared at: clang/include/clang/AST/ExprCXX.h:181

Parameters

clang::Expr* Fn
ArrayRef<clang::Expr*> Args
clang::QualType Ty
clang::ExprValueKind VK
clang::SourceLocation RP
clang::FPOptionsOverride FPOptions
unsigned int MinNumArgs

CXXMemberCallExpr(unsigned int NumArgs,
                  bool HasFPFeatures,
                  clang::Stmt::EmptyShell Empty)

Declared at: clang/include/clang/AST/ExprCXX.h:185

Parameters

unsigned int NumArgs
bool HasFPFeatures
clang::Stmt::EmptyShell Empty

static clang::CXXMemberCallExpr* Create(
    const clang::ASTContext& Ctx,
    clang::Expr* Fn,
    ArrayRef<clang::Expr*> Args,
    clang::QualType Ty,
    clang::ExprValueKind VK,
    clang::SourceLocation RP,
    clang::FPOptionsOverride FPFeatures,
    unsigned int MinNumArgs = 0)

Declared at: clang/include/clang/AST/ExprCXX.h:188

Parameters

const clang::ASTContext& Ctx
clang::Expr* Fn
ArrayRef<clang::Expr*> Args
clang::QualType Ty
clang::ExprValueKind VK
clang::SourceLocation RP
clang::FPOptionsOverride FPFeatures
unsigned int MinNumArgs = 0

static clang::CXXMemberCallExpr* CreateEmpty(
    const clang::ASTContext& Ctx,
    unsigned int NumArgs,
    bool HasFPFeatures,
    clang::Stmt::EmptyShell Empty)

Declared at: clang/include/clang/AST/ExprCXX.h:194

Parameters

const clang::ASTContext& Ctx
unsigned int NumArgs
bool HasFPFeatures
clang::Stmt::EmptyShell Empty

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

Declared at: clang/include/clang/AST/ExprCXX.h:226

Parameters

const clang::Stmt* T

clang::SourceLocation getExprLoc() const

Declared at: clang/include/clang/AST/ExprCXX.h:218

clang::Expr* getImplicitObjectArgument() const

Description

Retrieve the implicit object argument for the member call. For example, in "x.f(5)", this returns the sub-expression "x".

Declared at: clang/include/clang/AST/ExprCXX.h:200

clang::CXXMethodDecl* getMethodDecl() const

Description

Retrieve the declaration of the called method.

Declared at: clang/include/clang/AST/ExprCXX.h:208

clang::QualType getObjectType() const

Description

Retrieve the type of the object argument. Note that this always returns a non-pointer type.

Declared at: clang/include/clang/AST/ExprCXX.h:205

clang::CXXRecordDecl* getRecordDecl() const

Description

Retrieve the CXXRecordDecl for the underlying type of the implicit object argument. Note that this is may not be the same declaration as that of the class context of the CXXMethodDecl which this function is calling. FIXME: Returns 0 for member pointer call exprs.

Declared at: clang/include/clang/AST/ExprCXX.h:216