clang API Documentation
Represents any expression that calls an Objective-C method. More...
#include <CallEvent.h>
Public Member Functions | |
virtual const ObjCMessageExpr * | getOriginExpr () const |
const ObjCMethodDecl * | getDecl () const override |
unsigned | getNumArgs () const override |
const Expr * | getArgExpr (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 ObjCInterfaceDecl * | getReceiverInterface () 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 |
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.
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.
bool ObjCMethodCall::argumentsMayEscape | ( | ) | const [override] |
Definition at line 872 of file CallEvent.cpp.
References clang::ento::CallEvent::argumentsMayEscape(), clang::Selector::getIdentifierInfoForSlot(), clang::Selector::getNumArgs(), and clang::IdentifierInfo::isStr().
bool ObjCMethodCall::canBeOverridenInSubclass | ( | ObjCInterfaceDecl * | IDecl, |
Selector | Sel | ||
) | const [protected, virtual] |
Check if the selector may have multiple definitions (may have overrides).
Definition at line 726 of file CallEvent.cpp.
References clang::ObjCMethodDecl::getClassInterface(), clang::ObjCInterfaceDecl::getEndOfDefinitionLoc(), clang::Decl::getLocation(), clang::ObjCInterfaceDecl::getSuperClass(), clang::SourceManager::isInMainFile(), clang::ObjCMethodDecl::isOverriding(), clang::SourceLocation::isValid(), clang::ObjCInterfaceDecl::lookupMethod(), clang::OCM_PropertyAccess, and SM.
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] |
Definition at line 883 of file CallEvent.cpp.
References addParameterValuesToBindings(), clang::LocationContext::getAnalysisDeclContext(), clang::LocationContext::getDecl(), clang::AnalysisDeclContext::getSelfDecl(), clang::ento::SValBuilder::getStateManager(), clang::ento::ProgramStateManager::getSValBuilder(), clang::ento::MemRegionManager::getVarRegion(), and clang::ObjCMethodDecl::parameters().
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().
ObjCMethodFamily clang::ObjCMethodCall::getMethodFamily | ( | ) | const [inline] |
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().
const ObjCInterfaceDecl* clang::ObjCMethodCall::getReceiverInterface | ( | ) | const [inline] |
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().
SVal ObjCMethodCall::getReceiverSVal | ( | ) | const |
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().
RuntimeDefinition ObjCMethodCall::getRuntimeDefinition | ( | ) | const [override] |
Definition at line 781 of file CallEvent.cpp.
References clang::ento::DynamicTypeInfo::canBeASubClass(), clang::ObjCObjectPointerType::getInterfaceDecl(), clang::ObjCMessageExpr::getMethodDecl(), clang::ObjCMessageExpr::getReceiverInterface(), clang::ObjCMessageExpr::getSelector(), clang::ObjCMessageExpr::getSuperType(), clang::ento::DynamicTypeInfo::getType(), clang::ObjCMessageExpr::isInstanceMessage(), and clang::QualType::isNull().
Selector clang::ObjCMethodCall::getSelector | ( | ) | const [inline] |
Definition at line 832 of file CallEvent.h.
Referenced by getFreeWhenDoneArg(), and isKnownDeallocObjCMethodName().
SVal ObjCMethodCall::getSelfSVal | ( | ) | const |
Return the value of 'self' if available.
Definition at line 619 of file CallEvent.cpp.
References clang::LocationContext::getSelfDecl().
SourceRange ObjCMethodCall::getSourceRange | ( | ) | const [override] |
Definition at line 656 of file CallEvent.cpp.
References clang::OCM_Message, clang::OCM_PropertyAccess, and clang::OCM_Subscript.
bool clang::ObjCMethodCall::isInstanceMessage | ( | ) | const [inline] |
Definition at line 826 of file CallEvent.h.
bool ObjCMethodCall::isReceiverSelfOrSuper | ( | ) | const |
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.
bool clang::ObjCMethodCall::isSetter | ( | ) | const [inline] |
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().
friend class CallEventManager [friend] |
Definition at line 792 of file CallEvent.h.