[cfe-commits] r110310 - /cfe/trunk/lib/Checker/GRState.cpp
Jordy Rose
jediknil at belkadan.com
Wed Aug 4 20:33:56 PDT 2010
Author: jrose
Date: Wed Aug 4 22:33:56 2010
New Revision: 110310
URL: http://llvm.org/viewvc/llvm-project?rev=110310&view=rev
Log:
Tweak GRState::unbindLoc to use makeWithStore, and make sure it's only called for non-region locations.
Modified:
cfe/trunk/lib/Checker/GRState.cpp
Modified: cfe/trunk/lib/Checker/GRState.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/GRState.cpp?rev=110310&r1=110309&r2=110310&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/GRState.cpp (original)
+++ cfe/trunk/lib/Checker/GRState.cpp Wed Aug 4 22:33:56 2010
@@ -69,15 +69,15 @@
}
const GRState *GRState::unbindLoc(Loc LV) const {
+ assert(!isa<loc::MemRegionVal>(LV) && "Use InvalidateRegion instead.");
+
Store OldStore = getStore();
Store NewStore = getStateManager().StoreMgr->Remove(OldStore, LV);
if (NewStore == OldStore)
return this;
- GRState NewSt = *this;
- NewSt.St = NewStore;
- return getStateManager().getPersistentState(NewSt);
+ return makeWithStore(NewStore);
}
SVal GRState::getSValAsScalarOrLoc(const MemRegion *R) const {
More information about the cfe-commits
mailing list