]> granicus.if.org Git - clang/commitdiff
Rename -Wswitch-enum-redundant-default to -Wswitch-redundant-default.
authorDavid Blaikie <dblaikie@gmail.com>
Mon, 23 Jan 2012 04:58:54 +0000 (04:58 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Mon, 23 Jan 2012 04:58:54 +0000 (04:58 +0000)
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

include/clang/Basic/DiagnosticGroups.td
include/clang/Basic/DiagnosticSemaKinds.td
test/Sema/switch-enum.c
test/Sema/warn-unreachable.c
test/SemaCXX/gnu-case-ranges.cpp
test/SemaCXX/return-noreturn.cpp

index 7211db2984b4b8f676603639d830eb9187d30210..218120f51516f8f68e419e10f1645faec50a5801 100644 (file)
@@ -179,8 +179,8 @@ def : DiagGroup<"strict-prototypes">;
 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">;
index d02910a40eec705acdf186444579be6ea45e0d22..96f85f6f6eb46c6ea205c61c15353a62d62441f7 100644 (file)
@@ -4973,7 +4973,7 @@ def warn_missing_cases : Warning<
 
 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<
index 5cf98f78ac4ed52343d5ae4cba1b122bd6678208..98db150f333138d48e41cd7d276b0766693850de 100644 (file)
@@ -1,4 +1,4 @@
-// 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;
index 46a680f0ef864f0e782fae45b847f35eb2c23524..49275a5a9b9ca59e34ce0d3c31a697128bcfd21d 100644 (file)
@@ -1,4 +1,4 @@
-// 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();
index 94100d2e83e7d598fe286e52207e9a959452cb8f..cda8b734cfed558b129a159f548c8d1d14589dcc 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -verify -Wno-switch-enum-redundant-default %s
+// RUN: %clang_cc1 -verify -Wno-switch-redundant-default %s
 
 enum E {
     one,
index 4b1f82dc6a3c5a2883b04a2c09d09711fb64fe38..ce819337384ed5afb47db290150d607bb5099758 100644 (file)
@@ -1,5 +1,5 @@
-// 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));