diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2008-10-24 08:51:58 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2008-10-24 08:51:58 +0000 |
commit | d2f0c7b37b3fe8397f86fc20ec68fbf6c9463e27 (patch) | |
tree | 53a3ce0058ab0a7c6ce8056735787901bb3dfc93 /clang/test/Analysis/array-struct.c | |
parent | 5043549666ca930ab84263130c105d9ebf0748fb (diff) | |
download | bcm5719-llvm-d2f0c7b37b3fe8397f86fc20ec68fbf6c9463e27.tar.gz bcm5719-llvm-d2f0c7b37b3fe8397f86fc20ec68fbf6c9463e27.zip |
Add random array and struct test code for SCA.
llvm-svn: 58085
Diffstat (limited to 'clang/test/Analysis/array-struct.c')
-rw-r--r-- | clang/test/Analysis/array-struct.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/test/Analysis/array-struct.c b/clang/test/Analysis/array-struct.c index 5eac795aae2..e35985c79dc 100644 --- a/clang/test/Analysis/array-struct.c +++ b/clang/test/Analysis/array-struct.c @@ -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; } |