[PATCH] D116577: [clang-tidy] Added "boost-use-range-based-for-loop" check

Denis Mikhailov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 9 22:20:32 PST 2022


denzor200 added a comment.

In D116577#3220757 <https://reviews.llvm.org/D116577#3220757>, @LegalizeAdulthood wrote:

> I opened a similar issue for converting Qt's foreach to a range for loop <https://github.com/llvm/llvm-project/issues/27508>.
>
> However this check lands, it should be a simple generalization to have it process Qt foreach loops as well, so perhaps a check name like `modernize-foreach-to-range-for` would be better?

Generic code is a good practize, but i vote against the `modernize-foreach-to-range-for` check. My arguments:
-Not everyone uses //boost// and not everyone agrees to see "boost checks" in the already large //modernize// section. In the future, there will be a lot of these checks, not only `BOOST_FOREACH`. This is for example `Boost Assign`, `Boost Static Assert`, `Boost Format`, and so on, you can go on and on.
-All the same as above can be said about Qt.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116577/new/

https://reviews.llvm.org/D116577



More information about the cfe-commits mailing list