summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/RegionStore.cpp
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2009-03-09 06:49:50 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2009-03-09 06:49:50 +0000
commitb09280bcc0be7fb575c9c2958b10815e95b9e6ab (patch)
treeb85bd833a72383c43e5d758c565eb7e28a1ba0e0 /clang/lib/Analysis/RegionStore.cpp
parente3193ff452975b737bce4d3b79213bbf069ee843 (diff)
downloadbcm5719-llvm-b09280bcc0be7fb575c9c2958b10815e95b9e6ab.tar.gz
bcm5719-llvm-b09280bcc0be7fb575c9c2958b10815e95b9e6ab.zip
Fix a serious bug in RegionStore: we got the new state with new store from
Bind() and BindStruct(), but we returned a state with the old store. llvm-svn: 66409
Diffstat (limited to 'clang/lib/Analysis/RegionStore.cpp')
-rw-r--r--clang/lib/Analysis/RegionStore.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/Analysis/RegionStore.cpp b/clang/lib/Analysis/RegionStore.cpp
index ba67829d0c7..9ef3fe84639 100644
--- a/clang/lib/Analysis/RegionStore.cpp
+++ b/clang/lib/Analysis/RegionStore.cpp
@@ -1046,8 +1046,6 @@ const GRState* RegionStoreManager::BindArray(const GRState* St,
St = state.set<RegionDefaultValue>(R, NonLoc::MakeIntVal(getBasicVals(), 0,
false));
- Store store = St->getStore();
-
ConstantArrayType* CAT = cast<ConstantArrayType>(T.getTypePtr());
llvm::APSInt Size(CAT->getSize(), false);
@@ -1076,7 +1074,7 @@ const GRState* RegionStoreManager::BindArray(const GRState* St,
St = Bind(St, loc::MemRegionVal(ER), V);
}
- return StateMgr.MakeStateWithStore(St, store);
+ return St;
}
@@ -1098,7 +1096,7 @@ const GRState* RegionStoreManager::BindArray(const GRState* St,
St = Bind(St, Loc::MakeVal(ER), *VI);
}
- return StateMgr.MakeStateWithStore(St, store);
+ return St;
}
const GRState*
OpenPOWER on IntegriCloud