]> granicus.if.org Git - clang/commitdiff
Add test case for array and struct variable lvalue evaluation.
authorZhongxing Xu <xuzhongxing@gmail.com>
Fri, 17 Oct 2008 05:19:52 +0000 (05:19 +0000)
committerZhongxing Xu <xuzhongxing@gmail.com>
Fri, 17 Oct 2008 05:19:52 +0000 (05:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57670 91177308-0d34-0410-b5e6-96231b3b80d8

test/Analysis/array-struct.c [new file with mode: 0644]

diff --git a/test/Analysis/array-struct.c b/test/Analysis/array-struct.c
new file mode 100644 (file)
index 0000000..5eac795
--- /dev/null
@@ -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;
+}