clang-tools 22.0.0git
|
Convert calls to printf-like functions to std::print and std::println. More...
#include <UseStdPrintCheck.h>
Public Member Functions | |
UseStdPrintCheck (StringRef Name, ClangTidyContext *Context) | |
bool | isLanguageVersionSupported (const LangOptions &LangOpts) const override |
void | registerPPCallbacks (const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) override |
void | storeOptions (ClangTidyOptions::OptionMap &Opts) override |
void | registerMatchers (ast_matchers::MatchFinder *Finder) override |
void | check (const ast_matchers::MatchFinder::MatchResult &Result) override |
std::optional< TraversalKind > | getCheckTraversalKind () const override |
Convert calls to printf-like functions to std::print and std::println.
For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-std-print.html
Definition at line 20 of file UseStdPrintCheck.h.
clang::tidy::modernize::UseStdPrintCheck::UseStdPrintCheck | ( | StringRef | Name, |
ClangTidyContext * | Context ) |
Definition at line 24 of file UseStdPrintCheck.cpp.
|
override |
Definition at line 121 of file UseStdPrintCheck.cpp.
References clang::tidy::utils::FormatStringConverter::Configuration::AllowTrailingNewlineRemoval, clang::tidy::utils::FormatStringConverter::applyFixes(), clang::tidy::utils::FormatStringConverter::canApply(), clang::tidy::utils::FormatStringConverter::conversionNotPossibleReason(), clang::tidy::utils::FormatStringConverter::Configuration::StrictMode, and clang::tidy::utils::FormatStringConverter::usePrintNewlineFunction().
|
inlineoverride |
Definition at line 34 of file UseStdPrintCheck.h.
|
inlineoverride |
Definition at line 23 of file UseStdPrintCheck.h.
|
override |
Definition at line 97 of file UseStdPrintCheck.cpp.
References clang::tidy::matchers::matchesAnyListedName(), and clang::tidy::modernize::unusedReturnValue().
|
override |
Definition at line 66 of file UseStdPrintCheck.cpp.
|
override |
Definition at line 52 of file UseStdPrintCheck.cpp.
References clang::tidy::utils::options::serializeStringList().