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
diff --git a/test/Sema/compare.c b/test/Sema/compare.c
index a22e721..579c3e5 100644
--- a/test/Sema/compare.c
+++ b/test/Sema/compare.c
@@ -266,3 +266,11 @@
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;
+}