Reword/rename -Wswitch-unreachable-default.

Rewording the diagnostic to be more precise/correct: "default label in switch
which covers all enumeration values" and changed the switch to
-Wcovered-switch-default

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148783 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang/Basic/DiagnosticGroups.td b/include/clang/Basic/DiagnosticGroups.td
index 8216795..b609b40 100644
--- a/include/clang/Basic/DiagnosticGroups.td
+++ b/include/clang/Basic/DiagnosticGroups.td
@@ -184,8 +184,8 @@
 def StrictSelector : DiagGroup<"strict-selector-match">;
 def MethodDuplicate : DiagGroup<"duplicate-method-match">;
 def SwitchEnum     : DiagGroup<"switch-enum">;
-def SwitchRedundantDefault : DiagGroup<"switch-redundant-default">;
-def Switch         : DiagGroup<"switch", [SwitchRedundantDefault]>;
+def CoveredSwitchDefault : DiagGroup<"covered-switch-default">;
+def Switch         : DiagGroup<"switch", [CoveredSwitchDefault]>;
 def Trigraphs      : DiagGroup<"trigraphs">;
 
 def : DiagGroup<"type-limits">;
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index 853f766..6c2c4ef 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/include/clang/Basic/DiagnosticSemaKinds.td
@@ -4987,8 +4987,8 @@
   InGroup<Switch>;
 
 def warn_unreachable_default : Warning<
-  "default is unreachable as all enumeration values are accounted for">,
-  InGroup<SwitchRedundantDefault>;
+  "default label in switch which covers all enumeration values">,
+  InGroup<CoveredSwitchDefault>;
 def warn_not_in_enum : Warning<"case value not in enumerated type %0">,
   InGroup<Switch>; 
 def err_typecheck_statement_requires_scalar : Error<
diff --git a/test/Sema/switch.c b/test/Sema/switch.c
index 012c5ec..2dc965f 100644
--- a/test/Sema/switch.c
+++ b/test/Sema/switch.c
@@ -295,6 +295,6 @@
   case A: return 0;
   case B: return 1;
   case 7: return 1; // expected-warning {{case value not in enumerated type}}
-  default: return 2; // expected-warning {{default is unreachable as all enumeration values are accounted for}}
+  default: return 2; // expected-warning {{default label in switch which covers all enumeration values}}
   }
 }
diff --git a/test/Sema/warn-unreachable.c b/test/Sema/warn-unreachable.c
index 49275a5..636513f 100644
--- a/test/Sema/warn-unreachable.c
+++ b/test/Sema/warn-unreachable.c
@@ -1,4 +1,4 @@
-// RUN: %clang %s -fsyntax-only -Xclang -verify -fblocks -Wunreachable-code -Wno-unused-value -Wno-switch-redundant-default
+// RUN: %clang %s -fsyntax-only -Xclang -verify -fblocks -Wunreachable-code -Wno-unused-value -Wno-covered-switch-default
 
 int halt() __attribute__((noreturn));
 int live();
diff --git a/test/SemaCXX/gnu-case-ranges.cpp b/test/SemaCXX/gnu-case-ranges.cpp
index cda8b73..b082e3a 100644
--- a/test/SemaCXX/gnu-case-ranges.cpp
+++ b/test/SemaCXX/gnu-case-ranges.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -verify -Wno-switch-redundant-default %s
+// RUN: %clang_cc1 -verify -Wno-covered-switch-default %s
 
 enum E {
     one,
diff --git a/test/SemaCXX/return-noreturn.cpp b/test/SemaCXX/return-noreturn.cpp
index ce81933..617de00 100644
--- a/test/SemaCXX/return-noreturn.cpp
+++ b/test/SemaCXX/return-noreturn.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 %s -fsyntax-only -verify -Wreturn-type -Wmissing-noreturn -Wno-unreachable-code -Wno-switch-redundant-default
-// RUN: %clang_cc1 %s -fsyntax-only -std=c++11 -verify -Wreturn-type -Wmissing-noreturn -Wno-unreachable-code -Wno-switch-redundant-default
+// RUN: %clang_cc1 %s -fsyntax-only -verify -Wreturn-type -Wmissing-noreturn -Wno-unreachable-code -Wno-covered-switch-default
+// RUN: %clang_cc1 %s -fsyntax-only -std=c++11 -verify -Wreturn-type -Wmissing-noreturn -Wno-unreachable-code -Wno-covered-switch-default
 
 // A destructor may be marked noreturn and should still influence the CFG.
 void pr6884_abort() __attribute__((noreturn));