[PATCH] D41512: [Sema] -Wtautological-constant-compare is too good. Cripple it.

2018-01-03 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL321691: [Sema] -Wtautological-constant-compare is too good. Cripple it. (authored by lebedevri, committed by ). Changed prior to commit: https://reviews.llvm.org/D41512?vs=128470&id=128494#toc Reposito

[PATCH] D41512: [Sema] -Wtautological-constant-compare is too good. Cripple it.

2018-01-02 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. FWIW we build with -Wall -Wextra and we disable this warning since it's in our (chromium's) opinion not useful on large real-world code. So I'm not sure it should be in -Wextra. (Also, I believe clang has historically tried to keep -Wall and -Wextra pretty similar?) Re

[PATCH] D41512: [Sema] -Wtautological-constant-compare is too good. Cripple it.

2018-01-02 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added inline comments. This revision is now accepted and ready to land. Comment at: include/clang/Basic/DiagnosticGroups.td:438 def StrncatSize : DiagGroup<"strncat-size">; +def TautologicalTypeLimitCompare : DiagGroup<"tautological-type-li

[PATCH] D41512: [Sema] -Wtautological-constant-compare is too good. Cripple it.

2018-01-02 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 128470. lebedev.ri added a comment. Actually update the diagnostic flag :) I'm going to hold off committing just yet, and wait for @rsmith to sign off. Repository: rC Clang https://reviews.llvm.org/D41512 Files: include/clang/Basic/DiagnosticGroups

[PATCH] D41512: [Sema] -Wtautological-constant-compare is too good. Cripple it.

2018-01-02 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 128462. lebedev.ri marked 3 inline comments as done. lebedev.ri added a comment. Renamed `TautologicalRangeCompare` to `TautologicalInRangeCompare`. Given that previous version of this differential was already previously accepted, and the fact that this n

[PATCH] D41512: [Sema] -Wtautological-constant-compare is too good. Cripple it.

2018-01-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/DiagnosticGroups.td:440 def TautologicalUnsignedEnumZeroCompare : DiagGroup<"tautological-unsigned-enum-zero-compare">; +def TautologicalRangeCompare : DiagGroup<"tautological-constant-range-compare">; def T

[PATCH] D41512: [Sema] -Wtautological-constant-compare is too good. Cripple it.

2018-01-02 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. @aaron.ballman, @smeenai, thank you for feedback! Comment at: include/clang/Basic/DiagnosticGroups.td:440 def TautologicalUnsignedEnumZeroCompare : DiagGroup<"tautological-unsigned-enum-zero-compare">; +def TautologicalRangeCompare : DiagGroup<"ta

[PATCH] D41512: [Sema] -Wtautological-constant-compare is too good. Cripple it.

2018-01-02 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added inline comments. Comment at: include/clang/Basic/DiagnosticGroups.td:440 def TautologicalUnsignedEnumZeroCompare : DiagGroup<"tautological-unsigned-enum-zero-compare">; +def TautologicalRangeCompare : DiagGroup<"tautological-constant-range-compare">; def Tautolo

[PATCH] D41512: [Sema] -Wtautological-constant-compare is too good. Cripple it.

2018-01-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/DiagnosticGroups.td:440 def TautologicalUnsignedEnumZeroCompare : DiagGroup<"tautological-unsigned-enum-zero-compare">; +def TautologicalRangeCompare : DiagGroup<"tautological-constant-range-compare">; def T

[PATCH] D41512: [Sema] -Wtautological-constant-compare is too good. Cripple it.

2018-01-01 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Ping. Branching is approaching rapidly. This needs to land before that. Repository: rC Clang https://reviews.llvm.org/D41512 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman

[PATCH] D41512: [Sema] -Wtautological-constant-compare is too good. Cripple it.

