aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2012-10-10 20:30:36 +0000
committerDavid Blaikie <dblaikie@gmail.com>2012-10-10 20:30:36 +0000
commit831339c36eefc9d2d1447d5d6ffa294510db8044 (patch)
tree0d4b8b0730824c405b7fbdbfcdd0f366280be75a
parentdbd91975742f4a6e797887f861c414cdd024255c (diff)
Make -Wshift-op-parentheses a subgroup of -Wparentheses
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165653 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Basic/DiagnosticGroups.td1
-rw-r--r--test/Misc/warning-flags-enabled.c8
2 files changed, 9 insertions, 0 deletions
diff --git a/include/clang/Basic/DiagnosticGroups.td b/include/clang/Basic/DiagnosticGroups.td
index a0a5911eb5..00a0dc709d 100644
--- a/include/clang/Basic/DiagnosticGroups.td
+++ b/include/clang/Basic/DiagnosticGroups.td
@@ -317,6 +317,7 @@ def ParenthesesOnEquality : DiagGroup<"parentheses-equality">;
def Parentheses : DiagGroup<"parentheses",
[LogicalOpParentheses,
BitwiseOpParentheses,
+ ShiftOpParentheses,
ParenthesesOnEquality,
DanglingElse]>;
diff --git a/test/Misc/warning-flags-enabled.c b/test/Misc/warning-flags-enabled.c
index 0e95f3147b..ba29e7ac51 100644
--- a/test/Misc/warning-flags-enabled.c
+++ b/test/Misc/warning-flags-enabled.c
@@ -33,3 +33,11 @@
//
// CHECK-ENUM-CONVERSION: -Wenum-conversion
// CHECK-NO-ENUM-CONVERSION-NOT: -Wenum-conversion
+
+// Test if -Wshift-op-parentheses is a subgroup of -Wparentheses
+// RUN: diagtool show-enabled --no-levels -Wno-parentheses -Wshift-op-parentheses %s | FileCheck --check-prefix CHECK-SHIFT-OP-PARENTHESES %s
+// RUN: diagtool show-enabled --no-levels %s | FileCheck --check-prefix CHECK-SHIFT-OP-PARENTHESES %s
+// RUN: diagtool show-enabled --no-levels -Wno-parentheses %s | FileCheck --check-prefix CHECK-NO-SHIFT-OP-PARENTHESES %s
+//
+// CHECK-SHIFT-OP-PARENTHESES: -Wshift-op-parentheses
+// CHECK-NO-SHIFT-OP-PARENTHESES-NOT: -Wshift-op-parentheses