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)
llvm-svn: 165653

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

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