[PATCH] D149280: [clang-tidy] Add modernize-printf-to-std-print check
Mike Crowe via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 8 08:46:18 PDT 2023
mikecrowe marked 3 inline comments as done.
mikecrowe added inline comments.
================
Comment at: clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-print.cpp:124-126
+ printf("Integer %d from bool\n", b);
+ // CHECK-MESSAGES: [[@LINE-1]]:3: warning: use 'std::print' instead of 'printf' [modernize-use-std-print]
+ // CHECK-FIXES: std::print("Integer {:d} from bool\n", b);
----------------
njames93 wrote:
> It would be nice if the there was support for changing this to `std::println("Integer {:d} from bool", b);`
Yes. That was item 2 on the plans for the future in my first comment. Would you prefer that everything is completed in this single commit, or would you be happy to the core functionality first with future enhancements in separate commits afterwards?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149280/new/
https://reviews.llvm.org/D149280
More information about the cfe-commits
mailing list