diff options
Diffstat (limited to 'lib/Checker/RegionStore.cpp')
-rw-r--r-- | lib/Checker/RegionStore.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Checker/RegionStore.cpp b/lib/Checker/RegionStore.cpp index ddcb7bee49..1603cc81a5 100644 --- a/lib/Checker/RegionStore.cpp +++ b/lib/Checker/RegionStore.cpp @@ -280,6 +280,10 @@ public: // Part of public interface to class. Store Bind(Store store, Loc LV, SVal V); + Store BindDefault(Store store, const MemRegion *R, SVal V) { + return Add(GetRegionBindings(store), R, BindingKey::Default, V).getRoot(); + } + Store BindCompoundLiteral(Store store, const CompoundLiteralExpr* CL, const LocationContext *LC, SVal V); @@ -1233,7 +1237,7 @@ SVal RegionStoreManager::RetrieveFieldOrElementCommon(Store store, if (D->isZeroConstant()) return ValMgr.makeZeroVal(Ty); - if (D->isUnknown()) + if (D->isUnknownOrUndef()) return *D; assert(0 && "Unknown default value"); @@ -1456,6 +1460,7 @@ Store RegionStoreManager::BindCompoundLiteral(Store store, V); } + Store RegionStoreManager::setImplicitDefaultValue(Store store, const MemRegion *R, QualType T) { |