Stop tracking non-compound value for struct. It may be caused by imprecise cast
logic.

llvm-svn: 73279
diff --git a/clang/lib/Analysis/RegionStore.cpp b/clang/lib/Analysis/RegionStore.cpp
index 8ce37e6..eae3aef 100644
--- a/clang/lib/Analysis/RegionStore.cpp
+++ b/clang/lib/Analysis/RegionStore.cpp
@@ -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();