clang
3.7.0
|
Represents a C function or static C++ member function call. More...
#include <CallEvent.h>
Public Member Functions | |
virtual const CallExpr * | getOriginExpr () const |
const FunctionDecl * | getDecl () const override |
Returns the declaration of the function or method that will be called. May be null. More... | |
unsigned | getNumArgs () const override |
Returns the number of arguments (explicit and implicit). More... | |
const Expr * | getArgExpr (unsigned Index) const override |
Returns the expression associated with a given argument. May be null if this expression does not appear in the source. More... | |
Kind | getKind () const override |
Returns the kind of call this is. More... | |
![]() | |
RuntimeDefinition | getRuntimeDefinition () const override |
Returns the definition of the function or method that will be called. More... | |
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. More... | |
void | getInitialStackFrameContents (const StackFrameContext *CalleeCtx, BindingsTy &Bindings) const override |
ArrayRef< ParmVarDecl * > | parameters () const override |
![]() | |
virtual | ~CallEvent () |
const ProgramStateRef & | getState () const |
The state in which the call is being evaluated. More... | |
const LocationContext * | getLocationContext () const |
The context in which the call is being evaluated. More... | |
const Expr * | getOriginExpr () const |
Returns the expression whose value will be the result of this call. May be null. More... | |
bool | isInSystemHeader () const |
Returns true if the callee is known to be from a system header. More... | |
virtual SourceRange | getSourceRange () const |
Returns a source range for the entire call, suitable for outputting in diagnostics. More... | |
virtual SVal | getArgSVal (unsigned Index) const |
Returns the value of a given argument at the time of the call. More... | |
virtual SourceRange | getArgSourceRange (unsigned Index) const |
Returns the source range for errors associated with this argument. More... | |
QualType | getResultType () const |
Returns the result type, adjusted for references. More... | |
SVal | getReturnValue () const |
Returns the return value of the call. More... | |
bool | hasNonZeroCallbackArg () const |
Returns true if any of the arguments appear to represent callbacks. More... | |
bool | isGlobalCFunction (StringRef SpecificName=StringRef()) const |
Returns true if the callee is an externally-visible function in the top-level namespace, such as malloc . More... | |
const IdentifierInfo * | getCalleeIdentifier () const |
Returns the name of the callee, if its name is a simple identifier. More... | |
ProgramPoint | getProgramPoint (bool IsPreVisit=false, const ProgramPointTag *Tag=nullptr) const |
Returns an appropriate ProgramPoint for this call. More... | |
ProgramStateRef | invalidateRegions (unsigned BlockCount, ProgramStateRef Orig=nullptr) const |
Returns a new state with all argument regions invalidated. More... | |
template<typename T > | |
CallEventRef< T > | cloneWithState (ProgramStateRef NewState) const |
Returns a copy of this CallEvent, but using the given state. More... | |
CallEventRef | cloneWithState (ProgramStateRef NewState) const |
Returns a copy of this CallEvent, but using the given state. More... | |
param_type_iterator | param_type_begin () const |
param_type_iterator | param_type_end () const |
void | dump (raw_ostream &Out) const |
void | dump () const |
template<typename T > | |
CallEventRef< T > | cloneWithState (ProgramStateRef NewState) const |
Static Public Member Functions | |
static bool | classof (const CallEvent *CA) |
![]() | |
static bool | classof (const CallEvent *CA) |
![]() | |
static bool | isCallStmt (const Stmt *S) |
Returns true if this is a statement is a function or method call of some kind. More... | |
static QualType | getDeclaredResultType (const Decl *D) |
Returns the result type of a function or method declaration. More... | |
static bool | isVariadic (const Decl *D) |
Returns true if the given decl is known to be variadic. More... | |
Protected Member Functions | |
SimpleFunctionCall (const CallExpr *CE, ProgramStateRef St, const LocationContext *LCtx) | |
SimpleFunctionCall (const SimpleFunctionCall &Other) | |
void | cloneTo (void *Dest) const override |
Copies this CallEvent, with vtable intact, into a new block of memory. More... | |
![]() | |
AnyFunctionCall (const Expr *E, ProgramStateRef St, const LocationContext *LCtx) | |
AnyFunctionCall (const Decl *D, ProgramStateRef St, const LocationContext *LCtx) | |
AnyFunctionCall (const AnyFunctionCall &Other) | |
![]() | |
CallEvent (const Expr *E, ProgramStateRef state, const LocationContext *lctx) | |
CallEvent (const Decl *D, ProgramStateRef state, const LocationContext *lctx) | |
CallEvent (const CallEvent &Original) | |
SVal | getSVal (const Stmt *S) const |
Get the value of arbitrary expressions at this point in the path. More... | |
virtual void | getExtraInvalidatedValues (ValueList &Values) const |
Used to specify non-argument regions that will be invalidated as a result of this call. More... | |
Friends | |
class | CallEventManager |
Additional Inherited Members | |
![]() | |
typedef CallEventKind | Kind |
typedef std::pair< Loc, SVal > | FrameBindingTy |
typedef SmallVectorImpl < FrameBindingTy > | BindingsTy |
typedef llvm::mapped_iterator < ArrayRef< ParmVarDecl * > ::iterator, get_type_fun > | param_type_iterator |
![]() | |
typedef SmallVectorImpl< SVal > | ValueList |
![]() | |
const void * | Data |
SourceLocation | Location |
Represents a C function or static C++ member function call.
Example: fun()
Definition at line 428 of file CallEvent.h.
|
inlineprotected |
Definition at line 432 of file CallEvent.h.
Referenced by cloneTo().
|
inlineprotected |
Definition at line 435 of file CallEvent.h.
Definition at line 456 of file CallEvent.h.
References clang::ento::CE_Function, and clang::ento::CallEvent::getKind().
|
inlineoverrideprotectedvirtual |
Copies this CallEvent, with vtable intact, into a new block of memory.
Implements clang::ento::CallEvent.
Definition at line 437 of file CallEvent.h.
References SimpleFunctionCall().
|
inlineoverridevirtual |
Returns the expression associated with a given argument. May be null if this expression does not appear in the source.
Reimplemented from clang::ento::CallEvent.
Definition at line 450 of file CallEvent.h.
References clang::CallExpr::getArg(), and getOriginExpr().
|
overridevirtual |
Returns the declaration of the function or method that will be called. May be null.
Reimplemented from clang::ento::AnyFunctionCall.
Definition at line 384 of file CallEvent.cpp.
References clang::ento::SVal::getAsFunctionDecl(), clang::CallExpr::getDirectCallee(), getOriginExpr(), and clang::ento::CallEvent::getSVal().
|
inlineoverridevirtual |
Returns the kind of call this is.
Implements clang::ento::CallEvent.
Definition at line 454 of file CallEvent.h.
References clang::ento::CE_Function.
|
inlineoverridevirtual |
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.
Implements clang::ento::CallEvent.
Definition at line 448 of file CallEvent.h.
References clang::CallExpr::getNumArgs(), and getOriginExpr().
|
inlinevirtual |
Definition at line 442 of file CallEvent.h.
References clang::ento::CallEvent::getOriginExpr().
Referenced by getArgExpr(), getDecl(), and getNumArgs().
|
friend |
Definition at line 429 of file CallEvent.h.