clang API Documentation

Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends
clang::ento::SimpleFunctionCall Class Reference

Represents a C function or static C++ member function call. More...

#include <CallEvent.h>

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

List of all members.

Public Member Functions

virtual const CallExprgetOriginExpr () const
 Returns the expression whose value will be the result of this call. May be null.
const FunctionDeclgetDecl () const override
 Returns the declaration of the function or method that will be called. May be null.
unsigned getNumArgs () const override
 Returns the number of arguments (explicit and implicit).
const ExprgetArgExpr (unsigned Index) const override
 Returns the expression associated with a given argument. May be null if this expression does not appear in the source.
Kind getKind () const override
 Returns the kind of call this is.

Static Public Member Functions

static bool classof (const CallEvent *CA)

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.

Friends

class CallEventManager

Detailed Description

Represents a C function or static C++ member function call.

Example: fun()

Definition at line 428 of file CallEvent.h.


Constructor & Destructor Documentation

clang::ento::SimpleFunctionCall::SimpleFunctionCall ( const CallExpr CE,
ProgramStateRef  St,
const LocationContext LCtx 
) [inline, protected]

Definition at line 432 of file CallEvent.h.

Referenced by cloneTo().

Definition at line 435 of file CallEvent.h.


Member Function Documentation

static bool clang::ento::SimpleFunctionCall::classof ( const CallEvent CA) [inline, static]

Reimplemented from clang::ento::AnyFunctionCall.

Definition at line 456 of file CallEvent.h.

References clang::ento::CE_Function, and clang::ento::CallEvent::getKind().

void clang::ento::SimpleFunctionCall::cloneTo ( void *  Dest) const [inline, override, protected, virtual]

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

const Expr* clang::ento::SimpleFunctionCall::getArgExpr ( unsigned  Index) const [inline, override, virtual]

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

const FunctionDecl * SimpleFunctionCall::getDecl ( ) const [override, virtual]

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

Kind clang::ento::SimpleFunctionCall::getKind ( ) const [inline, override, virtual]

Returns the kind of call this is.

Implements clang::ento::CallEvent.

Definition at line 454 of file CallEvent.h.

References clang::ento::CE_Function.

unsigned clang::ento::SimpleFunctionCall::getNumArgs ( ) const [inline, override, virtual]

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

virtual const CallExpr* clang::ento::SimpleFunctionCall::getOriginExpr ( ) const [inline, virtual]

Returns the expression whose value will be the result of this call. May be null.

Reimplemented from clang::ento::CallEvent.

Definition at line 442 of file CallEvent.h.

Referenced by getArgExpr(), getDecl(), and getNumArgs().


Friends And Related Function Documentation

friend class CallEventManager [friend]

Reimplemented from clang::ento::CallEvent.

Definition at line 429 of file CallEvent.h.


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