]> granicus.if.org Git - clang/commitdiff
Make -Wshift-op-parentheses a subgroup of -Wparentheses
authorDavid Blaikie <dblaikie@gmail.com>
Wed, 10 Oct 2012 20:30:36 +0000 (20:30 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Wed, 10 Oct 2012 20:30:36 +0000 (20:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165653 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticGroups.td
test/Misc/warning-flags-enabled.c

index a0a5911eb532b19e7516f084b75889bf00c33861..00a0dc709dd761239058b7bbd8f2458df65bdcca 100644 (file)
@@ -317,6 +317,7 @@ def ParenthesesOnEquality : DiagGroup<"parentheses-equality">;
 def Parentheses : DiagGroup<"parentheses",
                             [LogicalOpParentheses,
                              BitwiseOpParentheses,
+                             ShiftOpParentheses,
                              ParenthesesOnEquality,
                              DanglingElse]>;
 
index 0e95f3147b2142b93b97ea23f7aa6a3930c9b507..ba29e7ac51a12eede2757462366734f9c11f2be7 100644 (file)
 //
 // 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