forked from llvm-mirror/clang
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make constant evaluation for pointer comparisons work correctly for s…
…ome uncommon cases. <rdar://problem/10962435>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154794 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
1 parent
4762a2d
commit a316988
Showing
3 changed files
with
29 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// RUN: %clang_cc1 -fsyntax-only -verify -triple x86_64-linux %s | ||
|
||
#define EVAL_EXPR(testno, expr) int test##testno = sizeof(struct{char qq[expr];}); | ||
|
||
// <rdar://problem/10962435> | ||
EVAL_EXPR(1, ((char*)-1LL) + 1 == 0 ? 1 : -1) | ||
EVAL_EXPR(2, ((char*)-1LL) + 1 < (char*) -1 ? 1 : -1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters