1 //== GRTransferFuncs.h - Path-Sens. Transfer Functions Interface -*- C++ -*--=//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file defines GRTransferFuncs, which provides a base-class that
11 // defines an interface for transfer functions used by GRExprEngine.
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_CLANG_ANALYSIS_GRTF
16 #define LLVM_CLANG_ANALYSIS_GRTF
18 #include "clang/Checker/PathSensitive/GRState.h"
19 #include "clang/Checker/PathSensitive/SVals.h"
24 class ExplodedNodeSet
;
25 class GREndPathNodeBuilder
;
27 class GRStmtNodeBuilder
;
28 class GRStmtNodeBuilderRef
;
29 class ObjCMessageExpr
;
31 class GRTransferFuncs
{
34 virtual ~GRTransferFuncs() {}
36 virtual void RegisterPrinters(std::vector
<GRState::Printer
*>& Printers
) {}
37 virtual void RegisterChecks(GRExprEngine
& Eng
) {}
42 virtual void evalCall(ExplodedNodeSet
& Dst
,
44 GRStmtNodeBuilder
& Builder
,
45 const CallExpr
* CE
, SVal L
,
46 ExplodedNode
* Pred
) {}
48 virtual void evalObjCMessageExpr(ExplodedNodeSet
& Dst
,
50 GRStmtNodeBuilder
& Builder
,
51 const ObjCMessageExpr
* ME
,
53 const GRState
*state
) {}
57 virtual void evalBind(GRStmtNodeBuilderRef
& B
, SVal location
, SVal val
) {}
59 // End-of-path and dead symbol notification.
61 virtual void evalEndPath(GRExprEngine
& Engine
,
62 GREndPathNodeBuilder
& Builder
) {}
65 virtual void evalDeadSymbols(ExplodedNodeSet
& Dst
,
67 GRStmtNodeBuilder
& Builder
,
70 SymbolReaper
& SymReaper
) {}
73 virtual void evalReturn(ExplodedNodeSet
& Dst
,
75 GRStmtNodeBuilder
& Builder
,
77 ExplodedNode
* Pred
) {}
80 virtual const GRState
* evalAssume(const GRState
*state
,
81 SVal Cond
, bool Assumption
) {
85 } // end clang namespace