From: Jordy Rose Date: Tue, 8 May 2012 03:27:20 +0000 (+0000) Subject: [analyzer] BasicConstraintManager: drop NE-constraints once we have a value. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2cbc12fa24482889159926aab79e361ebe2e7f91;p=clang [analyzer] BasicConstraintManager: drop NE-constraints once we have a value. This could conceivably cut down on state proliferation, although we don't use BasicConstraintManager by default anymore. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156362 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/StaticAnalyzer/Core/BasicConstraintManager.cpp b/lib/StaticAnalyzer/Core/BasicConstraintManager.cpp index 7a095d57d2..8897756a92 100644 --- a/lib/StaticAnalyzer/Core/BasicConstraintManager.cpp +++ b/lib/StaticAnalyzer/Core/BasicConstraintManager.cpp @@ -333,7 +333,9 @@ BasicConstraintManager::assumeSymLE(ProgramStateRef state, ProgramStateRef BasicConstraintManager::AddEQ(ProgramStateRef state, SymbolRef sym, const llvm::APSInt& V) { - // Create a new state with the old binding replaced. + // Now that we have an actual value, we can throw out the NE-set. + // Create a new state with the old bindings replaced. + state = state->remove(sym); return state->set(sym, &getBasicVals().getValue(V)); }