aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2009-11-10 02:45:49 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2009-11-10 02:45:49 +0000
commit79234ca446858707fa311cd0dfea85519ba3bbd5 (patch)
tree9fc558696b812f2a23c5a00fb350ab0343daebfb
parentadca27102ff733c7d42fcbbc2c7e134a7fc026f9 (diff)
Add test case for PointerSubChecker.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86657 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Analysis/ptr-arith.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/Analysis/ptr-arith.c b/test/Analysis/ptr-arith.c
index f77d7f5ee5..fd780e8e10 100644
--- a/test/Analysis/ptr-arith.c
+++ b/test/Analysis/ptr-arith.c
@@ -55,3 +55,8 @@ void f5() {
int a[10];
p = a + 1; // no-warning
}
+
+// Allow arithmetic on different symbolic regions.
+void f6(int *p, int *q) {
+ int d = q - p; // no-warning
+}