summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
Diffstat (limited to 'clang')
-rw-r--r--clang/include/clang/Basic/DiagnosticGroups.td7
-rw-r--r--clang/test/SemaObjC/idiomatic-parentheses.m4
2 files changed, 6 insertions, 5 deletions
diff --git a/clang/include/clang/Basic/DiagnosticGroups.td b/clang/include/clang/Basic/DiagnosticGroups.td
index 4dc338aaf3a..c85acc51077 100644
--- a/clang/include/clang/Basic/DiagnosticGroups.td
+++ b/clang/include/clang/Basic/DiagnosticGroups.td
@@ -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:
diff --git a/clang/test/SemaObjC/idiomatic-parentheses.m b/clang/test/SemaObjC/idiomatic-parentheses.m
index 011efbc437b..39e97e2df60 100644
--- a/clang/test/SemaObjC/idiomatic-parentheses.m
+++ b/clang/test/SemaObjC/idiomatic-parentheses.m
@@ -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
OpenPOWER on IntegriCloud