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 | 519a47d4bddd2db51eeba6fda12410ecc5999073 (patch) | |
| tree | 44866126b4044204db31e534e2bd3d19ac0ae6ca /clang/lib/Analysis/RegionStore.cpp | |
| parent | c3a7992216d6cba88001572a6727de06ba27564b (diff) | |
| download | bcm5719-llvm-519a47d4bddd2db51eeba6fda12410ecc5999073.tar.gz bcm5719-llvm-519a47d4bddd2db51eeba6fda12410ecc5999073.zip | |
Bind the mistakenly generated nonloc::SymbolVal to struct correctly. See the
comments for added test case for details.
llvm-svn: 73189
Diffstat (limited to 'clang/lib/Analysis/RegionStore.cpp')
| -rw-r--r-- | clang/lib/Analysis/RegionStore.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Analysis/RegionStore.cpp b/clang/lib/Analysis/RegionStore.cpp index 528ee89a4ce..000f06e5e58 100644 --- a/clang/lib/Analysis/RegionStore.cpp +++ b/clang/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()), |

