clang API Documentation

Public Member Functions | Static Public Member Functions | Protected Member Functions
clang::ento::AnyFunctionCall Class Reference

Represents a call to any sort of function that might have a FunctionDecl. More...

#include <CallEvent.h>

Inheritance diagram for clang::ento::AnyFunctionCall:
Inheritance graph
[legend]
Collaboration diagram for clang::ento::AnyFunctionCall:
Collaboration graph
[legend]

List of all members.

Public Member Functions

const FunctionDeclgetDecl () 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)

Detailed Description

Represents a call to any sort of function that might have a FunctionDecl.

Definition at line 380 of file CallEvent.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

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]
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().

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().


The documentation for this class was generated from the following files: