diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2008-10-17 05:19:52 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2008-10-17 05:19:52 +0000 |
commit | 0dd213f8f59e2cf2e64d0131abcb1418cb52a940 (patch) | |
tree | 67969d3cd5ab46c9e7a7035d45dd6510a8bde212 /clang/test/Analysis/array-struct.c | |
parent | 10549c29a871783a01db8db3cc3ae2a8bb8289e2 (diff) | |
download | bcm5719-llvm-0dd213f8f59e2cf2e64d0131abcb1418cb52a940.tar.gz bcm5719-llvm-0dd213f8f59e2cf2e64d0131abcb1418cb52a940.zip |
Add test case for array and struct variable lvalue evaluation.
llvm-svn: 57670
Diffstat (limited to 'clang/test/Analysis/array-struct.c')
-rw-r--r-- | clang/test/Analysis/array-struct.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/Analysis/array-struct.c b/clang/test/Analysis/array-struct.c new file mode 100644 index 00000000000..5eac795aae2 --- /dev/null +++ b/clang/test/Analysis/array-struct.c @@ -0,0 +1,14 @@ +// 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; +} |