[PATCH] D81272: [clang-tidy] New check `bugprone-redundant-branch-condition`

2020-09-20 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In D81272#2276342 , @sylvestre.ledru wrote: > Thanks for this checker. FYI, it found (at least) 3 defects in Firefox code > (fixed with the autofix): > https://hg.mozilla.org/mozilla-central/rev/651e68f628d0 > > https:

[PATCH] D81272: [clang-tidy] New check `bugprone-redundant-branch-condition`

2020-09-20 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment. Any chance this changes could have caused this regression https://bugs.llvm.org/show_bug.cgi?id=47589 ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81272/new/ https://reviews.llvm.org/D81272

[PATCH] D81272: [clang-tidy] New check `bugprone-redundant-branch-condition`

2020-09-16 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment. Thanks for this checker. FYI, it found (at least) 3 defects in Firefox code: https://hg.mozilla.org/mozilla-central/rev/651e68f628d0 https://bugzilla.mozilla.org/show_bug.cgi?id=1664747 (unlikely that it was causing any actual bugs in the product) Repository:

[PATCH] D81272: [clang-tidy] New check `bugprone-redundant-branch-condition`

2020-08-31 Thread Balogh , Ádám via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG14dd0737822b: [Clang-Tidy] New check `bugprone-redundant-branch-condition` (authored by baloghadamsoftware). Changed prior to commit: https://reviews.llvm.org/D81272?vs=285656&id=288940#toc Repository:

[PATCH] D81272: [clang-tidy] New check `bugprone-redundant-branch-condition`

2020-08-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. In D81272#2218246 , @whisperity wrote: > In D81272#2218175 , @aaron.ballman > wrote: > >> While I agree with your observation about data and flow

[PATCH] D81272: [clang-tidy] New check `bugprone-redundant-branch-condition`

2020-08-14 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. In D81272#2218175 , @aaron.ballman wrote: > While I agree with your observation about data and flow sensitivity, I > approved on the belief that the check as-is provides enough utility to > warrant adding it as-is. If someone

[PATCH] D81272: [clang-tidy] New check `bugprone-redundant-branch-condition`

2020-08-14 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 285656. baloghadamsoftware added a comment. Tests andd for not yet handled cases. Known limiatations included in the docs. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81272/new/ https://reviews.llvm.org/D81272 Files: clang-tools-extr

[PATCH] D81272: [clang-tidy] New check `bugprone-redundant-branch-condition`

2020-08-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D81272#2218173 , @whisperity wrote: > In D81272#2218050 , @aaron.ballman > wrote: > >> Thanks to the new info, I think the check basically LGTM. Can you add some >> negative tests

[PATCH] D81272: [clang-tidy] New check `bugprone-redundant-branch-condition`

2020-08-14 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. In D81272#2218050 , @aaron.ballman wrote: > Thanks to the new info, I think the check basically LGTM. Can you add some > negative tests and documentation wording to make it clear that the check > doesn't currently handle all

[PATCH] D81272: [clang-tidy] New check `bugprone-redundant-branch-condition`

2020-08-14 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. In D81272#2218090 , @baloghadamsoftware wrote: > In D81272#2218050 , @aaron.ballman > wrote: >

[PATCH] D81272: [clang-tidy] New check `bugprone-redundant-branch-condition`

2020-08-14 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In D81272#2218050 , @aaron.ballman wrote: > Thanks to the new info, I think the check basically LGTM. Can you add some > negative tests and documentation wording to make it clear that the check > doesn't currently han

[PATCH] D81272: [clang-tidy] New check `bugprone-redundant-branch-condition`

2020-08-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thanks to the new info, I think the check basically LGTM. Can you add some negative tests and documentation wording to make it clear that the check doesn't currently handle all logically equivalent predicates, like: if (foo) { } else { if (!foo) { }

[PATCH] D81272: [clang-tidy] New check `bugprone-redundant-branch-condition`

2020-08-14 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 285608. baloghadamsoftware added a comment. It seems that //release notes// were not renamed automatically. I updated it manually now. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81272/new/ https://reviews.llvm.org/D81272 Files: cla

[PATCH] D81272: [clang-tidy] New check `bugprone-redundant-branch-condition`

2020-08-14 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 285606. baloghadamsoftware retitled this revision from "[clang-tidy] New check `misc-redundant-condition`" to "[clang-tidy] New check `bugprone-redundant-branch-condition`". baloghadamsoftware edited the summary of this revision. baloghadamsoftware