clang 10.0.0git

Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
clang::CXXConstructorCall Class Reference

Represents a call to a C++ constructor. More...

`#include "clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h"`

Inheritance diagram for clang::CXXConstructorCall:
[legend]
Collaboration diagram for clang::CXXConstructorCall:
[legend]

## Public Member Functions
virtual const CXXConstructExpr * | getOriginExpr () const
const CXXConstructorDecl * | getDecl () const override
unsigned | getNumArgs () const override
const Expr * | getArgExpr (unsigned Index) const override
SVal | getCXXThisVal () const
| Returns the value of the implicit 'this' object. More...
void | getInitialStackFrameContents (const StackFrameContext *CalleeCtx, BindingsTy &Bindings) const override
Kind | getKind () const override

## Static Public Member Functions
static bool | classof (const CallEvent *CA)

## Protected Member Functions
| CXXConstructorCall (const CXXConstructExpr *CE, const MemRegion *Target, ProgramStateRef St, const LocationContext *LCtx)
| Creates a constructor call. More...
| CXXConstructorCall (const CXXConstructorCall &Other)=default
void | cloneTo (void *Dest) const override
void | getExtraInvalidatedValues (ValueList &Values, RegionAndSymbolInvalidationTraits *ETraits) const override

## Friends
class | CallEventManager

## Detailed Description

Represents a call to a C++ constructor.

Example: `T(1)`

Definition at line 817 of file CallEvent.h.

## Constructor & Destructor Documentation

## ◆ CXXConstructorCall() [1/2]

clang::CXXConstructorCall::CXXConstructorCall | ( | const CXXConstructExpr * | CE,
|  | const MemRegion * | Target,
|  | ProgramStateRef | St,
|  | const LocationContext * | LCtx
| ) |  |
| inline protected

Creates a constructor call.

Parameters

  CE | The constructor expression as written in the source.
  Target | The region where the object should be constructed. If NULL, a new symbolic region will be used.
  St | The path-sensitive state at this point in the program.
  LCtx | The location context at this point in the program.

Definition at line 828 of file CallEvent.h.

## ◆ CXXConstructorCall() [2/2]

clang::CXXConstructorCall::CXXConstructorCall | ( | const CXXConstructorCall & | Other | ) |
| protected default

## Member Function Documentation

## ◆ classof()

static bool clang::CXXConstructorCall::classof | ( | const CallEvent * | CA | ) |
| inline static

Definition at line 864 of file CallEvent.h.

References clang::ento::CE_CXXConstructor.

## ◆ cloneTo()

void clang::CXXConstructorCall::cloneTo | ( | void * | Dest | ) | const
| inline override protected

Definition at line 836 of file CallEvent.h.

## ◆ getArgExpr()

const Expr* clang::CXXConstructorCall::getArgExpr | ( | unsigned | Index | ) | const
| inline override

Definition at line 852 of file CallEvent.h.

## ◆ getCXXThisVal()

SVal CXXConstructorCall::getCXXThisVal | ( |  | ) | const

Returns the value of the implicit 'this' object.

Definition at line 892 of file CallEvent.cpp.

References clang::ento::CallEvent::Data.

## ◆ getDecl()

const CXXConstructorDecl* clang::CXXConstructorCall::getDecl | ( |  | ) | const
| inline override

Definition at line 846 of file CallEvent.h.

Referenced by clang::ento::ExprEngine::bindReturnValue().

## ◆ getExtraInvalidatedValues()

void CXXConstructorCall::getExtraInvalidatedValues | ( | ValueList & | Values,
|  | RegionAndSymbolInvalidationTraits * | ETraits
| ) |  | const
| override protected

Definition at line 898 of file CallEvent.cpp.

References clang::ento::CallEvent::Data, and clang::ento::RegionAndSymbolInvalidationTraits::TK_SuppressEscape.

## ◆ getInitialStackFrameContents()

void CXXConstructorCall::getInitialStackFrameContents | ( | const StackFrameContext * | CalleeCtx,
|  | BindingsTy & | Bindings
| ) |  | const
| override

Definition at line 909 of file CallEvent.cpp.

References clang::LocationContext::getDecl(), clang::ento::AnyFunctionCall::getInitialStackFrameContents(), and clang::ento::CallEvent::getState().

## ◆ getKind()

Kind clang::CXXConstructorCall::getKind | ( |  | ) | const
| inline override

Definition at line 862 of file CallEvent.h.

References clang::ento::CE_CXXConstructor.

## ◆ getNumArgs()

unsigned clang::CXXConstructorCall::getNumArgs | ( |  | ) | const
| inline override

Definition at line 850 of file CallEvent.h.

## ◆ getOriginExpr()

virtual const CXXConstructExpr* clang::CXXConstructorCall::getOriginExpr | ( |  | ) | const
| inline virtual

Definition at line 842 of file CallEvent.h.

References clang::ento::CallEvent::getOriginExpr().

Referenced by clang::ento::ExprEngine::bindReturnValue().

## Friends And Related Function Documentation

## ◆ CallEventManager

friend class CallEventManager
| friend

Definition at line 818 of file CallEvent.h.

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

- include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h
- lib/StaticAnalyzer/Core/CallEvent.cpp