summaryrefslogtreecommitdiffstats
path: root/clang/lib/Checker/FlatStore.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Checker/FlatStore.cpp')
-rw-r--r--clang/lib/Checker/FlatStore.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/clang/lib/Checker/FlatStore.cpp b/clang/lib/Checker/FlatStore.cpp
index 7c986a71df5..21fa422166f 100644
--- a/clang/lib/Checker/FlatStore.cpp
+++ b/clang/lib/Checker/FlatStore.cpp
@@ -90,8 +90,9 @@ StoreManager *clang::CreateFlatStoreManager(GRStateManager &StMgr) {
SVal FlatStoreManager::Retrieve(Store store, Loc L, QualType T) {
const MemRegion *R = cast<loc::MemRegionVal>(L).getRegion();
RegionInterval RI = RegionToInterval(R);
-
- assert(RI.R && "should handle regions with unknown interval");
+ // FIXME: FlatStore should handle regions with unknown intervals.
+ if (!RI.R)
+ return UnknownVal();
RegionBindings B = getRegionBindings(store);
const BindingVal *BV = B.lookup(RI.R);
@@ -123,7 +124,9 @@ Store FlatStoreManager::Bind(Store store, Loc L, SVal val) {
BV = *V;
RegionInterval RI = RegionToInterval(R);
- assert(RI.R && "should handle regions with unknown interval");
+ // FIXME: FlatStore should handle regions with unknown intervals.
+ if (!RI.R)
+ return B.getRoot();
BV = BVFactory.Add(BV, RI.I, val);
B = RBFactory.Add(B, RI.R, BV);
return B.getRoot();
OpenPOWER on IntegriCloud