Enhance RegionStore to lazily symbolicate fields and array elements for
structures passed-by-value as function arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74729 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/RegionStore.cpp b/lib/Analysis/RegionStore.cpp
index 9c76265..5729103 100644
--- a/lib/Analysis/RegionStore.cpp
+++ b/lib/Analysis/RegionStore.cpp
@@ -959,7 +959,7 @@
     return UndefinedVal();
   }
 
-  if (R->hasStackStorage()) {
+  if (R->hasStackStorage() && !R->hasParametersStorage()) {
     // Currently we don't reason specially about Clang-style vectors.  Check
     // if superR is a vector and if so return Unknown.
     if (const TypedRegion *typedSuperR = dyn_cast<TypedRegion>(superR)) {
@@ -1006,7 +1006,11 @@
     assert(0 && "Unknown default value");
   }
 
-  if (R->hasHeapOrStackStorage())
+  // FIXME: Is this correct?  Should it be UnknownVal?
+  if (R->hasHeapStorage())
+    return UndefinedVal();
+  
+  if (R->hasStackStorage() && !R->hasParametersStorage())
     return UndefinedVal();
 
   // If the region is already cast to another type, use that type to create the