[cfe-commits] r130535 - in /cfe/trunk: include/clang/Basic/DiagnosticGroups.td test/SemaObjC/idiomatic-parentheses.m

Ted Kremenek kremenek at apple.com
Fri Apr 29 13:30:39 PDT 2011


Author: kremenek
Date: Fri Apr 29 15:30:39 2011
New Revision: 130535

URL: http://llvm.org/viewvc/llvm-project?rev=130535&view=rev
Log:
Change -Wparentheses to not imply -Widiomatic-parentheses.  Users rarely want to see these warnings, and often explicitly pass -Wparentheses.

Modified:
    cfe/trunk/include/clang/Basic/DiagnosticGroups.td
    cfe/trunk/test/SemaObjC/idiomatic-parentheses.m

Modified: cfe/trunk/include/clang/Basic/DiagnosticGroups.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticGroups.td?rev=130535&r1=130534&r2=130535&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticGroups.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticGroups.td Fri Apr 29 15:30:39 2011
@@ -185,10 +185,11 @@
 // Aggregation warning settings.
 
 // -Widiomatic-parentheses contains warnings about 'idiomatic'
-// missing parentheses;  it is off by default.
+// missing parentheses;  it is off by default.  We do not include it
+// in -Wparentheses because most users who use -Wparentheses explicitly
+// do not want these warnings.
 def Parentheses : DiagGroup<"parentheses",
-                            [LogicalOpParentheses,
-                             DiagGroup<"idiomatic-parentheses">]>;
+                            [LogicalOpParentheses]>;
 
 // -Wconversion has its own warnings, but we split a few out for
 // legacy reasons:

Modified: cfe/trunk/test/SemaObjC/idiomatic-parentheses.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/idiomatic-parentheses.m?rev=130535&r1=130534&r2=130535&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/idiomatic-parentheses.m (original)
+++ cfe/trunk/test/SemaObjC/idiomatic-parentheses.m Fri Apr 29 15:30:39 2011
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wparentheses %s
 
-// Don't warn about some common ObjC idioms unless we have -Wparentheses on.
+// Don't warn about some common ObjC idioms unless we have -Widiomatic-parentheses on.
 // <rdar://problem/7382435>
 
 @interface Object 





More information about the cfe-commits mailing list