[cfe-commits] r111327 - /cfe/trunk/lib/Checker/RegionStore.cpp

Ted Kremenek kremenek at apple.com
Tue Aug 17 16:29:06 PDT 2010


Author: kremenek
Date: Tue Aug 17 18:29:06 2010
New Revision: 111327

URL: http://llvm.org/viewvc/llvm-project?rev=111327&view=rev
Log:
Rewrite code fragment to avoide ICE in MSVC.  Fixes PR 7875.  Patch by Dimitry Andric!

Modified:
    cfe/trunk/lib/Checker/RegionStore.cpp

Modified: cfe/trunk/lib/Checker/RegionStore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/RegionStore.cpp?rev=111327&r1=111326&r2=111327&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/RegionStore.cpp (original)
+++ cfe/trunk/lib/Checker/RegionStore.cpp Tue Aug 17 18:29:06 2010
@@ -1538,8 +1538,10 @@
   // 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<nonloc::CompoundVal>(V))
-    return KillStruct(store, R, isa<nonloc::SymbolVal>(V) ? V : UnknownVal());
+  if (V.isUnknown() || !isa<nonloc::CompoundVal>(V)) {
+    SVal SV = isa<nonloc::SymbolVal>(V) ? V : UnknownVal();
+    return KillStruct(store, R, SV);
+  }
 
   nonloc::CompoundVal& CV = cast<nonloc::CompoundVal>(V);
   nonloc::CompoundVal::iterator VI = CV.begin(), VE = CV.end();





More information about the cfe-commits mailing list