Teach -Wsign-compare to treat 1 << blah as "idiomatically non-negative".
Fixes a spurious warning in LLVM.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100595 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/compare.c b/test/Sema/compare.c
index 7c8c36f..631b694 100644
--- a/test/Sema/compare.c
+++ b/test/Sema/compare.c
@@ -282,3 +282,8 @@
     && (x >= 0)  // expected-warning {{comparison of unsigned expression >= 0 is always true}}
     && (0 <= x); // expected-warning {{comparison of 0 <= unsigned expression is always true}}
 }
+
+int test6(unsigned i, unsigned power) {
+  unsigned x = (i < (1 << power) ? i : 0);
+  return x != 3 ? 1 << power : i;
+}