aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/const-eval.c
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2012-04-16 04:30:08 +0000
committerEli Friedman <eli.friedman@gmail.com>2012-04-16 04:30:08 +0000
commita31698842e9893559d58a7bf1a987f2ae90bea0b (patch)
tree922756511b8ac29e37c3934fc6bdf5c1199159fc /test/Sema/const-eval.c
parent4762a2da74875d2ae94e0d77d38ed964816cce36 (diff)
Make constant evaluation for pointer comparisons work correctly for some uncommon cases. <rdar://problem/10962435>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154794 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/const-eval.c')
-rw-r--r--test/Sema/const-eval.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/Sema/const-eval.c b/test/Sema/const-eval.c
index f1c0485bc1..3894d73d60 100644
--- a/test/Sema/const-eval.c
+++ b/test/Sema/const-eval.c
@@ -121,3 +121,7 @@ EVAL_EXPR(43, varfloat && constfloat) // expected-error {{must have a constant s
// <rdar://problem/11205586>
// (Make sure we continue to reject this.)
EVAL_EXPR(44, "x"[0]); // expected-error {{variable length array}}
+
+// <rdar://problem/10962435>
+EVAL_EXPR(45, ((char*)-1) + 1 == 0 ? 1 : -1)
+EVAL_EXPR(46, ((char*)-1) + 1 < (char*) -1 ? 1 : -1)