class ObjCMethodCall

Declaration

class ObjCMethodCall : public CallEvent { /* full declaration omitted */ };

Description

Represents any expression that calls an Objective-C method. This includes all of the kinds listed in ObjCMessageKind.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1119

Inherits from: CallEvent

Member Variables

Inherited from CallEvent:

protected Data
protected Location

Method Overview

Inherited from CallEvent:

Methods

ObjCMethodCall(const clang::ObjCMessageExpr* Msg,
               clang::ento::ProgramStateRef St,
               const clang::LocationContext* LCtx)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1125

Parameters

const clang::ObjCMessageExpr* Msg
clang::ento::ProgramStateRef St
const clang::LocationContext* LCtx

ObjCMethodCall(
    const clang::ento::ObjCMethodCall& Other)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1131

Parameters

const clang::ento::ObjCMethodCall& Other

bool argumentsMayEscape() const

Description

Returns true if any of the arguments are known to escape to long- term storage, even if this method will not modify them.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1212

virtual bool canBeOverridenInSubclass(
    clang::ObjCInterfaceDecl* IDecl,
    clang::Selector Sel) const

Description

Check if the selector may have multiple definitions (may have overrides).

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1139

Parameters

clang::ObjCInterfaceDecl* IDecl
clang::Selector Sel

static bool classof(
    const clang::ento::CallEvent* CA)

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1222

Parameters

const clang::ento::CallEvent* CA

void cloneTo(void* Dest) const

Description

Copies this CallEvent, with vtable intact, into a new block of memory.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1133

Parameters

void* Dest

const clang::ObjCPropertyDecl*
getAccessedProperty() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1208

const clang::Expr* getArgExpr(
    unsigned int Index) const

Description

Returns the expression associated with a given argument. May be null if this expression does not appear in the source.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1155

Parameters

unsigned int Index

const clang::PseudoObjectExpr*
getContainingPseudoObjectExpr() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1122

const clang::ObjCMethodDecl* getDecl() const

Description

Returns the declaration of the function or method that will be called. May be null.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1147

void getExtraInvalidatedValues(
    clang::ento::CallEvent::ValueList& Values,
    clang::ento::
        RegionAndSymbolInvalidationTraits*
            ETraits) const

Description

Used to specify non-argument regions that will be invalidated as a result of this call.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1135

Parameters

clang::ento::CallEvent::ValueList& Values
clang::ento::RegionAndSymbolInvalidationTraits* ETraits

void getInitialStackFrameContents(
    const clang::StackFrameContext* CalleeCtx,
    clang::ento::CallEvent::BindingsTy& Bindings)
    const

Description

Populates the given SmallVector with the bindings in the callee's stack frame at the start of this call.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1214

Parameters

const clang::StackFrameContext* CalleeCtx
clang::ento::CallEvent::BindingsTy& Bindings

clang::ento::CallEvent::Kind getKind() const

Description

Returns the kind of call this is.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1219

llvm::StringRef getKindAsString() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1220

clang::ento::ObjCMessageKind getMessageKind()
    const

Description

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

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1189

clang::ObjCMethodFamily getMethodFamily() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1163

unsigned int getNumArgs() const

Description

Returns the number of arguments (explicit and implicit). Note that this may be greater than the number of parameters in the callee's declaration, and that it may include arguments not written in the source.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1151

const clang::ObjCMessageExpr* getOriginExpr()
    const

Description

Returns the expression whose value will be the result of this call. May be null.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1143

const clang::ObjCInterfaceDecl*
getReceiverInterface() const

Description

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.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1180

clang::ento::SVal getReceiverSVal() const

Description

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

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1174

clang::ento::RuntimeDefinition
getRuntimeDefinition() const

Description

Returns the definition of the function or method that will be called.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1210

clang::Selector getSelector() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1167

clang::SourceRange getSourceRange() const

Description

Returns a source range for the entire call, suitable for outputting in diagnostics.

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1171

bool isInstanceMessage() const

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1159

bool isReceiverSelfOrSuper() const

Description

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

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1185

bool isSetter() const

Description

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

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1193

ArrayRef<clang::ParmVarDecl*> parameters() const

Description

Return call's formal parameters. Remember that the number of formal parameters may not match the number of arguments for all calls. However, the first parameter will always correspond with the argument value returned by \c getArgSVal(0).

Declared at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:1217