clang-tools 22.0.0git
clang::tidy::performance::InefficientAlgorithmCheck Class Reference

Warns on inefficient use of STL algorithms on associative containers. More...

#include <InefficientAlgorithmCheck.h>

Inheritance diagram for clang::tidy::performance::InefficientAlgorithmCheck:
[legend]

Public Member Functions

 InefficientAlgorithmCheck (StringRef Name, ClangTidyContext *Context)
bool isLanguageVersionSupported (const LangOptions &LangOpts) const override
void registerMatchers (ast_matchers::MatchFinder *Finder) override
void check (const ast_matchers::MatchFinder::MatchResult &Result) override
std::optional< TraversalKind > getCheckTraversalKind () const override

Detailed Description

Warns on inefficient use of STL algorithms on associative containers.

Associative containers implements some of the algorithms as methods which should be preferred to the algorithms in the algorithm header. The methods can take advantage of the order of the elements.

Definition at line 21 of file InefficientAlgorithmCheck.h.

Constructor & Destructor Documentation

◆ InefficientAlgorithmCheck()

clang::tidy::performance::InefficientAlgorithmCheck::InefficientAlgorithmCheck ( StringRef Name,
ClangTidyContext * Context )
inline

Definition at line 23 of file InefficientAlgorithmCheck.h.

Member Function Documentation

◆ check()

void clang::tidy::performance::InefficientAlgorithmCheck::check ( const ast_matchers::MatchFinder::MatchResult & Result)
override

◆ getCheckTraversalKind()

std::optional< TraversalKind > clang::tidy::performance::InefficientAlgorithmCheck::getCheckTraversalKind ( ) const
inlineoverride

Definition at line 30 of file InefficientAlgorithmCheck.h.

◆ isLanguageVersionSupported()

bool clang::tidy::performance::InefficientAlgorithmCheck::isLanguageVersionSupported ( const LangOptions & LangOpts) const
inlineoverride

Definition at line 25 of file InefficientAlgorithmCheck.h.

◆ registerMatchers()

void clang::tidy::performance::InefficientAlgorithmCheck::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

Definition at line 27 of file InefficientAlgorithmCheck.cpp.


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