summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/ptr-arith.c
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2009-03-03 00:28:42 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2009-03-03 00:28:42 +0000
commit6765d449ed05d4719f313c33a4c13de2649c32b7 (patch)
tree2e81c5373b4fae75ab379ff2a432bf73d7251435 /clang/test/Analysis/ptr-arith.c
parent5a9a892e48991b1fc9a8170145c98cb72c2a8556 (diff)
downloadbcm5719-llvm-6765d449ed05d4719f313c33a4c13de2649c32b7.tar.gz
bcm5719-llvm-6765d449ed05d4719f313c33a4c13de2649c32b7.zip
Add test case for pointer arithmetic.
llvm-svn: 65907
Diffstat (limited to 'clang/test/Analysis/ptr-arith.c')
-rw-r--r--clang/test/Analysis/ptr-arith.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/Analysis/ptr-arith.c b/clang/test/Analysis/ptr-arith.c
new file mode 100644
index 00000000000..a8d03eb3d88
--- /dev/null
+++ b/clang/test/Analysis/ptr-arith.c
@@ -0,0 +1,7 @@
+// RUN: clang -analyze -checker-simple -analyzer-store=region -verify %s
+
+void f1() {
+ int a[10];
+ int *p = a;
+ ++p;
+}
OpenPOWER on IntegriCloud