// RUN: clang -checker-simple -verify %s

struct s {
  int data;
  int data_array[10];
};

void f(void) {
  int a[10];
  int (*p)[10];
  p = &a;
  (*p)[3] = 1;
  
  struct s d;
  struct s *q;
  q = &d;
  q->data = 3;
  d.data_array[9] = 17;
}

// RUN: clang -checker-simple -verify %s

struct s {};

void f(void) {
  int a[10];
  int (*p)[10];
  p = &a;
  (*p)[3] = 1;
  
  struct s d;
  struct s *q;
  q = &d;
}

--- 
+++ 
@@ -1,6 +1,9 @@
 // RUN: clang -checker-simple -verify %s
 
-struct s {};
+struct s {
+  int data;
+  int data_array[10];
+};
 
 void f(void) {
   int a[10];
@@ -11,4 +14,6 @@
   struct s d;
   struct s *q;
   q = &d;
+  q->data = 3;
+  d.data_array[9] = 17;
 }
Add random array and struct test code for SCA.

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@58085 91177308-0d34-0410-b5e6-96231b3b80d8
