[PATCH] D69292: Proposal to add -Wtautological-compare to -Wall

2019-11-16 Thread Richard Trieu via Phabricator via cfe-commits
rtrieu added a comment. In D69292#1747062 , @mclow.lists wrote: > Sorry I'm late to the party; I've been traveling for 3+ weeks. > I would like to be reassured that the following code will not warn: > > ` >long foo = ...; // some calculation >

[PATCH] D69292: Proposal to add -Wtautological-compare to -Wall

2019-11-14 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Sorry I'm late to the party; I've been traveling for 3+ weeks. I would like to be reassured that the following code will not warn: ` long foo = ...; // some calculation if (foo < std::numeric_limits::min() || foo > std::numeric_limits::max()) . This is

Re: [PATCH] D69292: Proposal to add -Wtautological-compare to -Wall

2019-11-13 Thread Arthur O'Dwyer via cfe-commits
FWIW, I think it's a lot harder to make this kind of typo-bug if you always (always!) keep all your numbers in number-line order, with all the alligators' mouths opening to the right: return CT_Vector *<*= CT && CT *<*= CT_ForwardList; Some programming languages (not C++) even let you omit

[PATCH] D69292: Proposal to add -Wtautological-compare to -Wall

2019-11-13 Thread David Zarzycki via Phabricator via cfe-commits
davezarzycki added a comment. Let's just fix the bug: 1d55c9e59ebf3f3ff572d42da433b2f72f1ce900 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69292/new/

[PATCH] D69292: Proposal to add -Wtautological-compare to -Wall

2019-11-13 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. So use similar fix as I did: https://reviews.llvm.org/D69708 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69292/new/ https://reviews.llvm.org/D69292 ___ cfe-commits mailing

[PATCH] D69292: Proposal to add -Wtautological-compare to -Wall

2019-11-12 Thread David Zarzycki via Phabricator via cfe-commits
davezarzycki added subscribers: libcxx-commits, davezarzycki. davezarzycki added a comment. This broke the libcxx test suite: FAIL: libc++ :: libcxx/debug/containers/db_sequence_container_iterators.multithread.pass.cpp (50769 of 59296) TEST 'libc++ ::

[PATCH] D69292: Proposal to add -Wtautological-compare to -Wall

2019-11-12 Thread Richard Trieu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9740f9f0b6e5: Add -Wtautological-compare to -Wall (authored by rtrieu). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D69292?vs=228361=228970#toc Repository: rG

[PATCH] D69292: Proposal to add -Wtautological-compare to -Wall

2019-11-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69292/new/ https://reviews.llvm.org/D69292 ___ cfe-commits mailing

[PATCH] D69292: Proposal to add -Wtautological-compare to -Wall

2019-11-07 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Thanks. Looks good. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69292/new/ https://reviews.llvm.org/D69292 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D69292: Proposal to add -Wtautological-compare to -Wall

2019-11-07 Thread Richard Trieu via Phabricator via cfe-commits
rtrieu updated this revision to Diff 228361. rtrieu added a comment. Add -Wall tests to check that certain warning groups are active with it and a test to check all warning groups that are turned on by -Wall. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69292/new/

[PATCH] D69292: Proposal to add -Wtautological-compare to -Wall

2019-11-07 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Re-ping @rtrieu CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69292/new/ https://reviews.llvm.org/D69292 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D69292: Proposal to add -Wtautological-compare to -Wall

2019-10-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D69292#1723720 , @xbolva00 wrote: > Just use > > // RUN: %clang_cc1 -fsyntax-only -verify -Wall %s > // RUN: %clang_cc1 -fsyntax-only -verify -Wtautological-bitwise-compare %s > > > in > >

[PATCH] D69292: Proposal to add -Wtautological-compare to -Wall

2019-10-28 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Just use // RUN: %clang_cc1 -fsyntax-only -verify -Wall %s // RUN: %clang_cc1 -fsyntax-only -verify -Wtautological-bitwise-compare %s in clang/test/SemaCXX/warn-bitwise-compare.cpp ? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69292/new/

[PATCH] D69292: Proposal to add -Wtautological-compare to -Wall

2019-10-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D69292#1722162 , @thakis wrote: > This is imho basic enough that it doesn't need a test. A test for this > doesn't add any value that I can see. The value comes from having an explicit test to demonstrate the behavior

[PATCH] D69292: Proposal to add -Wtautological-compare to -Wall

2019-10-25 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. This is imho basic enough that it doesn't need a test. A test for this doesn't add any value that I can see. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69292/new/ https://reviews.llvm.org/D69292 ___ cfe-commits

[PATCH] D69292: Proposal to add -Wtautological-compare to -Wall

2019-10-25 Thread Richard Trieu via Phabricator via cfe-commits
rtrieu added a comment. In D69292#1718415 , @thakis wrote: > Abstractly this lgtm. Do you have any data on true / false positive rates? Looking at the various warnings in -Wtautological-compare, only -Wtautological-overlap-compare and

[PATCH] D69292: Proposal to add -Wtautological-compare to -Wall

2019-10-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman requested changes to this revision. aaron.ballman added a comment. This revision now requires changes to proceed. I agree with the changes and want to see this go in, but it needs a test case. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69292/new/

[PATCH] D69292: Proposal to add -Wtautological-compare to -Wall

2019-10-23 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. https://github.com/ClangBuiltLinux/linux/issues/488#issuecomment-545218125 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69292/new/ https://reviews.llvm.org/D69292 ___ cfe-commits mailing list

[PATCH] D69292: Proposal to add -Wtautological-compare to -Wall

2019-10-22 Thread Nico Weber via Phabricator via cfe-commits
thakis accepted this revision. thakis added a comment. This revision is now accepted and ready to land. Abstractly this lgtm. Do you have any data on true / false positive rates? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69292/new/ https://reviews.llvm.org/D69292

[PATCH] D69292: Proposal to add -Wtautological-compare to -Wall

2019-10-22 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Cool! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69292/new/ https://reviews.llvm.org/D69292 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D69292: Proposal to add -Wtautological-compare to -Wall

2019-10-21 Thread Richard Trieu via Phabricator via cfe-commits
rtrieu created this revision. Per https://reviews.llvm.org/D66046, patch to move -Wtautological-compare to -Wmost, which also adds it to -Wall. Some warnings in -Wtautological-compare and its diagnostic sub-groups are DefaultIgnore, so making them visible in -Wall will make them more