[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 Jun 26 09:41:04 PDT 2023
mikecrowe added inline comments.
================
Comment at: clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-print.cpp:169
+ // CHECK-MESSAGES: [[@LINE-1]]:3: warning: use 'std::println' instead of 'printf' [modernize-use-std-print]
+ // CHECK-FIXES: std::println("Integer {:d} from char", c);
+
----------------
This should have a cast to `signed char` if `StrictMode=true`. That cast is currently there by accident on targets where `char` is unsigned, but not on targets where `char` is signed. This is a real problem, but luckily one that's easy to fix.
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