forked from OSchip/llvm-project
[Diagnostics] Move warning into the subgroup (-Wenum-compare-conditional)
llvm-svn: 373345
This commit is contained in:
parent
bf9d84c014
commit
362055d1fa
|
@ -563,8 +563,9 @@ def CoveredSwitchDefault : DiagGroup<"covered-switch-default">;
|
|||
def SwitchBool : DiagGroup<"switch-bool">;
|
||||
def SwitchEnum : DiagGroup<"switch-enum">;
|
||||
def Switch : DiagGroup<"switch">;
|
||||
def EnumCompareConditional : DiagGroup<"enum-compare-conditional">;
|
||||
def EnumCompareSwitch : DiagGroup<"enum-compare-switch">;
|
||||
def EnumCompare : DiagGroup<"enum-compare", [EnumCompareSwitch]>;
|
||||
def EnumCompare : DiagGroup<"enum-compare", [EnumCompareConditional, EnumCompareSwitch]>;
|
||||
def ImplicitFallthroughPerFunction :
|
||||
DiagGroup<"implicit-fallthrough-per-function">;
|
||||
def ImplicitFallthrough : DiagGroup<"implicit-fallthrough",
|
||||
|
|
|
@ -6172,7 +6172,7 @@ def warn_comparison_of_mixed_enum_types : Warning<
|
|||
def warn_conditional_mixed_enum_types : Warning<
|
||||
"enumeration type mismatch in conditional expression"
|
||||
"%diff{ ($ and $)|}0,1">,
|
||||
InGroup<EnumCompare>;
|
||||
InGroup<EnumCompareConditional>;
|
||||
def warn_comparison_of_mixed_enum_types_switch : Warning<
|
||||
"comparison of two values with different enumeration types in switch statement"
|
||||
"%diff{ ($ and $)|}0,1">,
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
// RUN: %clang_cc1 -x c -fsyntax-only -verify -Wenum-compare-conditional %s
|
||||
// RUN: %clang_cc1 -x c -fsyntax-only -verify -Wenum-compare %s
|
||||
// RUN: %clang_cc1 -x c -fsyntax-only -verify %s
|
||||
// RUN: %clang_cc1 -x c++ -fsyntax-only -verify -Wenum-compare-conditional %s
|
||||
// RUN: %clang_cc1 -x c++ -fsyntax-only -verify -Wenum-compare %s
|
||||
// RUN: %clang_cc1 -x c++ -fsyntax-only -verify %s
|
||||
|
||||
|
|
Loading…
Reference in New Issue