PiotrZSL added inline comments.
================ Comment at: clang-tools-extra/clang-tidy/modernize/PrintfToStdPrintCheck.cpp:28 + ReplacementPrintFunction(Options.get("PrintFunction", "std::print")) { + PrintfLikeFunctions.push_back("printf"); + PrintfLikeFunctions.push_back("absl::PrintF"); ---------------- NOTE: Consider using fully qualified names, like `::printf` ================ Comment at: clang-tools-extra/clang-tidy/modernize/PrintfToStdPrintCheck.cpp:45 + Finder->addMatcher( + traverse(TK_AsIs, + callExpr(callee(functionDecl(matchers::matchesAnyListedName( ---------------- TK_IgnoreUnlessSpelledInSource should be fine for this. ================ Comment at: clang-tools-extra/clang-tidy/modernize/PrintfToStdPrintCheck.cpp:68 + DiagnosticBuilder Diag = + diag(PrintfCall->getBeginLoc(), "Replace %0 with '%1'") + << OldFunction->getIdentifier() << ReplacementPrintFunction; ---------------- start warning with lower case, and maybe something like "use %0 instead of %1" (or whatever) ================ Comment at: clang-tools-extra/clang-tidy/utils/FormatStringConverter.h:32-47 + const ASTContext *Context; + bool ConversionPossible = true; + bool FormatStringNeededRewriting = false; + size_t PrintfFormatStringPos = 0U; + StringRef PrintfFormatString; + + const Expr *const *Args; ---------------- NOTE: Consider re-ordering private-public, like in other files, to first put public stuff, then private. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149280/new/ https://reviews.llvm.org/D149280 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits