diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-08-05 03:45:09 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-08-05 03:45:09 +0000 |
commit | 13ee441874b47b5db94997efe4147960c1af267d (patch) | |
tree | a4ad76fa614a98d4b1a2cdab76fe257faf875207 /clang | |
parent | fe97165587089fd2872c78332619264d7a3125ff (diff) | |
download | bcm5719-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.m | 12 |
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 + } +} |