r322901 - Remove TautologicalInRangeCompare from Extra and TautologicalCompare.
Hans Wennborg via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 19 02:10:55 PST 2018
Merged to 6.0 in r322931.
On Thu, Jan 18, 2018 at 10:40 PM, Nico Weber via cfe-commits
<cfe-commits at lists.llvm.org> wrote:
> Author: nico
> Date: Thu Jan 18 13:40:27 2018
> New Revision: 322901
>
> URL: http://llvm.org/viewvc/llvm-project?rev=322901&view=rev
> Log:
> Remove TautologicalInRangeCompare from Extra and TautologicalCompare.
>
> This removes the following (already default-off) warnings from -Wextra:
> -Wtautological-type-limit-compare,
> -Wtautological-unsigned-zero-compare
> -Wtautological-unsigned-enum-zero-compare
>
> On the thread "[cfe-dev] -Wtautological-constant-compare issues", clang
> code owners Richard Smith, John McCall, and Reid Kleckner as well as
> libc++ code owner Marshall Clow stated that these new warnings are not
> yet ready for prime time and shouldn't be part of -Wextra.
>
> Furthermore, Vedant Kumar (Apple), Peter Hosek (Fuchsia), and me (Chromium)
> expressed the same concerns (Vedant on that thread, Peter on
> https://reviews.llvm.org/D39462, me on https://reviews.llvm.org/D41512).
>
> So remove them from -Wextra, and remove TautologicalInRangeCompare from
> TautologicalCompare too until they're usable with real-world code.
>
> Modified:
> cfe/trunk/include/clang/Basic/DiagnosticGroups.td
> cfe/trunk/test/Sema/tautological-constant-compare.c
>
> Modified: cfe/trunk/include/clang/Basic/DiagnosticGroups.td
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticGroups.td?rev=322901&r1=322900&r2=322901&view=diff
> ==============================================================================
> --- cfe/trunk/include/clang/Basic/DiagnosticGroups.td (original)
> +++ cfe/trunk/include/clang/Basic/DiagnosticGroups.td Thu Jan 18 13:40:27 2018
> @@ -444,8 +444,7 @@ def TautologicalInRangeCompare : DiagGro
> TautologicalUnsignedEnumZeroCompare]>;
> def TautologicalOutOfRangeCompare : DiagGroup<"tautological-constant-out-of-range-compare">;
> def TautologicalConstantCompare : DiagGroup<"tautological-constant-compare",
> - [TautologicalInRangeCompare,
> - TautologicalOutOfRangeCompare]>;
> + [TautologicalOutOfRangeCompare]>;
> def TautologicalPointerCompare : DiagGroup<"tautological-pointer-compare">;
> def TautologicalOverlapCompare : DiagGroup<"tautological-overlap-compare">;
> def TautologicalUndefinedCompare : DiagGroup<"tautological-undefined-compare">;
> @@ -719,7 +718,6 @@ def IntToPointerCast : DiagGroup<"int-to
> def Move : DiagGroup<"move", [PessimizingMove, RedundantMove, SelfMove]>;
>
> def Extra : DiagGroup<"extra", [
> - TautologicalInRangeCompare,
> MissingFieldInitializers,
> IgnoredQualifiers,
> InitializerOverrides,
>
> Modified: cfe/trunk/test/Sema/tautological-constant-compare.c
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/tautological-constant-compare.c?rev=322901&r1=322900&r2=322901&view=diff
> ==============================================================================
> --- cfe/trunk/test/Sema/tautological-constant-compare.c (original)
> +++ cfe/trunk/test/Sema/tautological-constant-compare.c Thu Jan 18 13:40:27 2018
> @@ -2,8 +2,8 @@
> // RUN: %clang_cc1 -triple x86_64-linux-gnu -fsyntax-only -Wtautological-constant-in-range-compare -DTEST -verify -x c++ %s
> // RUN: %clang_cc1 -triple x86_64-linux-gnu -fsyntax-only -Wtautological-type-limit-compare -DTEST -verify %s
> // RUN: %clang_cc1 -triple x86_64-linux-gnu -fsyntax-only -Wtautological-type-limit-compare -DTEST -verify -x c++ %s
> -// RUN: %clang_cc1 -triple x86_64-linux-gnu -fsyntax-only -Wextra -Wno-sign-compare -DTEST -verify %s
> -// RUN: %clang_cc1 -triple x86_64-linux-gnu -fsyntax-only -Wextra -Wno-sign-compare -DTEST -verify -x c++ %s
> +// RUN: %clang_cc1 -triple x86_64-linux-gnu -fsyntax-only -Wextra -Wno-sign-compare -verify %s
> +// RUN: %clang_cc1 -triple x86_64-linux-gnu -fsyntax-only -Wextra -Wno-sign-compare -verify -x c++ %s
> // RUN: %clang_cc1 -triple x86_64-linux-gnu -fsyntax-only -Wall -verify %s
> // RUN: %clang_cc1 -triple x86_64-linux-gnu -fsyntax-only -Wall -verify -x c++ %s
> // RUN: %clang_cc1 -triple x86_64-linux-gnu -fsyntax-only -verify %s
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list