diff options
Diffstat (limited to 'lib/Checker/RegionStore.cpp')
-rw-r--r-- | lib/Checker/RegionStore.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Checker/RegionStore.cpp b/lib/Checker/RegionStore.cpp index 1603cc81a5..d9ad02a35c 100644 --- a/lib/Checker/RegionStore.cpp +++ b/lib/Checker/RegionStore.cpp @@ -280,8 +280,12 @@ public: // Part of public interface to class. Store Bind(Store store, Loc LV, SVal V); + // BindDefault is only used to initialize a region with a default value. Store BindDefault(Store store, const MemRegion *R, SVal V) { - return Add(GetRegionBindings(store), R, BindingKey::Default, V).getRoot(); + RegionBindings B = GetRegionBindings(store); + assert(!Lookup(B, R, BindingKey::Default)); + assert(!Lookup(B, R, BindingKey::Direct)); + return Add(B, R, BindingKey::Default, V).getRoot(); } Store BindCompoundLiteral(Store store, const CompoundLiteralExpr* CL, |