[clang-tools-extra] [clang-tidy] Only expand <inttypes.h> macros in modernize-use-std-format/print (PR #97911)
Julian Schmidt via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 17 09:53:47 PDT 2024
================
@@ -24,8 +24,15 @@ into:
std::println(stderr, "The {} is {:3}", description, value);
If the `ReplacementPrintFunction` or `ReplacementPrintlnFunction` options
-are left, or assigned to their default values then this check is only
-enabled with `-std=c++23` or later.
+are left at or set to their default values then this check is only enabled
+with `-std=c++23` or later.
+
+Macros starting with ``PRI`` and ``__PRI`` from `<inttypes.h>` are
+expanded, escaping is handled and adjacent strings are concatenated to form
+a single ``StringLiteral`` before the format string is converted. Use of
+any other macros in the format string will cause a warning message to be
+emitted and no conversion will be performed. The resultant converted format
----------------
5chmidti wrote:
I'd remove the `resultant` or replace it by `The resulting format string` or `The converted format string`.
https://github.com/llvm/llvm-project/pull/97911
More information about the cfe-commits
mailing list