From: Ted Kremenek Date: Tue, 17 Aug 2010 23:29:06 +0000 (+0000) Subject: Rewrite code fragment to avoide ICE in MSVC. Fixes PR 7875. Patch by Dimitry Andric! X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4af473cf713522ed9511506685fb569a7f8b1764;p=clang Rewrite code fragment to avoide ICE in MSVC. Fixes PR 7875. Patch by Dimitry Andric! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111327 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Checker/RegionStore.cpp b/lib/Checker/RegionStore.cpp index 9b8579cdeb..d6422ab338 100644 --- a/lib/Checker/RegionStore.cpp +++ b/lib/Checker/RegionStore.cpp @@ -1538,8 +1538,10 @@ Store RegionStoreManager::BindStruct(Store store, const TypedRegion* R, // We may get non-CompoundVal accidentally due to imprecise cast logic or // that we are binding symbolic struct value. Kill the field values, and if // the value is symbolic go and bind it as a "default" binding. - if (V.isUnknown() || !isa(V)) - return KillStruct(store, R, isa(V) ? V : UnknownVal()); + if (V.isUnknown() || !isa(V)) { + SVal SV = isa(V) ? V : UnknownVal(); + return KillStruct(store, R, SV); + } nonloc::CompoundVal& CV = cast(V); nonloc::CompoundVal::iterator VI = CV.begin(), VE = CV.end();