clang API Documentation

Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends
clang::ObjCMethodCall Class Reference

Represents any expression that calls an Objective-C method. More...

#include <CallEvent.h>

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

List of all members.

Public Member Functions

virtual const ObjCMessageExprgetOriginExpr () const
const ObjCMethodDeclgetDecl () const override
unsigned getNumArgs () const override
const ExprgetArgExpr (unsigned Index) const override
bool isInstanceMessage () const
ObjCMethodFamily getMethodFamily () const
Selector getSelector () const
SourceRange getSourceRange () const override
SVal getReceiverSVal () const
 Returns the value of the receiver at the time of this call.
SVal getSelfSVal () const
 Return the value of 'self' if available.
const ObjCInterfaceDeclgetReceiverInterface () const
 Get the interface for the receiver.
bool isReceiverSelfOrSuper () const
 Checks if the receiver refers to 'self' or 'super'.
ObjCMessageKind getMessageKind () const
bool isSetter () const
RuntimeDefinition getRuntimeDefinition () const override
bool argumentsMayEscape () const override
void getInitialStackFrameContents (const StackFrameContext *CalleeCtx, BindingsTy &Bindings) const override
ArrayRef< ParmVarDecl * > parameters () const override
Kind getKind () const override

Static Public Member Functions

static bool classof (const CallEvent *CA)

Protected Member Functions

 ObjCMethodCall (const ObjCMessageExpr *Msg, ProgramStateRef St, const LocationContext *LCtx)
 ObjCMethodCall (const ObjCMethodCall &Other)
void cloneTo (void *Dest) const override
void getExtraInvalidatedValues (ValueList &Values) const override
virtual bool canBeOverridenInSubclass (ObjCInterfaceDecl *IDecl, Selector Sel) const
 Check if the selector may have multiple definitions (may have overrides).

Friends

class CallEventManager

Detailed Description

Represents any expression that calls an Objective-C method.

This includes all of the kinds listed in ObjCMessageKind.

Definition at line 791 of file CallEvent.h.


Constructor & Destructor Documentation

clang::ObjCMethodCall::ObjCMethodCall ( const ObjCMessageExpr Msg,
ProgramStateRef  St,
const LocationContext LCtx 
) [inline, protected]

Definition at line 797 of file CallEvent.h.

clang::ObjCMethodCall::ObjCMethodCall ( const ObjCMethodCall Other) [inline, protected]

Definition at line 803 of file CallEvent.h.


Member Function Documentation

bool ObjCMethodCall::canBeOverridenInSubclass ( ObjCInterfaceDecl IDecl,
Selector  Sel 
) const [protected, virtual]
static bool clang::ObjCMethodCall::classof ( const CallEvent CA) [inline, static]

Definition at line 884 of file CallEvent.h.

References clang::ento::CE_ObjCMessage.

void clang::ObjCMethodCall::cloneTo ( void *  Dest) const [inline, override, protected]

Definition at line 804 of file CallEvent.h.

const Expr* clang::ObjCMethodCall::getArgExpr ( unsigned  Index) const [inline, override]

Definition at line 822 of file CallEvent.h.

const ObjCMethodDecl* clang::ObjCMethodCall::getDecl ( ) const [inline, override]

Definition at line 816 of file CallEvent.h.

Referenced by getMethodReceiverIfKnownImmutable(), and wasSynthesizedProperty().

void ObjCMethodCall::getExtraInvalidatedValues ( ValueList Values) const [override, protected]

Definition at line 615 of file CallEvent.cpp.

void ObjCMethodCall::getInitialStackFrameContents ( const StackFrameContext CalleeCtx,
BindingsTy &  Bindings 
) const [override]
Kind clang::ObjCMethodCall::getKind ( ) const [inline, override]

Definition at line 882 of file CallEvent.h.

References clang::ento::CE_ObjCMessage.

Returns how the message was written in the source (property access, subscript, or explicit message send).

Definition at line 675 of file CallEvent.cpp.

References clang::ParentMap::getParentIgnoreParenCasts(), clang::Stmt::getStmtClass(), clang::OCM_Message, clang::OCM_PropertyAccess, clang::OCM_Subscript, and S.

Referenced by describeUninitializedArgumentInCall().

Definition at line 829 of file CallEvent.h.

Referenced by isInitMessage().

unsigned clang::ObjCMethodCall::getNumArgs ( ) const [inline, override]

Definition at line 819 of file CallEvent.h.

virtual const ObjCMessageExpr* clang::ObjCMethodCall::getOriginExpr ( ) const [inline, virtual]

Definition at line 813 of file CallEvent.h.

References clang::ento::CallEvent::getOriginExpr().

Referenced by getMethodReceiverIfKnownImmutable().

Get the interface for the receiver.

This works whether this is an instance message or a class message. However, it currently just uses the static type of the receiver.

Definition at line 848 of file CallEvent.h.

Referenced by GetReceiverInterfaceName().

Returns the value of the receiver at the time of this call.

Definition at line 627 of file CallEvent.cpp.

References clang::ento::SVal::isValid(), and clang::ObjCMessageExpr::SuperInstance.

Referenced by getMethodReceiverIfKnownImmutable().

Definition at line 832 of file CallEvent.h.

Referenced by getFreeWhenDoneArg(), and isKnownDeallocObjCMethodName().

Return the value of 'self' if available.

Definition at line 619 of file CallEvent.cpp.

References clang::LocationContext::getSelfDecl().

Definition at line 826 of file CallEvent.h.

Checks if the receiver refers to 'self' or 'super'.

Definition at line 643 of file CallEvent.cpp.

References clang::ObjCMessageExpr::SuperClass, and clang::ObjCMessageExpr::SuperInstance.

Returns true if this property access or subscript is a setter (has the form of an assignment).

Definition at line 861 of file CallEvent.h.

References clang::OCM_Message, clang::OCM_PropertyAccess, and clang::OCM_Subscript.

Referenced by describeUninitializedArgumentInCall().

ArrayRef< ParmVarDecl * > ObjCMethodCall::parameters ( ) const [override]

Definition at line 607 of file CallEvent.cpp.

References clang::ObjCMethodDecl::parameters().


Friends And Related Function Documentation

friend class CallEventManager [friend]

Definition at line 792 of file CallEvent.h.


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