improve the "enumeration value 'g' not handled in switch"
warning to handle multiple enumerators with one warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114093 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/statements.c b/test/Sema/statements.c
index e3c41f3..61eafe6 100644
--- a/test/Sema/statements.c
+++ b/test/Sema/statements.c
@@ -50,4 +50,43 @@
   case kThree:
     break;
   }
-}
\ No newline at end of file
+}
+
+
+enum x { a, b, c, d, e, f, g };
+
+void foo(enum x X) {
+  switch (X) { // expected-warning {{enumeration value 'g' not handled in switch}}
+  case a:
+  case b:
+  case c:
+  case d:
+  case e:
+  case f:
+    break;
+  }
+
+  switch (X) { // expected-warning {{enumeration values 'f' and 'g' not handled in switch}}
+  case a:
+  case b:
+  case c:
+  case d:
+  case e:
+    break;
+  }
+
+  switch (X) {  // expected-warning {{enumeration values 'e', 'f', and 'g' not handled in switch}}
+    case a:
+    case b:
+    case c:
+    case d:
+      break;
+  }
+
+  switch (X) { // expected-warning {{5 enumeration values not handled in switch: 'c', 'd', 'e'...}}
+  case a:
+  case b:
+    break;
+  }
+}
+