clang API Documentation

Public Member Functions | Static Public Member Functions
clang::CXXMemberCallExpr Class Reference

#include <ExprCXX.h>

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

List of all members.

Public Member Functions

 CXXMemberCallExpr (ASTContext &C, Expr *fn, Expr **args, unsigned numargs, QualType t, ExprValueKind VK, SourceLocation RP)
 CXXMemberCallExpr (ASTContext &C, EmptyShell Empty)
ExprgetImplicitObjectArgument () const
CXXMethodDeclgetMethodDecl () const
 Retrieves the declaration of the called method.
CXXRecordDeclgetRecordDecl ()

Static Public Member Functions

static bool classof (const Stmt *T)
static bool classof (const CXXMemberCallExpr *)

Detailed Description

CXXMemberCallExpr - 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).

Definition at line 92 of file ExprCXX.h.


Constructor & Destructor Documentation

clang::CXXMemberCallExpr::CXXMemberCallExpr ( ASTContext C,
Expr fn,
Expr **  args,
unsigned  numargs,
QualType  t,
ExprValueKind  VK,
SourceLocation  RP 
) [inline]

Definition at line 94 of file ExprCXX.h.

clang::CXXMemberCallExpr::CXXMemberCallExpr ( ASTContext C,
EmptyShell  Empty 
) [inline]

Definition at line 98 of file ExprCXX.h.


Member Function Documentation

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

Reimplemented from clang::CallExpr.

Definition at line 116 of file ExprCXX.h.

References clang::Stmt::getStmtClass().

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

Definition at line 119 of file ExprCXX.h.

Expr * CXXMemberCallExpr::getImplicitObjectArgument ( ) const

getImplicitObjectArgument - Retrieves the implicit object argument for the member call. For example, in "x.f(5)", this operation would return "x".

Definition at line 438 of file ExprCXX.cpp.

References clang::CallExpr::getCallee(), and clang::Expr::IgnoreParens().

Referenced by getRecordDecl().

CXXMethodDecl * CXXMemberCallExpr::getMethodDecl ( ) const

Retrieves the declaration of the called method.

Definition at line 447 of file ExprCXX.cpp.

References clang::CallExpr::getCallee(), and clang::Expr::IgnoreParens().

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

CXXRecordDecl * CXXMemberCallExpr::getRecordDecl ( )

getRecordDecl - Retrieves 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.

Definition at line 457 of file ExprCXX.cpp.

References getImplicitObjectArgument(), and clang::Expr::getType().


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