Provide a slightly specialized diagnostic for tautological comparisons
of an enum value.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115725 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/compare.c b/test/Sema/compare.c
index 2a6917e..5221b17 100644
--- a/test/Sema/compare.c
+++ b/test/Sema/compare.c
@@ -305,3 +305,10 @@
 #undef ZERO
 #undef CHECK
 
+int rdar8511238() {
+  enum A { A_foo, A_bar };
+  enum A a;
+  if (a < 0) // expected-warning {{comparison of unsigned enum expression < 0 is always false}}
+    return 0;
+  return 20;
+}