diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-06-11 09:11:27 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-06-11 09:11:27 +0000 |
commit | 3f6978a3fefc16f203afbc64697fe04af329cf2b (patch) | |
tree | 34121e7ae2a4a4460d671368fd8707020ba74276 /lib/Analysis/RegionStore.cpp | |
parent | b7507d18ec59a82fc902d807df86411d0c9da851 (diff) |
Bind the mistakenly generated nonloc::SymbolVal to struct correctly. See the
comments for added test case for details.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73189 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/RegionStore.cpp')
-rw-r--r-- | lib/Analysis/RegionStore.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Analysis/RegionStore.cpp b/lib/Analysis/RegionStore.cpp index 528ee89a4c..000f06e5e5 100644 --- a/lib/Analysis/RegionStore.cpp +++ b/lib/Analysis/RegionStore.cpp @@ -1198,6 +1198,9 @@ RegionStoreManager::BindStruct(const GRState* St, const TypedRegion* R, SVal V){ if (V.isUnknown()) return KillStruct(St, R); + if (isa<nonloc::SymbolVal>(V)) + return setDefaultValue(St, R, V); + nonloc::CompoundVal& CV = cast<nonloc::CompoundVal>(V); nonloc::CompoundVal::iterator VI = CV.begin(), VE = CV.end(); RecordDecl::field_iterator FI = RD->field_begin(getContext()), |