clang 8.0.0

Public Member Functions | List of all members
clang::ento::SubEngine Class Referenceabstract

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

Inheritance diagram for clang::ento::SubEngine:
[legend]

## Public Member Functions
virtual | ~SubEngine ()
virtual ProgramStateRef | getInitialState (const LocationContext *InitLoc)=0
virtual AnalysisManager & | getAnalysisManager ()=0
virtual cross_tu::CrossTranslationUnitContext * | getCrossTranslationUnitContext ()=0
virtual ProgramStateManager & | getStateManager ()=0
virtual void | processCFGElement (const CFGElement E, ExplodedNode *Pred, unsigned StmtIdx, NodeBuilderContext *Ctx)=0
| Called by CoreEngine. More...
virtual void | processCFGBlockEntrance (const BlockEdge &L, NodeBuilderWithSinks &nodeBuilder, ExplodedNode *Pred)=0
| Called by CoreEngine when it starts processing a CFGBlock. More...
virtual void | processBranch (const Stmt *Condition, NodeBuilderContext &BuilderCtx, ExplodedNode *Pred, ExplodedNodeSet &Dst, const CFGBlock *DstT, const CFGBlock *DstF)=0
| Called by CoreEngine. More...
virtual void | processCleanupTemporaryBranch (const CXXBindTemporaryExpr *BTE, NodeBuilderContext &BldCtx, ExplodedNode *Pred, ExplodedNodeSet &Dst, const CFGBlock *DstT, const CFGBlock *DstF)=0
| Called by CoreEngine. More...
virtual void | processStaticInitializer (const DeclStmt *DS, NodeBuilderContext &BuilderCtx, ExplodedNode *Pred, ExplodedNodeSet &Dst, const CFGBlock *DstT, const CFGBlock *DstF)=0
| Called by CoreEngine. More...
virtual void | processIndirectGoto (IndirectGotoNodeBuilder &builder)=0
| Called by CoreEngine. More...
virtual void | processSwitch (SwitchNodeBuilder &builder)=0
| Called by CoreEngine. More...
virtual void | processBeginOfFunction (NodeBuilderContext &BC, ExplodedNode *Pred, ExplodedNodeSet &Dst, const BlockEdge &L)=0
| Called by CoreEngine. More...
virtual void | processEndOfFunction (NodeBuilderContext &BC, ExplodedNode *Pred, const ReturnStmt *RS=nullptr)=0
| Called by CoreEngine. More...
virtual void | processCallEnter (NodeBuilderContext &BC, CallEnter CE, ExplodedNode *Pred)=0
virtual void | processCallExit (ExplodedNode *Pred)=0
virtual ProgramStateRef | processAssume (ProgramStateRef state, SVal cond, bool assumption)=0
| Called by ConstraintManager. More...
virtual ProgramStateRef | processRegionChanges (ProgramStateRef state, const InvalidatedSymbols *invalidated, ArrayRef< const MemRegion *> ExplicitRegions, ArrayRef< const MemRegion *> Regions, const LocationContext *LCtx, const CallEvent *Call)=0
| processRegionChanges - Called by ProgramStateManager whenever a change is made to the store. More...
ProgramStateRef | processRegionChange (ProgramStateRef state, const MemRegion *MR, const LocationContext *LCtx)
virtual ProgramStateRef | processPointerEscapedOnBind (ProgramStateRef State, SVal Loc, SVal Val, const LocationContext *LCtx)=0
virtual ProgramStateRef | notifyCheckersOfPointerEscape (ProgramStateRef State, const InvalidatedSymbols *Invalidated, ArrayRef< const MemRegion *> ExplicitRegions, const CallEvent *Call, RegionAndSymbolInvalidationTraits &HTraits)=0
virtual void | printState (raw_ostream &Out, ProgramStateRef State, const char *NL, const char *Sep, const LocationContext *LCtx=nullptr)=0
| printState - Called by ProgramStateManager to print checker-specific data. More...
virtual void | processEndWorklist ()=0
| Called by CoreEngine when the analysis worklist is either empty or the. More...

## Detailed Description

Definition at line 47 of file SubEngine.h.

## Constructor & Destructor Documentation

## ◆ ~SubEngine()

virtual clang::ento::SubEngine::~SubEngine | ( |  | ) |
| inline virtual

Definition at line 50 of file SubEngine.h.

References clang::CodeGen::state.

## Member Function Documentation

## ◆ getAnalysisManager()

virtual AnalysisManager& clang::ento::SubEngine::getAnalysisManager | ( |  | ) |
| pure virtual

Implemented in clang::ento::ExprEngine.

Referenced by clang::ento::AnyFunctionCall::getRuntimeDefinition(), and clang::ento::SValBuilder::makeSymExprValNN().

## ◆ getCrossTranslationUnitContext()

