summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/ptr-arith.c
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2009-03-11 07:43:49 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2009-03-11 07:43:49 +0000
commit507202ecb79bf1da7ec2b3e854b78ce660a68012 (patch)
tree3a1b140bcc6174f0077083c84e2cc34f532b98da /clang/test/Analysis/ptr-arith.c
parent664cf27602f1a50381d565952502eaf9d8246a21 (diff)
downloadbcm5719-llvm-507202ecb79bf1da7ec2b3e854b78ce660a68012.tar.gz
bcm5719-llvm-507202ecb79bf1da7ec2b3e854b78ce660a68012.zip
Fix crash when LHS of pointer arithmetic is not ElementRegion.
llvm-svn: 66649
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
index a8d03eb3d88..7b66b2f8fe3 100644
--- a/clang/test/Analysis/ptr-arith.c
+++ b/clang/test/Analysis/ptr-arith.c
@@ -5,3 +5,10 @@ void f1() {
int *p = a;
++p;
}
+
+char* foo();
+
+void f2() {
+ char *p = foo();
+ ++p;
+}
OpenPOWER on IntegriCloud