diff options
author | dim <dim@FreeBSD.org> | 2011-10-20 21:14:49 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2011-10-20 21:14:49 +0000 |
commit | 3963a48221351c61c17fb3f382341ab04809a3d3 (patch) | |
tree | ee2483e98b09cac943dc93a6969d83ca737ff139 /include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h | |
parent | 611ba3ea3300b71eb95dc4e45f20eee5dddd32e1 (diff) | |
download | FreeBSD-src-3963a48221351c61c17fb3f382341ab04809a3d3.zip FreeBSD-src-3963a48221351c61c17fb3f382341ab04809a3d3.tar.gz |
Vendor import of clang release_30 branch r142614:
http://llvm.org/svn/llvm-project/cfe/branches/release_30@142614
Diffstat (limited to 'include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h')
-rw-r--r-- | include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h b/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h index 199b41a..3f6ddde 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h @@ -14,8 +14,8 @@ #ifndef LLVM_CLANG_GR_CONSTRAINT_MANAGER_H #define LLVM_CLANG_GR_CONSTRAINT_MANAGER_H -// FIXME: Typedef LiveSymbolsTy/DeadSymbolsTy at a more appropriate place. -#include "clang/StaticAnalyzer/Core/PathSensitive/Store.h" +#include "clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h" +#include "clang/StaticAnalyzer/Core/PathSensitive/SVals.h" namespace llvm { class APSInt; @@ -25,36 +25,40 @@ namespace clang { namespace ento { -class GRState; -class GRStateManager; +class ProgramState; +class ProgramStateManager; class SubEngine; -class SVal; class ConstraintManager { public: virtual ~ConstraintManager(); - virtual const GRState *assume(const GRState *state, DefinedSVal Cond, - bool Assumption) = 0; + virtual const ProgramState *assume(const ProgramState *state, + DefinedSVal Cond, + bool Assumption) = 0; - std::pair<const GRState*, const GRState*> assumeDual(const GRState *state, - DefinedSVal Cond) { + std::pair<const ProgramState*, const ProgramState*> + assumeDual(const ProgramState *state, DefinedSVal Cond) + { return std::make_pair(assume(state, Cond, true), assume(state, Cond, false)); } - virtual const llvm::APSInt* getSymVal(const GRState *state, + virtual const llvm::APSInt* getSymVal(const ProgramState *state, SymbolRef sym) const = 0; - virtual bool isEqual(const GRState *state, SymbolRef sym, + virtual bool isEqual(const ProgramState *state, + SymbolRef sym, const llvm::APSInt& V) const = 0; - virtual const GRState *removeDeadBindings(const GRState *state, - SymbolReaper& SymReaper) = 0; + virtual const ProgramState *removeDeadBindings(const ProgramState *state, + SymbolReaper& SymReaper) = 0; - virtual void print(const GRState *state, llvm::raw_ostream& Out, - const char* nl, const char *sep) = 0; + virtual void print(const ProgramState *state, + raw_ostream &Out, + const char* nl, + const char *sep) = 0; - virtual void EndPath(const GRState *state) {} + virtual void EndPath(const ProgramState *state) {} /// canReasonAbout - Not all ConstraintManagers can accurately reason about /// all SVal values. This method returns true if the ConstraintManager can @@ -64,9 +68,9 @@ public: virtual bool canReasonAbout(SVal X) const = 0; }; -ConstraintManager* CreateBasicConstraintManager(GRStateManager& statemgr, +ConstraintManager* CreateBasicConstraintManager(ProgramStateManager& statemgr, SubEngine &subengine); -ConstraintManager* CreateRangeConstraintManager(GRStateManager& statemgr, +ConstraintManager* CreateRangeConstraintManager(ProgramStateManager& statemgr, SubEngine &subengine); } // end GR namespace |