-
Notifications
You must be signed in to change notification settings - Fork 12.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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] fmtlib/fmt#3515 (comment) Reviewed By: PiotrZSL Differential Revision: https://reviews.llvm.org/D154283
- Loading branch information
Showing
3 changed files
with
72 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters