[cfe-commits] r73279 - /cfe/trunk/lib/Analysis/RegionStore.cpp

Zhongxing Xu xuzhongxing at gmail.com
Fri Jun 12 18:31:11 PDT 2009


Author: zhongxingxu
Date: Fri Jun 12 20:31:11 2009
New Revision: 73279

URL: http://llvm.org/viewvc/llvm-project?rev=73279&view=rev
Log:
Stop tracking non-compound value for struct. It may be caused by imprecise cast
logic.

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

Modified: cfe/trunk/lib/Analysis/RegionStore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/RegionStore.cpp?rev=73279&r1=73278&r2=73279&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/RegionStore.cpp (original)
+++ cfe/trunk/lib/Analysis/RegionStore.cpp Fri Jun 12 20:31:11 2009
@@ -1198,8 +1198,10 @@
   if (V.isUnknown())
     return KillStruct(St, R);
 
-  if (isa<nonloc::SymbolVal>(V))
-    return setDefaultValue(St, R, V);
+  // We may get non-CompoundVal accidentally due to imprecise cast logic. Ignore
+  // them and make struct unknown.
+  if (!isa<nonloc::CompoundVal>(V))
+    return KillStruct(St, R);
 
   nonloc::CompoundVal& CV = cast<nonloc::CompoundVal>(V);
   nonloc::CompoundVal::iterator VI = CV.begin(), VE = CV.end();





More information about the cfe-commits mailing list