From 831339c36eefc9d2d1447d5d6ffa294510db8044 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Wed, 10 Oct 2012 20:30:36 +0000 Subject: [PATCH] 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 --- include/clang/Basic/DiagnosticGroups.td | 1 + test/Misc/warning-flags-enabled.c | 8 ++++++++ 2 files changed, 9 insertions(+) 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