]> granicus.if.org Git - clang/commitdiff
Change -Wparentheses to not imply -Widiomatic-parentheses. Users rarely want to...
authorTed Kremenek <kremenek@apple.com>
Fri, 29 Apr 2011 20:30:39 +0000 (20:30 +0000)
committerTed Kremenek <kremenek@apple.com>
Fri, 29 Apr 2011 20:30:39 +0000 (20:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130535 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticGroups.td
test/SemaObjC/idiomatic-parentheses.m

index 4dc338aaf3ab0558cb29ad2aae939ffaab26671b..c85acc510770af24716764b24e3da05ea3a1ce44 100644 (file)
@@ -185,10 +185,11 @@ def DuplicateArgDecl : DiagGroup<"duplicate-method-arg">;
 // 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:
index 011efbc437bf0a1a7bdcd1113dedb5ce015a40ae..39e97e2df60a05976a106bb5109aeda3d465f0b0 100644 (file)
@@ -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