[cfe-commits] r57670 - /cfe/trunk/test/Analysis/array-struct.c

Zhongxing Xu xuzhongxing at gmail.com
Thu Oct 16 22:19:52 PDT 2008


Author: zhongxingxu
Date: Fri Oct 17 00:19:52 2008
New Revision: 57670

URL: http://llvm.org/viewvc/llvm-project?rev=57670&view=rev
Log:
Add test case for array and struct variable lvalue evaluation.

Added:
    cfe/trunk/test/Analysis/array-struct.c

Added: cfe/trunk/test/Analysis/array-struct.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/array-struct.c?rev=57670&view=auto

==============================================================================
--- cfe/trunk/test/Analysis/array-struct.c (added)
+++ cfe/trunk/test/Analysis/array-struct.c Fri Oct 17 00:19:52 2008
@@ -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;
+}





More information about the cfe-commits mailing list