Showing content from https://clang.llvm.org/doxygen/classclang_1_1ento_1_1ObjCMethodCall.html below:
clang: clang::ento::ObjCMethodCall Class Reference
Represents any expression that calls an Objective-C method. More...
#include "clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h"
const ObjCMessageExpr * getOriginExpr () const override Returns the expression whose value will be the result of this call.
const ObjCMethodDecl * getDecl () const override Returns the declaration of the function or method that will be called.
unsigned getNumArgs () const override Returns the number of arguments (explicit and implicit).
const Expr * getArgExpr (unsigned Index) const override Returns the expression associated with a given argument.
bool isInstanceMessage () const ObjCMethodFamily getMethodFamily () const Selector getSelector () const SourceRange getSourceRange () const override Returns a source range for the entire call, suitable for outputting in diagnostics.
SVal getReceiverSVal () const Returns the value of the receiver at the time of this call.
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 Returns how the message was written in the source (property access, subscript, or explicit message send).
bool isSetter () const Returns true if this property access or subscript is a setter (has the form of an assignment).
const ObjCPropertyDecl * getAccessedProperty () const RuntimeDefinition getRuntimeDefinition () const override Returns the definition of the function or method that will be called.
bool argumentsMayEscape () const override Returns true if any of the arguments are known to escape to long- term storage, even if this method will not modify them.
void getInitialStackFrameContents (const StackFrameContext *CalleeCtx, BindingsTy &Bindings) const override Populates the given SmallVector with the bindings in the callee's stack frame at the start of this call.
ArrayRef< ParmVarDecl * > parameters () const override Return call's formal parameters.
Kind getKind () const override Returns the kind of call this is.
StringRef getKindAsString () const override CallEvent & operator= (const CallEvent &)=delete virtual ~CallEvent ()=default virtual Kind getKind () const =0 Returns the kind of call this is.
virtual StringRef getKindAsString () const =0 virtual const Decl * getDecl () const Returns the declaration of the function or method that will be called.
bool isForeign () const void setForeign (bool B) const const ProgramStateRef & getState () const The state in which the call is being evaluated.
const LocationContext * getLocationContext () const The context in which the call is being evaluated.
const CFGBlock::ConstCFGElementRef & getCFGElementRef () const virtual RuntimeDefinition getRuntimeDefinition () const =0 Returns the definition of the function or method that will be called.
virtual const Expr * getOriginExpr () const Returns the expression whose value will be the result of this call.
virtual unsigned getNumArgs () const =0 Returns the number of arguments (explicit and implicit).
bool isInSystemHeader () const Returns true if the callee is known to be from a system header.
virtual SourceRange getSourceRange () const Returns a source range for the entire call, suitable for outputting in diagnostics.
virtual SVal getArgSVal (unsigned Index) const Returns the value of a given argument at the time of the call.
virtual const Expr * getArgExpr (unsigned Index) const Returns the expression associated with a given argument.
virtual SourceRange getArgSourceRange (unsigned Index) const Returns the source range for errors associated with this argument.
QualType getResultType () const Returns the result type, adjusted for references.
SVal getReturnValue () const Returns the return value of the call.
bool hasNonNullArgumentsWithType (bool(*Condition)(QualType)) const Returns true if the type of any of the non-null arguments satisfies the condition.
bool hasNonZeroCallbackArg () const Returns true if any of the arguments appear to represent callbacks.
bool hasVoidPointerToNonConstArg () const Returns true if any of the arguments is void*.
virtual bool argumentsMayEscape () const Returns true if any of the arguments are known to escape to long- term storage, even if this method will not modify them.
bool isGlobalCFunction (StringRef SpecificName=StringRef()) const Returns true if the callee is an externally-visible function in the top-level namespace, such as malloc
.
const IdentifierInfo * getCalleeIdentifier () const Returns the name of the callee, if its name is a simple identifier.
ProgramPoint getProgramPoint (bool IsPreVisit=false, const ProgramPointTag *Tag=nullptr) const Returns an appropriate ProgramPoint for this call.
ProgramStateRef invalidateRegions (unsigned BlockCount, ProgramStateRef Orig=nullptr) const Returns a new state with all argument regions invalidated.
virtual void getInitialStackFrameContents (const StackFrameContext *CalleeCtx, BindingsTy &Bindings) const =0 Populates the given SmallVector with the bindings in the callee's stack frame at the start of this call.
template<typename T > CallEventRef< T > cloneWithState (ProgramStateRef NewState) const Returns a copy of this CallEvent, but using the given state.
CallEventRef cloneWithState (ProgramStateRef NewState) const Returns a copy of this CallEvent, but using the given state.
AnalysisDeclContext * getCalleeAnalysisDeclContext () const Returns AnalysisDeclContext for the callee stack frame.
const StackFrameContext * getCalleeStackFrame (unsigned BlockCount) const Returns the callee stack frame.
const ParamVarRegion * getParameterLocation (unsigned Index, unsigned BlockCount) const Returns memory location for a parameter variable within the callee stack frame.
bool isArgumentConstructedDirectly (unsigned Index) const Returns true if on the current path, the argument was constructed by calling a C++ constructor over it.
virtual std::optional< unsigned > getAdjustedParameterIndex (unsigned ASTArgumentIndex) const Some calls have parameter numbering mismatched from argument numbering.
virtual unsigned getASTArgumentIndex (unsigned CallArgumentIndex) const Some call event sub-classes conveniently adjust mismatching AST indices to match parameter indices.
const ConstructionContext * getConstructionContext () const Returns the construction context of the call, if it is a C++ constructor call or a call of a function returning a C++ class instance.
std::optional< SVal > getReturnValueUnderConstruction () const If the call returns a C++ record type then the region of its return value can be retrieved from its construction context.
const CallEventRef getCaller () const bool isCalledFromSystemHeader () const virtual ArrayRef< ParmVarDecl * > parameters () const =0 Return call's formal parameters.
param_type_iterator param_type_begin () const Returns an iterator over the types of the call's formal parameters.
param_type_iterator param_type_end () const void dump (raw_ostream &Out) const void dump () const ObjCMethodCall (const ObjCMessageExpr *Msg, ProgramStateRef St, const LocationContext *LCtx, CFGBlock::ConstCFGElementRef ElemRef) ObjCMethodCall (const ObjCMethodCall &Other)=default void cloneTo (void *Dest) const override Copies this CallEvent, with vtable intact, into a new block of memory.
void getExtraInvalidatedValues (ValueList &Values, RegionAndSymbolInvalidationTraits *ETraits) const override Used to specify non-argument regions that will be invalidated as a result of this call.
virtual bool canBeOverridenInSubclass (ObjCInterfaceDecl *IDecl, Selector Sel) const Check if the selector may have multiple definitions (may have overrides).
CallEvent (const Expr *E, ProgramStateRef state, const LocationContext *lctx, CFGBlock::ConstCFGElementRef ElemRef) CallEvent (const Decl *D, ProgramStateRef state, const LocationContext *lctx, CFGBlock::ConstCFGElementRef ElemRef) CallEvent (const CallEvent &Original) virtual void cloneTo (void *Dest) const =0 Copies this CallEvent, with vtable intact, into a new block of memory.
SVal getSVal (const Stmt *S) const Get the value of arbitrary expressions at this point in the path.
virtual void getExtraInvalidatedValues (ValueList &Values, RegionAndSymbolInvalidationTraits *ETraits) const Used to specify non-argument regions that will be invalidated as a result of this call.
Represents any expression that calls an Objective-C method.
This includes all of the kinds listed in ObjCMessageKind.
Definition at line 1248 of file CallEvent.h.
◆ ObjCMethodCall() [1/2] ◆ ObjCMethodCall() [2/2] clang::ento::ObjCMethodCall::ObjCMethodCall ( const ObjCMethodCall & Other ) protecteddefault ◆ argumentsMayEscape() bool ObjCMethodCall::argumentsMayEscape ( ) const overridevirtual ◆ canBeOverridenInSubclass() ◆ classof() static bool clang::ento::ObjCMethodCall::classof ( const CallEvent * CA ) inlinestatic ◆ cloneTo() void clang::ento::ObjCMethodCall::cloneTo ( void * Dest ) const inlineoverrideprotectedvirtual ◆ getAccessedProperty() ◆ getArgExpr() const Expr * clang::ento::ObjCMethodCall::getArgExpr ( unsigned Index ) const inlineoverridevirtual ◆ getDecl() ◆ getExtraInvalidatedValues() ◆ getInitialStackFrameContents()
Populates the given SmallVector with the bindings in the callee's stack frame at the start of this call.
Implements clang::ento::CallEvent.
Definition at line 1395 of file CallEvent.cpp.
References addParameterValuesToBindings(), D, clang::LocationContext::getAnalysisDeclContext(), clang::LocationContext::getDecl(), getReceiverSVal(), clang::ento::SValBuilder::getRegionManager(), clang::AnalysisDeclContext::getSelfDecl(), clang::ento::CallEvent::getState(), clang::ento::MemRegionManager::getVarRegion(), clang::ento::SVal::isUnknown(), and clang::ento::SValBuilder::makeLoc().
◆ getKind() Kind clang::ento::ObjCMethodCall::getKind ( ) const inlineoverridevirtual ◆ getKindAsString() StringRef clang::ento::ObjCMethodCall::getKindAsString ( ) const inlineoverridevirtual ◆ getMessageKind()
Returns how the message was written in the source (property access, subscript, or explicit message send).
Definition at line 1075 of file CallEvent.cpp.
References clang::ento::CallEvent::Data, clang::ento::CallEvent::getLocationContext(), getMessageKind(), getOriginExpr(), clang::ParentMap::getParentIgnoreParenCasts(), clang::LocationContext::getParentMap(), clang::Stmt::getStmtClass(), getSyntacticFromForPseudoObjectExpr(), clang::ento::OCM_Message, clang::ento::OCM_PropertyAccess, and clang::ento::OCM_Subscript.
Referenced by canBeOverridenInSubclass(), describeUninitializedArgumentInCall(), getAccessedProperty(), getMessageKind(), getSourceRange(), and isSetter().
◆ getMethodFamily() ◆ getNumArgs() unsigned clang::ento::ObjCMethodCall::getNumArgs ( ) const inlineoverridevirtual ◆ getOriginExpr() const ObjCMessageExpr * clang::ento::ObjCMethodCall::getOriginExpr ( ) const inlineoverridevirtual
Returns the expression whose value will be the result of this call.
May be null.
Reimplemented from clang::ento::CallEvent.
Definition at line 1274 of file CallEvent.h.
References clang::ento::CallEvent::getOriginExpr().
Referenced by getArgExpr(), getDecl(), getMessageKind(), getMethodFamily(), getNumArgs(), getReceiverInterface(), getReceiverSVal(), getRuntimeDefinition(), getSelector(), getSourceRange(), isInstanceMessage(), and isReceiverSelfOrSuper().
◆ getReceiverInterface() const ObjCInterfaceDecl * clang::ento::ObjCMethodCall::getReceiverInterface ( ) const inline ◆ getReceiverSVal() SVal ObjCMethodCall::getReceiverSVal ( ) const ◆ getRuntimeDefinition()
Returns the definition of the function or method that will be called.
Implements clang::ento::CallEvent.
Definition at line 1281 of file CallEvent.cpp.
References clang::ento::DynamicTypeInfo::canBeASubClass(), canBeOverridenInSubclass(), E, findDefiningRedecl(), clang::ento::SVal::getAsRegion(), clang::ObjCMethodDecl::getCanonicalDecl(), clang::QualType::getCanonicalType(), clang::ento::getClassObjectDynamicTypeInfo(), clang::ento::getDynamicTypeInfo(), clang::ObjCObjectType::getInterface(), clang::ento::CallEvent::getLocationContext(), getOriginExpr(), getReceiverSVal(), clang::ento::CallEvent::getState(), clang::ento::DynamicTypeInfo::getType(), clang::ObjCMethodDecl::hasBody(), clang::QualType::isNull(), clang::ObjCObjectType::isObjCClass(), clang::ento::DynamicTypeInfo::isValid(), and lookupRuntimeDefinition().
◆ getSelector() Selector clang::ento::ObjCMethodCall::getSelector ( ) const inline ◆ getSourceRange() ◆ isInstanceMessage() bool clang::ento::ObjCMethodCall::isInstanceMessage ( ) const inline ◆ isReceiverSelfOrSuper() bool ObjCMethodCall::isReceiverSelfOrSuper ( ) const ◆ isSetter() bool clang::ento::ObjCMethodCall::isSetter ( ) const inline ◆ parameters()
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 getArgSVal(0)
.
Implements clang::ento::CallEvent.
Definition at line 982 of file CallEvent.cpp.
References D, and getDecl().
◆ CallEventManager
The documentation for this class was generated from the following files:
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4