[PATCH] D65192: [Sema] Make -Wbitwise-op-parentheses and -Wlogical-op-parentheses disabled-by-default

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 1 19:59:10 PDT 2019


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 "


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65192.212958.patch
Type: text/x-patch
Size: 1395 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190802/298791fa/attachment.bin>


More information about the cfe-commits mailing list