1 //== TransferFuncs.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 TransferFuncs, which provides a base-class that
11 // defines an interface for transfer functions used by ExprEngine.
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_CLANG_GR_TRANSFERFUNCS
16 #define LLVM_CLANG_GR_TRANSFERFUNCS
18 #include "clang/StaticAnalyzer/Core/PathSensitive/GRState.h"
19 #include "clang/StaticAnalyzer/Core/PathSensitive/SVals.h"
20 #include "clang/StaticAnalyzer/Core/PathSensitive/ObjCMessage.h"
24 class ObjCMessageExpr;
28 class ExplodedNodeSet;
29 class EndOfFunctionNodeBuilder;
31 class StmtNodeBuilder;
32 class StmtNodeBuilderRef;
37 virtual ~TransferFuncs() {}
39 virtual void RegisterPrinters(std::vector<GRState::Printer*>& Printers) {}
40 virtual void RegisterChecks(ExprEngine& Eng) {}
45 virtual void evalCall(ExplodedNodeSet& Dst,
47 StmtNodeBuilder& Builder,
48 const CallExpr* CE, SVal L,
49 ExplodedNode* Pred) {}
51 virtual void evalObjCMessage(ExplodedNodeSet& Dst,
53 StmtNodeBuilder& Builder,
56 const GRState *state) {}
60 virtual void evalBind(StmtNodeBuilderRef& B, SVal location, SVal val) {}
62 // End-of-path and dead symbol notification.
64 virtual void evalEndPath(ExprEngine& Engine,
65 EndOfFunctionNodeBuilder& Builder) {}
68 virtual void evalDeadSymbols(ExplodedNodeSet& Dst,
70 StmtNodeBuilder& Builder,
73 SymbolReaper& SymReaper) {}
76 virtual void evalReturn(ExplodedNodeSet& Dst,
78 StmtNodeBuilder& Builder,
80 ExplodedNode* Pred) {}
83 virtual const GRState* evalAssume(const GRState *state,
84 SVal Cond, bool Assumption) {
91 } // end clang namespace