[all-commits] [llvm/llvm-project] add51e: [clang-tidy] add new check readability-use-anyofallof

Matthias Gehre via All-commits all-commits at lists.llvm.org
Wed Jun 3 03:20:38 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: add51e152aa6dc3aa7a51901a099b2ebe8cfe377
      https://github.com/llvm/llvm-project/commit/add51e152aa6dc3aa7a51901a099b2ebe8cfe377
  Author: Matthias Gehre <gehre.matthias at gmail.com>
  Date:   2020-06-03 (Wed, 03 Jun 2020)

  Changed paths:
    M clang-tools-extra/clang-tidy/readability/CMakeLists.txt
    M clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp
    A clang-tools-extra/clang-tidy/readability/UseAnyOfAllOfCheck.cpp
    A clang-tools-extra/clang-tidy/readability/UseAnyOfAllOfCheck.h
    M clang-tools-extra/docs/ReleaseNotes.rst
    M clang-tools-extra/docs/clang-tidy/checks/list.rst
    A clang-tools-extra/docs/clang-tidy/checks/readability-use-anyofallof.rst
    A clang-tools-extra/test/clang-tidy/checkers/readability-use-anyofallof-cpp20.cpp
    A clang-tools-extra/test/clang-tidy/checkers/readability-use-anyofallof.cpp

  Log Message:
  -----------
  [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




More information about the All-commits mailing list