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 | ef8b28e9459e729b7bd8c826d204621b039611fa (patch) | |
tree | 55d87a630de5a2825259a58c4f30a3622583ed66 /test/Analysis/array-struct.c | |
parent | 5669e57b4a74d26e9e2fb70d778141d0d849388b (diff) |
Add test case for array and struct variable lvalue evaluation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57670 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis/array-struct.c')
-rw-r--r-- | test/Analysis/array-struct.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Analysis/array-struct.c b/test/Analysis/array-struct.c new file mode 100644 index 0000000000..5eac795aae --- /dev/null +++ b/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; +} |