virtual cross_tu::CrossTranslationUnitContext* clang::ento::SubEngine::getCrossTranslationUnitContext | ( |  | ) |
| pure virtual

Implemented in clang::ento::ExprEngine.

Referenced by clang::ento::AnyFunctionCall::getRuntimeDefinition().

## ◆ getInitialState()

virtual ProgramStateRef clang::ento::SubEngine::getInitialState | ( | const LocationContext * | InitLoc | ) |
| pure virtual

Implemented in clang::ento::ExprEngine.

Referenced by clang::ento::CoreEngine::ExecuteWorkList().

## ◆ getStateManager()

virtual ProgramStateManager& clang::ento::SubEngine::getStateManager | ( |  | ) |
| pure virtual

Implemented in clang::ento::ExprEngine.

## ◆ notifyCheckersOfPointerEscape()

virtual ProgramStateRef clang::ento::SubEngine::notifyCheckersOfPointerEscape | ( | ProgramStateRef | State,
|  | const InvalidatedSymbols * | Invalidated,
|  | ArrayRef< const MemRegion *> | ExplicitRegions,
|  | const CallEvent * | Call,
|  | RegionAndSymbolInvalidationTraits & | HTraits
| ) |  |
| pure virtual

Implemented in clang::ento::ExprEngine.

## ◆ printState()

virtual void clang::ento::SubEngine::printState | ( | raw_ostream & | Out,
|  | ProgramStateRef | State,
|  | const char * | NL,
|  | const char * | Sep,
|  | const LocationContext * | LCtx = `nullptr`
| ) |  |
| pure virtual

printState - Called by ProgramStateManager to print checker-specific data.

Implemented in clang::ento::ExprEngine.

## ◆ processAssume()

virtual ProgramStateRef clang::ento::SubEngine::processAssume | ( | ProgramStateRef | state,
|  | SVal | cond,
|  | bool | assumption
| ) |  |
| pure virtual

Called by ConstraintManager.

Used to call checker-specific logic for handling assumptions on symbolic values.

Implemented in clang::ento::ExprEngine.

Referenced by clang::ento::SimpleConstraintManager::assume().

## ◆ processBeginOfFunction()

virtual void clang::ento::SubEngine::processBeginOfFunction | ( | NodeBuilderContext & | BC,
|  | ExplodedNode * | Pred,
|  | ExplodedNodeSet & | Dst,
|  | const BlockEdge & | L
| ) |  |
| pure virtual

Called by CoreEngine.

Used to notify checkers that processing a function has begun. Called for both inlined and and top-level functions.

Implemented in clang::ento::ExprEngine.

Referenced by clang::ento::CoreEngine::ExecuteWorkList().

## ◆ processBranch()

virtual void clang::ento::SubEngine::processBranch | ( | const Stmt * | Condition,
|  | NodeBuilderContext & | BuilderCtx,
|  | ExplodedNode * | Pred,
|  | ExplodedNodeSet & | Dst,
|  | const CFGBlock * | DstT,
|  | const CFGBlock * | DstF
| ) |  |
| pure virtual

Called by CoreEngine.

Used to generate successor nodes by processing the 'effects' of a branch condition.

Implemented in clang::ento::ExprEngine.

Referenced by clang::ento::CoreEngine::ExecuteWorkListWithInitialState().

## ◆ processCallEnter()

virtual void clang::ento::SubEngine::processCallEnter | ( | NodeBuilderContext & | BC,
|  | CallEnter | CE,
|  | ExplodedNode * | Pred
| ) |  |
| pure virtual

Implemented in clang::ento::ExprEngine.

Referenced by clang::ento::CoreEngine::ExecuteWorkListWithInitialState().

## ◆ processCallExit()

virtual void clang::ento::SubEngine::processCallExit | ( | ExplodedNode * | Pred | ) |
| pure virtual

Implemented in clang::ento::ExprEngine.

Referenced by clang::ento::CoreEngine::dispatchWorkItem().

## ◆ processCFGBlockEntrance()

virtual void clang::ento::SubEngine::processCFGBlockEntrance | ( | const BlockEdge & | L,
|  | NodeBuilderWithSinks & | nodeBuilder,
|  | ExplodedNode * | Pred
| ) |  |
| pure virtual

Called by CoreEngine when it starts processing a CFGBlock.

The SubEngine is expected to populate dstNodes with new nodes representing updated analysis state, or generate no nodes at all if it doesn't.

Implemented in clang::ento::ExprEngine.

Referenced by clang::ento::CoreEngine::ExecuteWorkListWithInitialState().

## ◆ processCFGElement()

virtual void clang::ento::SubEngine::processCFGElement | ( | const CFGElement | E,
|  | ExplodedNode * | Pred,
|  | unsigned | StmtIdx,
|  | NodeBuilderContext * | Ctx
| ) |  |
| pure virtual

