diff options
author | Jordy Rose <jediknil@belkadan.com> | 2010-07-06 04:12:24 +0000 |
---|---|---|
committer | Jordy Rose <jediknil@belkadan.com> | 2010-07-06 04:12:24 +0000 |
commit | 5dd3af78a12d049d4591505570fcde79c2cc7bb0 (patch) | |
tree | 46c24dbc01b07626cce00b69363b21c04c2c2efe | |
parent | b829d72294b029ef1aff54052cae9890400071be (diff) |
Remove the now-unused GRState::isEqual method. Instead of asking if an expression equals a certain value, use SValuator::EvalEQ and GRState::Assume to see if it can, must, or must not equal that value.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107638 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/Checker/PathSensitive/GRState.h | 3 | ||||
-rw-r--r-- | lib/Checker/GRState.cpp | 25 |
2 files changed, 0 insertions, 28 deletions
diff --git a/include/clang/Checker/PathSensitive/GRState.h b/include/clang/Checker/PathSensitive/GRState.h index 020f339b35..67a2caf06a 100644 --- a/include/clang/Checker/PathSensitive/GRState.h +++ b/include/clang/Checker/PathSensitive/GRState.h @@ -470,9 +470,6 @@ public: const GRState* getPersistentState(GRState& Impl); - bool isEqual(const GRState* state, const Expr* Ex, const llvm::APSInt& V); - bool isEqual(const GRState* state, const Expr* Ex, uint64_t); - //==---------------------------------------------------------------------==// // Generic Data Map methods. //==---------------------------------------------------------------------==// diff --git a/lib/Checker/GRState.cpp b/lib/Checker/GRState.cpp index b14398a2e1..9e584b5614 100644 --- a/lib/Checker/GRState.cpp +++ b/lib/Checker/GRState.cpp @@ -343,28 +343,3 @@ bool GRState::scanReachableSymbols(const MemRegion * const *I, } return true; } - -//===----------------------------------------------------------------------===// -// Queries. -//===----------------------------------------------------------------------===// - -bool GRStateManager::isEqual(const GRState* state, const Expr* Ex, - const llvm::APSInt& Y) { - - SVal V = state->getSVal(Ex); - - if (loc::ConcreteInt* X = dyn_cast<loc::ConcreteInt>(&V)) - return X->getValue() == Y; - - if (nonloc::ConcreteInt* X = dyn_cast<nonloc::ConcreteInt>(&V)) - return X->getValue() == Y; - - if (SymbolRef Sym = V.getAsSymbol()) - return ConstraintMgr->isEqual(state, Sym, Y); - - return false; -} - -bool GRStateManager::isEqual(const GRState* state, const Expr* Ex, uint64_t x) { - return isEqual(state, Ex, getBasicVals().getValue(x, Ex->getType())); -} |