diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-06-18 22:57:13 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-06-18 22:57:13 +0000 |
commit | f9906843b7a30dd08a65598b422de1c5a6a9bee2 (patch) | |
tree | 33e38758866bdc36ed0517b9e6ccbf416f39dbd9 /clang/lib/Analysis/RangeConstraintManager.cpp | |
parent | fb8097b5763bc97e98739a6128c0c4aa441121a2 (diff) | |
download | bcm5719-llvm-f9906843b7a30dd08a65598b422de1c5a6a9bee2.tar.gz bcm5719-llvm-f9906843b7a30dd08a65598b422de1c5a6a9bee2.zip |
libAnalysis:
- Remove the 'isFeasible' flag from all uses of 'Assume'.
- Remove the 'Assume' methods from GRStateManager. Now the only way to
create a new GRState with an assumption is to use the new 'assume' methods
in GRState.
llvm-svn: 73731
Diffstat (limited to 'clang/lib/Analysis/RangeConstraintManager.cpp')
-rw-r--r-- | clang/lib/Analysis/RangeConstraintManager.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/clang/lib/Analysis/RangeConstraintManager.cpp b/clang/lib/Analysis/RangeConstraintManager.cpp index 89f3a716d24..3b4d0c4122c 100644 --- a/clang/lib/Analysis/RangeConstraintManager.cpp +++ b/clang/lib/Analysis/RangeConstraintManager.cpp @@ -239,22 +239,22 @@ public: : SimpleConstraintManager(statemgr) {} const GRState* AssumeSymNE(const GRState* St, SymbolRef sym, - const llvm::APSInt& V, bool& isFeasible); + const llvm::APSInt& V); const GRState* AssumeSymEQ(const GRState* St, SymbolRef sym, - const llvm::APSInt& V, bool& isFeasible); + const llvm::APSInt& V); const GRState* AssumeSymLT(const GRState* St, SymbolRef sym, - const llvm::APSInt& V, bool& isFeasible); + const llvm::APSInt& V); const GRState* AssumeSymGT(const GRState* St, SymbolRef sym, - const llvm::APSInt& V, bool& isFeasible); + const llvm::APSInt& V); const GRState* AssumeSymGE(const GRState* St, SymbolRef sym, - const llvm::APSInt& V, bool& isFeasible); + const llvm::APSInt& V); const GRState* AssumeSymLE(const GRState* St, SymbolRef sym, - const llvm::APSInt& V, bool& isFeasible); + const llvm::APSInt& V); const llvm::APSInt* getSymVal(const GRState* St, SymbolRef sym) const; @@ -327,10 +327,9 @@ RangeConstraintManager::GetRange(const GRState *state, SymbolRef sym) { #define AssumeX(OP)\ const GRState*\ RangeConstraintManager::AssumeSym ## OP(const GRState* state, SymbolRef sym,\ - const llvm::APSInt& V, bool& isFeasible){\ + const llvm::APSInt& V){\ const RangeSet& R = GetRange(state, sym).Add##OP(state->getBasicVals(), F, V);\ - isFeasible = !R.isEmpty();\ - return isFeasible ? state->set<ConstraintRange>(sym, R) : 0;\ + return !R.isEmpty() ? state->set<ConstraintRange>(sym, R) : NULL;\ } AssumeX(EQ) |