[clang-tidy] Fix width/precision argument order in modernize-use-std-print
Victor Zverovich pointed out[1] that printf takes the field width and precision arguments before the value to be printed whereas std::print takes the value first (unless positional arguments are used.) Many of the test cases in use-std-print.cpp were incorrect. Teach the check to rotate the arguments when required to correct this. Correct the test cases and add more. [1] https://github.com/fmtlib/fmt/pull/3515#issuecomment-1615259893 Reviewed By: PiotrZSL Differential Revision: https://reviews.llvm.org/D154283
parent
a2ff2921
Please register or sign in to comment