diff options
author | John McCall <rjmccall@apple.com> | 2010-01-06 22:57:21 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-01-06 22:57:21 +0000 |
commit | 0acc311bf73c85fd34ce6f89a4e786b7ecd214aa (patch) | |
tree | 12797d395e9776534dca45d7943f9c0d3964ce68 /test/Sema/compare.c | |
parent | 21714013498fd84a6e8d5ceb1af5d14b6531cfb5 (diff) | |
download | clang-0acc311bf73c85fd34ce6f89a4e786b7ecd214aa.tar.gz |
Don't assert when dealing with unsigned casts of lvalues. Fixes PR5961.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92866 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/compare.c')
-rw-r--r-- | test/Sema/compare.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Sema/compare.c b/test/Sema/compare.c index a22e721616..579c3e5d6b 100644 --- a/test/Sema/compare.c +++ b/test/Sema/compare.c @@ -266,3 +266,11 @@ void test3() { if ((x > y ? x : y) > z) (void) 0; } + +// PR5961 +extern char *ptr4; +void test4() { + long value; + if (value < (unsigned long) &ptr4) // expected-warning {{comparison of integers of different signs}} + return; +} |