opnsense-src/include/clang/Checker/PathSensitive/GRTransferFuncs.h

86 lines
2.7 KiB
C
Raw Normal View History

2009-06-02 13:58:47 -04:00
//== GRTransferFuncs.h - Path-Sens. Transfer Functions Interface -*- C++ -*--=//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file defines GRTransferFuncs, which provides a base-class that
// defines an interface for transfer functions used by GRExprEngine.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_ANALYSIS_GRTF
#define LLVM_CLANG_ANALYSIS_GRTF
2010-02-16 04:31:36 -05:00
#include "clang/Checker/PathSensitive/SVals.h"
#include "clang/Checker/PathSensitive/GRCoreEngine.h"
#include "clang/Checker/PathSensitive/GRState.h"
2009-06-02 13:58:47 -04:00
#include <vector>
namespace clang {
2009-10-14 14:03:49 -04:00
2009-06-27 06:45:02 -04:00
class GRExprEngine;
class ObjCMessageExpr;
class GRStmtNodeBuilderRef;
2009-10-14 14:03:49 -04:00
2009-06-02 13:58:47 -04:00
class GRTransferFuncs {
public:
GRTransferFuncs() {}
virtual ~GRTransferFuncs() {}
2009-10-14 14:03:49 -04:00
2009-06-02 13:58:47 -04:00
virtual void RegisterPrinters(std::vector<GRState::Printer*>& Printers) {}
2009-11-04 10:04:32 -05:00
virtual void RegisterChecks(GRExprEngine& Eng) {}
2009-10-14 14:03:49 -04:00
2009-06-02 13:58:47 -04:00
// Calls.
2009-10-14 14:03:49 -04:00
virtual void EvalCall(ExplodedNodeSet& Dst,
2009-06-02 13:58:47 -04:00
GRExprEngine& Engine,
2009-10-14 14:03:49 -04:00
GRStmtNodeBuilder& Builder,
2009-06-02 13:58:47 -04:00
CallExpr* CE, SVal L,
2009-10-14 14:03:49 -04:00
ExplodedNode* Pred) {}
virtual void EvalObjCMessageExpr(ExplodedNodeSet& Dst,
2009-06-02 13:58:47 -04:00
GRExprEngine& Engine,
2009-10-14 14:03:49 -04:00
GRStmtNodeBuilder& Builder,
2009-06-02 13:58:47 -04:00
ObjCMessageExpr* ME,
2009-12-15 13:49:47 -05:00
ExplodedNode* Pred,
const GRState *state) {}
2009-10-14 14:03:49 -04:00
2009-06-02 13:58:47 -04:00
// Stores.
2009-10-14 14:03:49 -04:00
2009-06-02 13:58:47 -04:00
virtual void EvalBind(GRStmtNodeBuilderRef& B, SVal location, SVal val) {}
2009-10-14 14:03:49 -04:00
2009-06-02 13:58:47 -04:00
// End-of-path and dead symbol notification.
2009-10-14 14:03:49 -04:00
2009-06-02 13:58:47 -04:00
virtual void EvalEndPath(GRExprEngine& Engine,
2009-10-14 14:03:49 -04:00
GREndPathNodeBuilder& Builder) {}
virtual void EvalDeadSymbols(ExplodedNodeSet& Dst,
2009-06-02 13:58:47 -04:00
GRExprEngine& Engine,
2009-10-14 14:03:49 -04:00
GRStmtNodeBuilder& Builder,
ExplodedNode* Pred,
2009-06-02 13:58:47 -04:00
Stmt* S, const GRState* state,
SymbolReaper& SymReaper) {}
2009-10-14 14:03:49 -04:00
// Return statements.
virtual void EvalReturn(ExplodedNodeSet& Dst,
2009-06-02 13:58:47 -04:00
GRExprEngine& Engine,
2009-10-14 14:03:49 -04:00
GRStmtNodeBuilder& Builder,
2009-06-02 13:58:47 -04:00
ReturnStmt* S,
2009-10-14 14:03:49 -04:00
ExplodedNode* Pred) {}
2009-06-02 13:58:47 -04:00
2009-10-14 14:03:49 -04:00
// Assumptions.
2009-06-22 04:08:35 -04:00
virtual const GRState* EvalAssume(const GRState *state,
SVal Cond, bool Assumption) {
return state;
2009-11-04 10:04:32 -05:00
}
2009-06-02 13:58:47 -04:00
};
} // end clang namespace
#endif