MaskRay updated this revision to Diff 212958. MaskRay retitled this revision from "[Sema] Disable some enabled-by-default -Wparentheses diagnostics" to "[Sema] Make -Wbitwise-op-parentheses and -Wlogical-op-parentheses disabled-by-default". MaskRay edited the summary of this revision. MaskRay added a comment.
Retitle disable just -Wbitwise-op-parentheses and -Wlogical-op-parentheses Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65192/new/ https://reviews.llvm.org/D65192 Files: include/clang/Basic/DiagnosticSemaKinds.td test/Parser/cxx2a-spaceship.cpp test/SemaCXX/parentheses.cpp Index: test/SemaCXX/parentheses.cpp =================================================================== --- test/SemaCXX/parentheses.cpp +++ test/SemaCXX/parentheses.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -verify %s +// RUN: %clang_cc1 -verify -Wlogical-op-parentheses %s // PR16930, PR16727: template<class Foo> Index: test/Parser/cxx2a-spaceship.cpp =================================================================== --- test/Parser/cxx2a-spaceship.cpp +++ test/Parser/cxx2a-spaceship.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++2a -verify %s +// RUN: %clang_cc1 -std=c++2a -verify -Wparentheses %s template<int> struct X {}; Index: include/clang/Basic/DiagnosticSemaKinds.td =================================================================== --- include/clang/Basic/DiagnosticSemaKinds.td +++ include/clang/Basic/DiagnosticSemaKinds.td @@ -5642,10 +5642,10 @@ "remove constant to silence this warning">; def warn_bitwise_op_in_bitwise_op : Warning< - "'%0' within '%1'">, InGroup<BitwiseOpParentheses>; + "'%0' within '%1'">, InGroup<BitwiseOpParentheses>, DefaultIgnore; def warn_logical_and_in_logical_or : Warning< - "'&&' within '||'">, InGroup<LogicalOpParentheses>; + "'&&' within '||'">, InGroup<LogicalOpParentheses>, DefaultIgnore; def warn_overloaded_shift_in_comparison :Warning< "overloaded operator %select{>>|<<}0 has higher precedence than "
Index: test/SemaCXX/parentheses.cpp =================================================================== --- test/SemaCXX/parentheses.cpp +++ test/SemaCXX/parentheses.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -verify %s +// RUN: %clang_cc1 -verify -Wlogical-op-parentheses %s // PR16930, PR16727: template<class Foo> Index: test/Parser/cxx2a-spaceship.cpp =================================================================== --- test/Parser/cxx2a-spaceship.cpp +++ test/Parser/cxx2a-spaceship.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++2a -verify %s +// RUN: %clang_cc1 -std=c++2a -verify -Wparentheses %s template<int> struct X {}; Index: include/clang/Basic/DiagnosticSemaKinds.td =================================================================== --- include/clang/Basic/DiagnosticSemaKinds.td +++ include/clang/Basic/DiagnosticSemaKinds.td @@ -5642,10 +5642,10 @@ "remove constant to silence this warning">; def warn_bitwise_op_in_bitwise_op : Warning< - "'%0' within '%1'">, InGroup<BitwiseOpParentheses>; + "'%0' within '%1'">, InGroup<BitwiseOpParentheses>, DefaultIgnore; def warn_logical_and_in_logical_or : Warning< - "'&&' within '||'">, InGroup<LogicalOpParentheses>; + "'&&' within '||'">, InGroup<LogicalOpParentheses>, DefaultIgnore; def warn_overloaded_shift_in_comparison :Warning< "overloaded operator %select{>>|<<}0 has higher precedence than "
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits