forked from OSchip/llvm-project
[Diagnostics] Make -Wenum-compare-conditional off by default
Too many false positives, eg. in Chromium. llvm-svn: 373371
This commit is contained in:
parent
dca5b94e79
commit
00d632e089
|
@ -565,7 +565,7 @@ def SwitchEnum : DiagGroup<"switch-enum">;
|
||||||
def Switch : DiagGroup<"switch">;
|
def Switch : DiagGroup<"switch">;
|
||||||
def EnumCompareConditional : DiagGroup<"enum-compare-conditional">;
|
def EnumCompareConditional : DiagGroup<"enum-compare-conditional">;
|
||||||
def EnumCompareSwitch : DiagGroup<"enum-compare-switch">;
|
def EnumCompareSwitch : DiagGroup<"enum-compare-switch">;
|
||||||
def EnumCompare : DiagGroup<"enum-compare", [EnumCompareConditional, EnumCompareSwitch]>;
|
def EnumCompare : DiagGroup<"enum-compare", [EnumCompareSwitch]>;
|
||||||
def ImplicitFallthroughPerFunction :
|
def ImplicitFallthroughPerFunction :
|
||||||
DiagGroup<"implicit-fallthrough-per-function">;
|
DiagGroup<"implicit-fallthrough-per-function">;
|
||||||
def ImplicitFallthrough : DiagGroup<"implicit-fallthrough",
|
def ImplicitFallthrough : DiagGroup<"implicit-fallthrough",
|
||||||
|
|
|
@ -6172,7 +6172,7 @@ def warn_comparison_of_mixed_enum_types : Warning<
|
||||||
def warn_conditional_mixed_enum_types : Warning<
|
def warn_conditional_mixed_enum_types : Warning<
|
||||||
"enumeration type mismatch in conditional expression"
|
"enumeration type mismatch in conditional expression"
|
||||||
"%diff{ ($ and $)|}0,1">,
|
"%diff{ ($ and $)|}0,1">,
|
||||||
InGroup<EnumCompareConditional>;
|
InGroup<EnumCompareConditional>, DefaultIgnore;
|
||||||
def warn_comparison_of_mixed_enum_types_switch : Warning<
|
def warn_comparison_of_mixed_enum_types_switch : Warning<
|
||||||
"comparison of two values with different enumeration types in switch statement"
|
"comparison of two values with different enumeration types in switch statement"
|
||||||
"%diff{ ($ and $)|}0,1">,
|
"%diff{ ($ and $)|}0,1">,
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
// RUN: %clang_cc1 -x c -fsyntax-only -verify -Wenum-compare-conditional %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
|
|
||||||
// RUN: %clang_cc1 -x c++ -fsyntax-only -verify -Wenum-compare-conditional %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
|
|
||||||
|
|
||||||
enum ro { A = 0x10 };
|
enum ro { A = 0x10 };
|
||||||
enum rw { B = 0xFF };
|
enum rw { B = 0xFF };
|
||||||
|
|
Loading…
Reference in New Issue