From: David Blaikie Date: Wed, 10 Oct 2012 20:30:36 +0000 (+0000) Subject: Make -Wshift-op-parentheses a subgroup of -Wparentheses X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=831339c36eefc9d2d1447d5d6ffa294510db8044;p=clang 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 --- 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