]> granicus.if.org Git - clang/commitdiff
Add random array and struct test code for SCA.
authorZhongxing Xu <xuzhongxing@gmail.com>
Fri, 24 Oct 2008 08:51:58 +0000 (08:51 +0000)
committerZhongxing Xu <xuzhongxing@gmail.com>
Fri, 24 Oct 2008 08:51:58 +0000 (08:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58085 91177308-0d34-0410-b5e6-96231b3b80d8

test/Analysis/array-struct.c

index 5eac795aae282b5485fbab10a512f7cf094c4488..e35985c79dc35a71e232cb14ed626dc96e62ca47 100644 (file)
@@ -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 @@ void f(void) {
   struct s d;
   struct s *q;
   q = &d;
+  q->data = 3;
+  d.data_array[9] = 17;
 }