|
clang
5.0.0
|
Represents any expression that calls an Objective-C method. More...
#include "clang/StaticAnalyzer/Core/PathSensitive/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. More... | |
| SVal | getSelfSVal () const |
| Return the value of 'self' if available. More... | |
| const ObjCInterfaceDecl * | getReceiverInterface () const |
| Get the interface for the receiver. More... | |
| bool | isReceiverSelfOrSuper () const |
| Checks if the receiver refers to 'self' or 'super'. More... | |
| ObjCMessageKind | getMessageKind () const |
| Returns how the message was written in the source (property access, subscript, or explicit message send). More... | |
| bool | isSetter () const |
| Returns true if this property access or subscript is a setter (has the form of an assignment). More... | |
| const ObjCPropertyDecl * | getAccessedProperty () 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, RegionAndSymbolInvalidationTraits *ETraits) const override |
| virtual bool | canBeOverridenInSubclass (ObjCInterfaceDecl *IDecl, Selector Sel) const |
| Check if the selector may have multiple definitions (may have overrides). More... | |
Friends | |
| class | CallEventManager |
Represents any expression that calls an Objective-C method.
This includes all of the kinds listed in ObjCMessageKind.
Definition at line 883 of file CallEvent.h.
|
inlineprotected |
Definition at line 889 of file CallEvent.h.
|
inlineprotected |
Definition at line 895 of file CallEvent.h.
|
override |
Definition at line 1081 of file CallEvent.cpp.
References clang::ento::CallEvent::argumentsMayEscape(), clang::Selector::getIdentifierInfoForSlot(), clang::Selector::getNumArgs(), and clang::IdentifierInfo::isStr().
|
protectedvirtual |
Check if the selector may have multiple definitions (may have overrides).
Definition at line 849 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.
Definition at line 982 of file CallEvent.h.
References clang::ento::CE_ObjCMessage.
|
inlineoverrideprotected |
Definition at line 896 of file CallEvent.h.
| const ObjCPropertyDecl * ObjCMethodCall::getAccessedProperty | ( | ) | const |
Definition at line 827 of file CallEvent.cpp.
References clang::ObjCMethodDecl::findPropertyDecl(), getSyntacticFromForPseudoObjectExpr(), clang::ObjCMethodDecl::isPropertyAccessor(), and clang::OCM_PropertyAccess.
Definition at line 915 of file CallEvent.h.
|
inlineoverride |
Definition at line 909 of file CallEvent.h.
Referenced by getMethodReceiverIfKnownImmutable().
|
overrideprotected |
Definition at line 689 of file CallEvent.cpp.
References clang::ento::SVal::getAsRegion(), clang::ento::RegionAndSymbolInvalidationTraits::setTrait(), clang::ento::RegionAndSymbolInvalidationTraits::TK_DoNotInvalidateSuperRegion, and clang::ento::RegionAndSymbolInvalidationTraits::TK_SuppressEscape.
|
override |
Definition at line 1092 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().
|
inlineoverride |
Definition at line 980 of file CallEvent.h.
References clang::ento::CE_ObjCMessage.
| ObjCMessageKind ObjCMethodCall::getMessageKind | ( | ) | const |
Returns how the message was written in the source (property access, subscript, or explicit message send).
Definition at line 782 of file CallEvent.cpp.
References clang::ParentMap::getParentIgnoreParenCasts(), clang::Stmt::getStmtClass(), getSyntacticFromForPseudoObjectExpr(), clang::OCM_Message, clang::OCM_PropertyAccess, clang::OCM_Subscript, and S.
Referenced by describeUninitializedArgumentInCall().
|
inline |
Definition at line 922 of file CallEvent.h.
Referenced by isInitMessage().
|
inlineoverride |
Definition at line 912 of file CallEvent.h.
|
inlinevirtual |
Definition at line 906 of file CallEvent.h.
References clang::ento::CallEvent::getOriginExpr().
Referenced by getMethodReceiverIfKnownImmutable().
|
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 941 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 722 of file CallEvent.cpp.
References clang::ento::SVal::isValid(), and clang::ObjCMessageExpr::SuperInstance.
Referenced by getMethodReceiverIfKnownImmutable(), and getReceiverNullability().
|
override |
Definition at line 936 of file CallEvent.cpp.
References clang::ento::DynamicTypeInfo::canBeASubClass(), E, findDefiningRedecl(), clang::QualType::getCanonicalType(), clang::ento::getDynamicTypeInfo(), clang::ObjCMessageExpr::getInstanceReceiver(), clang::ObjCObjectPointerType::getInterfaceDecl(), clang::ObjCMessageExpr::getMethodDecl(), clang::ObjCMessageExpr::getReceiverInterface(), clang::ObjCMessageExpr::getSelector(), clang::ObjCMessageExpr::getSuperType(), clang::ento::DynamicTypeInfo::getType(), ID, isCallToSelfClass(), clang::ObjCMessageExpr::isInstanceMessage(), clang::QualType::isNull(), and clang::ento::DynamicTypeInfo::isValid().
|
inline |
Definition at line 925 of file CallEvent.h.
Referenced by getFreeWhenDoneArg(), and isKnownDeallocObjCMethodName().
| SVal ObjCMethodCall::getSelfSVal | ( | ) | const |
Return the value of 'self' if available.
Definition at line 714 of file CallEvent.cpp.
References clang::LocationContext::getSelfDecl().
|
override |
Definition at line 751 of file CallEvent.cpp.
References clang::OCM_Message, clang::OCM_PropertyAccess, and clang::OCM_Subscript.
|
inline |
Definition at line 919 of file CallEvent.h.
| bool ObjCMethodCall::isReceiverSelfOrSuper | ( | ) | const |
Checks if the receiver refers to 'self' or 'super'.
Definition at line 738 of file CallEvent.cpp.
References clang::ObjCMessageExpr::SuperClass, and clang::ObjCMessageExpr::SuperInstance.
Referenced by getReceiverNullability().
|
inline |
Returns true if this property access or subscript is a setter (has the form of an assignment).
Definition at line 954 of file CallEvent.h.
References clang::OCM_Message, clang::OCM_PropertyAccess, and clang::OCM_Subscript.
Referenced by describeUninitializedArgumentInCall().
|
override |
Definition at line 682 of file CallEvent.cpp.
References clang::None, and clang::ObjCMethodDecl::parameters().
|
friend |
Definition at line 884 of file CallEvent.h.
1.8.6