]> granicus.if.org Git - clang/commitdiff
Add test case for pointer arithmetic.
authorZhongxing Xu <xuzhongxing@gmail.com>
Tue, 3 Mar 2009 00:28:42 +0000 (00:28 +0000)
committerZhongxing Xu <xuzhongxing@gmail.com>
Tue, 3 Mar 2009 00:28:42 +0000 (00:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65907 91177308-0d34-0410-b5e6-96231b3b80d8

test/Analysis/ptr-arith.c [new file with mode: 0644]

diff --git a/test/Analysis/ptr-arith.c b/test/Analysis/ptr-arith.c
new file mode 100644 (file)
index 0000000..a8d03eb
--- /dev/null
@@ -0,0 +1,7 @@
+// RUN: clang -analyze -checker-simple -analyzer-store=region -verify %s
+
+void f1() {
+  int a[10];
+  int *p = a;
+  ++p;
+}