[clang-tidy] add new check readability-use-anyofallof
authorMatthias Gehre <gehre.matthias@gmail.com>
Wed, 2 Oct 2019 22:39:46 +0000 (00:39 +0200)
committerMatthias Gehre <gehre.matthias@gmail.com>
Wed, 3 Jun 2020 10:19:06 +0000 (12:19 +0200)
commitadd51e152aa6dc3aa7a51901a099b2ebe8cfe377
tree93c2955a830fc68a296a02c15c5d978fe3871d47
parente6ba0a55fd39b600f3f431308f4a7e36e48f91ae
[clang-tidy] add new check readability-use-anyofallof

Summary:
Finds range-based for loops that can be replaced by a call to ``std::any_of`` or
``std::all_of``. In C++ 20 mode, suggests ``std::ranges::any_of`` or
``std::ranges::all_of``.
For now, no fixits are produced.

Reviewers: aaron.ballman, alexfh, hokein

Subscribers: mgorny, xazax.hun, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D77572
clang-tools-extra/clang-tidy/readability/CMakeLists.txt
clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp
clang-tools-extra/clang-tidy/readability/UseAnyOfAllOfCheck.cpp [new file with mode: 0644]
clang-tools-extra/clang-tidy/readability/UseAnyOfAllOfCheck.h [new file with mode: 0644]
clang-tools-extra/docs/ReleaseNotes.rst
clang-tools-extra/docs/clang-tidy/checks/list.rst
clang-tools-extra/docs/clang-tidy/checks/readability-use-anyofallof.rst [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/checkers/readability-use-anyofallof-cpp20.cpp [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/checkers/readability-use-anyofallof.cpp [new file with mode: 0644]