aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2011-04-29 20:30:39 +0000
committerTed Kremenek <kremenek@apple.com>2011-04-29 20:30:39 +0000
commit0a241a1755b5e4d3adb0d828dff42f96a5a8bd95 (patch)
tree00368119eb2189a238078c6242151ffe834baa9a
parentab9c0386ee71d4df79a13919e403c52f36df58ce (diff)
Change -Wparentheses to not imply -Widiomatic-parentheses. Users rarely want to see these warnings, and often explicitly pass -Wparentheses.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130535 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Basic/DiagnosticGroups.td7
-rw-r--r--test/SemaObjC/idiomatic-parentheses.m4
2 files changed, 6 insertions, 5 deletions
diff --git a/include/clang/Basic/DiagnosticGroups.td b/include/clang/Basic/DiagnosticGroups.td
index 4dc338aaf3..c85acc5107 100644
--- a/include/clang/Basic/DiagnosticGroups.td
+++ b/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/test/SemaObjC/idiomatic-parentheses.m b/test/SemaObjC/idiomatic-parentheses.m
index 011efbc437..39e97e2df6 100644
--- a/test/SemaObjC/idiomatic-parentheses.m
+++ b/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