Called by CoreEngine.

Used to generate new successor nodes by processing the 'effects' of a block-level statement.

Implemented in clang::ento::ExprEngine.

Referenced by clang::ento::CoreEngine::ExecuteWorkListWithInitialState().

## ◆ processCleanupTemporaryBranch()

virtual void clang::ento::SubEngine::processCleanupTemporaryBranch | ( | const CXXBindTemporaryExpr * | BTE,
|  | NodeBuilderContext & | BldCtx,
|  | ExplodedNode * | Pred,
|  | ExplodedNodeSet & | Dst,
|  | const CFGBlock * | DstT,
|  | const CFGBlock * | DstF
| ) |  |
| pure virtual

Called by CoreEngine.

Used to generate successor nodes for temporary destructors depending on whether the corresponding constructor was visited.

Implemented in clang::ento::ExprEngine.

Referenced by clang::ento::CoreEngine::ExecuteWorkListWithInitialState().

## ◆ processEndOfFunction()

virtual void clang::ento::SubEngine::processEndOfFunction | ( | NodeBuilderContext & | BC,
|  | ExplodedNode * | Pred,
|  | const ReturnStmt * | RS = `nullptr`
| ) |  |
| pure virtual

Called by CoreEngine.

Used to notify checkers that processing a function has ended. Called for both inlined and and top-level functions.

Implemented in clang::ento::ExprEngine.

Referenced by clang::ento::CoreEngine::ExecuteWorkListWithInitialState().

## ◆ processEndWorklist()

virtual void clang::ento::SubEngine::processEndWorklist | ( |  | ) |
| pure virtual

Called by CoreEngine when the analysis worklist is either empty or the.

Implemented in clang::ento::ExprEngine.

Referenced by clang::ento::CoreEngine::ExecuteWorkList().

## ◆ processIndirectGoto()

virtual void clang::ento::SubEngine::processIndirectGoto | ( | IndirectGotoNodeBuilder & | builder | ) |
| pure virtual

Called by CoreEngine.

Used to generate successor nodes by processing the 'effects' of a computed goto jump.

Implemented in clang::ento::ExprEngine.

Referenced by clang::ento::CoreEngine::ExecuteWorkListWithInitialState().

## ◆ processPointerEscapedOnBind()

virtual ProgramStateRef clang::ento::SubEngine::processPointerEscapedOnBind | ( | ProgramStateRef | State,
|  | SVal | Loc,
|  | SVal | Val,
|  | const LocationContext * | LCtx
| ) |  |
| pure virtual

Implemented in clang::ento::ExprEngine.

## ◆ processRegionChange()

ProgramStateRef clang::ento::SubEngine::processRegionChange | ( | ProgramStateRef | state,
|  | const MemRegion * | MR,
|  | const LocationContext * | LCtx
| ) |  |
| inline

Definition at line 146 of file SubEngine.h.

References State.

Referenced by clang::ento::ProgramState::bindDefaultInitial(), clang::ento::ProgramState::bindDefaultZero(), clang::ento::ExprEngine::getInitialState(), and clang::ento::ProgramStateManager::removeDeadBindings().

## ◆ processRegionChanges()

virtual ProgramStateRef clang::ento::SubEngine::processRegionChanges | ( | ProgramStateRef | state,
|  | const InvalidatedSymbols * | invalidated,
|  | ArrayRef< const MemRegion *> | ExplicitRegions,
|  | ArrayRef< const MemRegion *> | Regions,
|  | const LocationContext * | LCtx,
|  | const CallEvent * | Call
| ) |  |
| pure virtual

processRegionChanges - Called by ProgramStateManager whenever a change is made to the store.

Used to update checkers that track region values.

Implemented in clang::ento::ExprEngine.

## ◆ processStaticInitializer()

virtual void clang::ento::SubEngine::processStaticInitializer | ( | const DeclStmt * | DS,
|  | NodeBuilderContext & | BuilderCtx,
|  | ExplodedNode * | Pred,
|  | ExplodedNodeSet & | Dst,
|  | const CFGBlock * | DstT,
|  | const CFGBlock * | DstF
| ) |  |
| pure virtual

Called by CoreEngine.

Used to processing branching behavior at static initializers.

Implemented in clang::ento::ExprEngine.

Referenced by clang::ento::CoreEngine::ExecuteWorkListWithInitialState().

## ◆ processSwitch()

virtual void clang::ento::SubEngine::processSwitch | ( | SwitchNodeBuilder & | builder | ) |
| pure virtual

Called by CoreEngine.

Used to generate successor nodes by processing the 'effects' of a switch statement.

Implemented in clang::ento::ExprEngine.

Referenced by clang::ento::CoreEngine::ExecuteWorkListWithInitialState().

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

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