clang  6.0.0svn
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:
Inheritance graph
[legend]

Public Member Functions

virtual ~SubEngine ()
 
virtual ProgramStateRef getInitialState (const LocationContext *InitLoc)=0
 
virtual AnalysisManagergetAnalysisManager ()=0
 
virtual ProgramStateManagergetStateManager ()=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, const Stmt *Term, 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, ArrayRef< const MemRegion *> Regions, const CallEvent *Call, RegionAndSymbolInvalidationTraits &HTraits)=0
 
virtual void printState (raw_ostream &Out, ProgramStateRef State, const char *NL, const char *Sep)=0
 printState - Called by ProgramStateManager to print checker-specific data. More...
 
virtual void processEndWorklist (bool hasWorkRemaining)=0
 Called by CoreEngine when the analysis worklist is either empty or the. More...
 

Detailed Description

Definition at line 43 of file SubEngine.h.

Constructor & Destructor Documentation

◆ ~SubEngine()

virtual clang::ento::SubEngine::~SubEngine ( )
inlinevirtual

Member Function Documentation

◆ getAnalysisManager()

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

Implemented in clang::ento::ExprEngine.

Referenced by ~SubEngine().

◆ getInitialState()

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

Implemented in clang::ento::ExprEngine.

Referenced by ~SubEngine().

◆ getStateManager()

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

Implemented in clang::ento::ExprEngine.

Referenced by ~SubEngine().

◆ notifyCheckersOfPointerEscape()

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

Implemented in clang::ento::ExprEngine.

Referenced by processRegionChange().

◆ printState()

virtual void clang::ento::SubEngine::printState ( raw_ostream &  Out,
ProgramStateRef  State,
const char *  NL,
const char *  Sep 
)
pure virtual

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

Implemented in clang::ento::ExprEngine.

Referenced by clang::ento::ProgramState::print(), and processRegionChange().

◆ 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.

◆ processBranch()

virtual void clang::ento::SubEngine::processBranch ( const Stmt Condition,
const Stmt Term,
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.

◆ processCallEnter()

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

Implemented in clang::ento::ExprEngine.

◆ processCallExit()

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

Implemented in clang::ento::ExprEngine.

◆ 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.

◆ 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 ~SubEngine().

◆ 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.

◆ 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.

◆ processEndWorklist()

virtual void clang::ento::SubEngine::processEndWorklist ( bool  hasWorkRemaining)
pure virtual

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

Implemented in clang::ento::ExprEngine.

Referenced by processRegionChange().

◆ 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.

◆ processPointerEscapedOnBind()

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

Implemented in clang::ento::ExprEngine.

Referenced by processRegionChange().

◆ processRegionChange()

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

◆ 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.

Referenced by processRegionChange().

◆ 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.

◆ 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.


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