2017-12-27 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 128226. lebedev.ri edited the summary of this revision. lebedev.ri added a comment. Herald added a subscriber: mehdi_amini. - Give `warn_tautological_constant_compare` it's own flag `-Wtautological-type-limit-compare`. I'm not happy about that name, but i

[PATCH] D41512: [Sema] -Wtautological-constant-compare is too good. Cripple it.

2017-12-25 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 128128. lebedev.ri added a comment. Move `TautologicalUnsignedZeroCompare` and `TautologicalUnsignedEnumZeroCompare` into `TautologicalRangeCompare` too, and enable them only in `-Wextra`. Please advise re flag name for `warn_tautological_constant_compare

[PATCH] D41512: [Sema] -Wtautological-constant-compare is too good. Cripple it.

2017-12-25 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: include/clang/Basic/DiagnosticGroups.td:439 def TautologicalUnsignedZeroCompare : DiagGroup<"tautological-unsigned-zero-compare">; def TautologicalUnsignedEnumZeroCompare : DiagGroup<"tautological-unsigned-enum-zero-compare">; +de

[PATCH] D41512: [Sema] -Wtautological-constant-compare is too good. Cripple it.

2017-12-24 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/clang/Basic/DiagnosticGroups.td:439 def TautologicalUnsignedZeroCompare : DiagGroup<"tautological-unsigned-zero-compare">; def TautologicalUnsignedEnumZeroCompare : DiagGroup<"tautological-unsigned-enum-zero-compare">; +def Ta

[PATCH] D41512: [Sema] -Wtautological-constant-compare is too good. Cripple it.

2017-12-24 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 128113. lebedev.ri edited the summary of this revision. lebedev.ri added a comment. In https://reviews.llvm.org/D41512#963743, @dim wrote: > We now still have to explicitly use `-Wno-tautological-constant-compare` > everywhere. :-( OTOH, thank you for b

[PATCH] D41512: [Sema] -Wtautological-constant-compare is too good. Cripple it.

2017-12-24 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D41512#963743, @dim wrote: > Actually, having thought about it a little more, if the warning is "rather > broken", or even "completely broken", depending on one's point of view, then > maybe it is better not have it under `-Wextra` either?

Re: [PATCH] D41512: [Sema] -Wtautological-constant-compare is too good. Cripple it.

2017-12-24 Thread Aaron Ballman via cfe-commits
On Sun, Dec 24, 2017 at 11:45 AM, Dimitry Andric via Phabricator wrote: > dim added a comment. > > Actually, having thought about it a little more, if the warning is "rather > broken", or even "completely broken", depending on one's point of view, then > maybe it is better not have it under `-We

[PATCH] D41512: [Sema] -Wtautological-constant-compare is too good. Cripple it.

2017-12-24 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a comment. Actually, having thought about it a little more, if the warning is "rather broken", or even "completely broken", depending on one's point of view, then maybe it is better not have it under `-Wextra` either? E.g. somebody has to ask for the warning specifically, using `-Wta

[PATCH] D41512: [Sema] -Wtautological-constant-compare is too good. Cripple it.

2017-12-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM Repository: rC Clang https://reviews.llvm.org/D41512 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41512: [Sema] -Wtautological-constant-compare is too good. Cripple it.

2017-12-24 Thread Dimitry Andric via Phabricator via cfe-commits
dim accepted this revision. dim added a comment. This revision is now accepted and ready to land. Yes, please. Rather sooner than later, the warning itself can be fixed post-6.0.0. Repository: rC Clang https://reviews.llvm.org/D41512 ___ cfe-co

[PATCH] D41512: [Sema] -Wtautological-constant-compare is too good. Cripple it.

2017-12-21 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri created this revision. lebedev.ri added reviewers: aaron.ballman, rsmith, smeenai, rjmccall, rnk, mclow.lists. lebedev.ri added a project: clang. The diagnostic was mostly introduced in https://reviews.llvm.org/D38101 by me, as a reaction to wasting a lot of time, see mail