This is for consistency, since the flag is actually under -Wswitch now, rather
than -Wswitch-enum (since it's really valuable for the former and rather
orthogonal to the latter)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148680
91177308-0d34-0410-b5e6-
96231b3b80d8
def StrictSelector : DiagGroup<"strict-selector-match">;
def MethodDuplicate : DiagGroup<"duplicate-method-match">;
def SwitchEnum : DiagGroup<"switch-enum">;
-def SwitchEnumRedundantDefault : DiagGroup<"switch-enum-redundant-default">;
-def Switch : DiagGroup<"switch", [SwitchEnumRedundantDefault]>;
+def SwitchRedundantDefault : DiagGroup<"switch-redundant-default">;
+def Switch : DiagGroup<"switch", [SwitchRedundantDefault]>;
def Trigraphs : DiagGroup<"trigraphs">;
def : DiagGroup<"type-limits">;
def warn_unreachable_default : Warning<
"default is unreachable as all enumeration values are accounted for">,
- InGroup<SwitchEnumRedundantDefault>;
+ InGroup<SwitchRedundantDefault>;
def warn_not_in_enum : Warning<"case value not in enumerated type %0">,
InGroup<Switch>;
def err_typecheck_statement_requires_scalar : Error<
-// RUN: %clang_cc1 -fsyntax-only -verify -Wswitch-enum -Wno-switch-enum-redundant-default %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wswitch-enum -Wno-switch-redundant-default %s
int test1() {
enum { A, B } a;
-// RUN: %clang %s -fsyntax-only -Xclang -verify -fblocks -Wunreachable-code -Wno-unused-value -Wno-switch-enum-redundant-default
+// RUN: %clang %s -fsyntax-only -Xclang -verify -fblocks -Wunreachable-code -Wno-unused-value -Wno-switch-redundant-default
int halt() __attribute__((noreturn));
int live();
-// RUN: %clang_cc1 -verify -Wno-switch-enum-redundant-default %s
+// RUN: %clang_cc1 -verify -Wno-switch-redundant-default %s
enum E {
one,
-// RUN: %clang_cc1 %s -fsyntax-only -verify -Wreturn-type -Wmissing-noreturn -Wno-unreachable-code -Wno-switch-enum-redundant-default
-// RUN: %clang_cc1 %s -fsyntax-only -std=c++11 -verify -Wreturn-type -Wmissing-noreturn -Wno-unreachable-code -Wno-switch-enum-redundant-default
+// 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
// A destructor may be marked noreturn and should still influence the CFG.
void pr6884_abort() __attribute__((noreturn));