clang-tools 22.0.0git
|
Replaces nested std::min and std::max calls with an initializer list where applicable. More...
#include <MinMaxUseInitializerListCheck.h>
Public Member Functions | |
MinMaxUseInitializerListCheck (StringRef Name, ClangTidyContext *Context) | |
void | storeOptions (ClangTidyOptions::OptionMap &Opts) override |
void | registerMatchers (ast_matchers::MatchFinder *Finder) override |
void | registerPPCallbacks (const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) override |
void | check (const ast_matchers::MatchFinder::MatchResult &Match) override |
bool | isLanguageVersionSupported (const LangOptions &LangOpts) const override |
std::optional< TraversalKind > | getCheckTraversalKind () const override |
Replaces nested std::min and std::max calls with an initializer list where applicable.
For example:
This code is transformed to:
Definition at line 31 of file MinMaxUseInitializerListCheck.h.
clang::tidy::modernize::MinMaxUseInitializerListCheck::MinMaxUseInitializerListCheck | ( | StringRef | Name, |
ClangTidyContext * | Context ) |
Definition at line 204 of file MinMaxUseInitializerListCheck.cpp.
|
override |
Definition at line 244 of file MinMaxUseInitializerListCheck.cpp.
References clang::tidy::modernize::findArgs(), and clang::tidy::modernize::generateReplacements().
|
inlineoverride |
Definition at line 44 of file MinMaxUseInitializerListCheck.h.
|
inlineoverride |
Definition at line 41 of file MinMaxUseInitializerListCheck.h.
|
override |
Definition at line 222 of file MinMaxUseInitializerListCheck.cpp.
References FuncDecl.
|
override |
Definition at line 239 of file MinMaxUseInitializerListCheck.cpp.
|
override |
Definition at line 214 of file MinMaxUseInitializerListCheck.cpp.