summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2009-08-05 03:45:09 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2009-08-05 03:45:09 +0000
commit13ee441874b47b5db94997efe4147960c1af267d (patch)
treea4ad76fa614a98d4b1a2cdab76fe257faf875207 /clang
parentfe97165587089fd2872c78332619264d7a3125ff (diff)
downloadbcm5719-llvm-13ee441874b47b5db94997efe4147960c1af267d.tar.gz
bcm5719-llvm-13ee441874b47b5db94997efe4147960c1af267d.zip
Add test case.
llvm-svn: 78150
Diffstat (limited to 'clang')
-rw-r--r--clang/test/Analysis/misc-ps-region-store.m12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/Analysis/misc-ps-region-store.m b/clang/test/Analysis/misc-ps-region-store.m
index 6cfd8e53726..af6e53b1dee 100644
--- a/clang/test/Analysis/misc-ps-region-store.m
+++ b/clang/test/Analysis/misc-ps-region-store.m
@@ -154,3 +154,15 @@ void test_rdar_7114618(struct s_7114618 *s) {
}
}
}
+
+// Test pointers increment correctly.
+void f() {
+ int a[2];
+ a[1] = 3;
+ int *p = a;
+ p++;
+ if (*p != 3) {
+ int *q = 0;
+ *q = 3; // no-warning
+ }
+}
OpenPOWER on IntegriCloud