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 | bfc8168e77abd451af76ae8c01dfa346ffe87dd9 (patch) | |
tree | a2c4a476b7f6edfa6bbbac3cf0e0bbbe83e3b9d8 | |
parent | a52ad4e1f423bed2e9e0dcb12661268091d20a54 (diff) |
Add test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78150 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/Analysis/misc-ps-region-store.m | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Analysis/misc-ps-region-store.m b/test/Analysis/misc-ps-region-store.m index 6cfd8e5372..af6e53b1de 100644 --- a/test/Analysis/misc-ps-region-store.m +++ b/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 + } +} |