diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 19:18:08 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 19:18:08 +0000 | 
| commit | bab175ec4b075c8076ba14c762900392533f6ee4 (patch) | |
| tree | 01f4f29419a2cb10abe13c1e63cd2a66068b0137 /lib/StaticAnalyzer/Core/RegionStore.cpp | |
| parent | 8b7a8012d223fac5d17d16a66bb39168a9a1dfc0 (diff) | |
Notes
Diffstat (limited to 'lib/StaticAnalyzer/Core/RegionStore.cpp')
| -rw-r--r-- | lib/StaticAnalyzer/Core/RegionStore.cpp | 9 | 
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/StaticAnalyzer/Core/RegionStore.cpp b/lib/StaticAnalyzer/Core/RegionStore.cpp index 0d173c4644816..15ca2c14f9440 100644 --- a/lib/StaticAnalyzer/Core/RegionStore.cpp +++ b/lib/StaticAnalyzer/Core/RegionStore.cpp @@ -26,7 +26,6 @@  #include "clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h"  #include "clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h"  #include "clang/StaticAnalyzer/Core/PathSensitive/SubEngine.h" -#include "llvm/ADT/ImmutableList.h"  #include "llvm/ADT/ImmutableMap.h"  #include "llvm/ADT/Optional.h"  #include "llvm/Support/raw_ostream.h" @@ -1675,7 +1674,8 @@ RegionStoreManager::getBindingForDerivedDefaultValue(RegionBindingsConstRef B,      // Lazy bindings are usually handled through getExistingLazyBinding().      // We should unify these two code paths at some point. -    if (val.getAs<nonloc::LazyCompoundVal>()) +    if (val.getAs<nonloc::LazyCompoundVal>() || +        val.getAs<nonloc::CompoundVal>())        return val;      llvm_unreachable("Unknown default value"); @@ -2073,11 +2073,10 @@ RegionStoreManager::bindArray(RegionBindingsConstRef B,    if (Init.getAs<nonloc::LazyCompoundVal>())      return bindAggregate(B, R, Init); -  // Remaining case: explicit compound values. -    if (Init.isUnknown()) -    return setImplicitDefaultValue(B, R, ElementTy); +    return bindAggregate(B, R, UnknownVal()); +  // Remaining case: explicit compound values.    const nonloc::CompoundVal& CV = Init.castAs<nonloc::CompoundVal>();    nonloc::CompoundVal::iterator VI = CV.begin(), VE = CV.end();    uint64_t i = 0;  | 
