From: Joerg Sonnenberger Date: Fri, 14 Oct 2011 17:34:53 +0000 (+0000) Subject: Add flags for the remaining shift related warnings X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d5951cbf4ef86c417609237e6815ac3ca638a09c;p=clang Add flags for the remaining shift related warnings (-Wshift-count-negative, -Wshift-count-overflow). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141962 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index ab4a843e14..a3a423d9d7 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -3125,8 +3125,10 @@ def warn_floatingpoint_eq : Warning< def warn_division_by_zero : Warning<"division by zero is undefined">; def warn_remainder_by_zero : Warning<"remainder by zero is undefined">; -def warn_shift_negative : Warning<"shift count is negative">; -def warn_shift_gt_typewidth : Warning<"shift count >= width of type">; +def warn_shift_negative : Warning<"shift count is negative">, + InGroup>; +def warn_shift_gt_typewidth : Warning<"shift count >= width of type">, + InGroup>; def warn_shift_result_gt_typewidth : Warning< "signed shift result (%0) requires %1 bits to represent, but %2 only has " "%3 bits">, InGroup>; diff --git a/test/Misc/warning-flags.c b/test/Misc/warning-flags.c index 44d6e9a348..2f7103ab1c 100644 --- a/test/Misc/warning-flags.c +++ b/test/Misc/warning-flags.c @@ -17,7 +17,7 @@ This test serves two purposes: The list of warnings below should NEVER grow. It should gradually shrink to 0. -CHECK: Warnings without flags (299): +CHECK: Warnings without flags (297): CHECK-NEXT: backslash_newline_space CHECK-NEXT: charize_microsoft_ext CHECK-NEXT: ext_anon_param_requires_type_specifier @@ -288,8 +288,6 @@ CHECK-NEXT: warn_second_parameter_of_va_start_not_last_named_argument CHECK-NEXT: warn_second_parameter_to_va_arg_never_compatible CHECK-NEXT: warn_setter_getter_impl_required CHECK-NEXT: warn_setter_getter_impl_required_in_category -CHECK-NEXT: warn_shift_gt_typewidth -CHECK-NEXT: warn_shift_negative CHECK-NEXT: warn_standalone_specifier CHECK-NEXT: warn_static_inline_explicit_inst_ignored CHECK-NEXT: warn_static_non_static