[PATCH] D77572: [clang-tidy] add new check readability-use-anyofallof
Matthias Gehre via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 7 14:43:23 PDT 2020
mgehre marked 6 inline comments as done.
mgehre added a comment.
In D77572#1965143 <https://reviews.llvm.org/D77572#1965143>, @njames93 wrote:
> I'm struggling to see the value of this check though. If it was reworked to check for loop in the middle of a function it would have a lot more value.
This is (just) a first step. The next step is to detect the local variable case as you also described it. Note that this also catches functions
that do some preprocessing and end with a any_of-style loop.
I also have a local branch that generates fixits, but they add quite some code, so I wanted to put them in a separate PR.
In LLVM & clang, the check in this PR already emits 370 unique warnings. F11685854: readability-use-anyofallof.log <https://reviews.llvm.org/F11685854>
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77572/new/
https://reviews.llvm.org/D77572
More information about the cfe-commits
mailing list