clang-tools 22.0.0git
clang::tidy::readability::UseAnyOfAllOfCheck Class Reference

Finds ranged-based for loops that can be replaced by a call to std::any_of or std::all_of. More...

#include <UseAnyOfAllOfCheck.h>

Inheritance diagram for clang::tidy::readability::UseAnyOfAllOfCheck:
[legend]

Public Member Functions

bool isLanguageVersionSupported (const LangOptions &LangOpts) const override
void registerMatchers (ast_matchers::MatchFinder *Finder) override
void check (const ast_matchers::MatchFinder::MatchResult &Result) override

Detailed Description

Finds ranged-based for loops that can be replaced by a call to std::any_of or std::all_of.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/readability/use-anyofallof.html

Definition at line 22 of file UseAnyOfAllOfCheck.h.

Member Function Documentation

◆ check()

void clang::tidy::readability::UseAnyOfAllOfCheck::check ( const ast_matchers::MatchFinder::MatchResult & Result)
override

Definition at line 88 of file UseAnyOfAllOfCheck.cpp.

References clang::tidy::readability::isViableLoop().

◆ isLanguageVersionSupported()

bool clang::tidy::readability::UseAnyOfAllOfCheck::isLanguageVersionSupported ( const LangOptions & LangOpts) const
inlineoverride

Definition at line 26 of file UseAnyOfAllOfCheck.h.

◆ registerMatchers()

void clang::tidy::readability::UseAnyOfAllOfCheck::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

Definition at line 42 of file UseAnyOfAllOfCheck.cpp.


The documentation for this class was generated from the following files: