clang-tools 22.0.0git
clang::tidy::modernize::UseStdPrintCheck Class Reference

Convert calls to printf-like functions to std::print and std::println. More...

#include <UseStdPrintCheck.h>

Inheritance diagram for clang::tidy::modernize::UseStdPrintCheck:
[legend]

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

Detailed Description

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.

Constructor & Destructor Documentation

◆ UseStdPrintCheck()

clang::tidy::modernize::UseStdPrintCheck::UseStdPrintCheck ( StringRef Name,
ClangTidyContext * Context )

Definition at line 24 of file UseStdPrintCheck.cpp.

Member Function Documentation

◆ check()

◆ getCheckTraversalKind()

std::optional< TraversalKind > clang::tidy::modernize::UseStdPrintCheck::getCheckTraversalKind ( ) const
inlineoverride

Definition at line 34 of file UseStdPrintCheck.h.

◆ isLanguageVersionSupported()

bool clang::tidy::modernize::UseStdPrintCheck::isLanguageVersionSupported ( const LangOptions & LangOpts) const
inlineoverride

Definition at line 23 of file UseStdPrintCheck.h.

◆ registerMatchers()

void clang::tidy::modernize::UseStdPrintCheck::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

◆ registerPPCallbacks()

void clang::tidy::modernize::UseStdPrintCheck::registerPPCallbacks ( const SourceManager & SM,
Preprocessor * PP,
Preprocessor * ModuleExpanderPP )
override

Definition at line 66 of file UseStdPrintCheck.cpp.

◆ storeOptions()

void clang::tidy::modernize::UseStdPrintCheck::storeOptions ( ClangTidyOptions::OptionMap & Opts)
override

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