clang API Documentation
Represents a call to any sort of function that might have a FunctionDecl. More...
#include <CallEvent.h>
Public Member Functions | |
const FunctionDecl * | getDecl () const override |
Returns the declaration of the function or method that will be called. May be null. | |
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 |
ArrayRef< ParmVarDecl * > | parameters () const override |
Static Public Member Functions | |
static bool | classof (const CallEvent *CA) |
Protected Member Functions | |
AnyFunctionCall (const Expr *E, ProgramStateRef St, const LocationContext *LCtx) | |
AnyFunctionCall (const Decl *D, ProgramStateRef St, const LocationContext *LCtx) | |
AnyFunctionCall (const AnyFunctionCall &Other) |
Represents a call to any sort of function that might have a FunctionDecl.
Definition at line 380 of file CallEvent.h.
clang::ento::AnyFunctionCall::AnyFunctionCall | ( | const Expr * | E, |
ProgramStateRef | St, | ||
const LocationContext * | LCtx | ||
) | [inline, protected] |
Definition at line 382 of file CallEvent.h.
clang::ento::AnyFunctionCall::AnyFunctionCall | ( | const Decl * | D, |
ProgramStateRef | St, | ||
const LocationContext * | LCtx | ||
) | [inline, protected] |
Definition at line 385 of file CallEvent.h.
clang::ento::AnyFunctionCall::AnyFunctionCall | ( | const AnyFunctionCall & | Other | ) | [inline, protected] |
Definition at line 388 of file CallEvent.h.
bool AnyFunctionCall::argumentsMayEscape | ( | ) | const [override, virtual] |
Returns true if any of the arguments are known to escape to long- term storage, even if this method will not modify them.
Reimplemented from clang::ento::CallEvent.
Definition at line 327 of file CallEvent.cpp.
References getDecl(), clang::NamedDecl::getIdentifier(), clang::IdentifierInfo::getName(), clang::ento::CallEvent::hasNonZeroCallbackArg(), and clang::IdentifierInfo::isStr().
static bool clang::ento::AnyFunctionCall::classof | ( | const CallEvent * | CA | ) | [inline, static] |
Reimplemented in clang::ento::SimpleFunctionCall.
Definition at line 419 of file CallEvent.h.
References clang::ento::CE_BEG_FUNCTION_CALLS, clang::ento::CE_END_FUNCTION_CALLS, and clang::ento::CallEvent::getKind().
const FunctionDecl* clang::ento::AnyFunctionCall::getDecl | ( | ) | const [inline, override, virtual] |
Returns the declaration of the function or method that will be called. May be null.
Reimplemented from clang::ento::CallEvent.
Reimplemented in clang::ento::SimpleFunctionCall.
Definition at line 393 of file CallEvent.h.
Referenced by argumentsMayEscape(), clang::CXXInstanceCall::getDecl(), getRuntimeDefinition(), and parameters().
void AnyFunctionCall::getInitialStackFrameContents | ( | const StackFrameContext * | CalleeCtx, |
BindingsTy & | Bindings | ||
) | const [override, virtual] |
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 318 of file CallEvent.cpp.
References addParameterValuesToBindings(), clang::LocationContext::getDecl(), clang::ento::CallEvent::getState(), and clang::FunctionDecl::parameters().
Referenced by clang::CXXInstanceCall::getInitialStackFrameContents(), and clang::CXXConstructorCall::getInitialStackFrameContents().
RuntimeDefinition clang::ento::AnyFunctionCall::getRuntimeDefinition | ( | ) | const [inline, override, virtual] |
Returns the definition of the function or method that will be called.
Implements clang::ento::CallEvent.
Definition at line 397 of file CallEvent.h.
References clang::LocationContext::getAnalysisDeclContext(), clang::AnalysisDeclContext::getBody(), clang::AnalysisDeclContext::getDecl(), getDecl(), and clang::ento::CallEvent::getLocationContext().
Referenced by clang::CXXInstanceCall::getRuntimeDefinition(), clang::CXXMemberCall::getRuntimeDefinition(), and clang::CXXDestructorCall::getRuntimeDefinition().
ArrayRef< ParmVarDecl * > AnyFunctionCall::parameters | ( | ) | const [override, virtual] |
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 311 of file CallEvent.cpp.
References getDecl(), and clang::FunctionDecl::parameters().