aboutsummaryrefslogtreecommitdiff
path: root/clang-tools-extra/docs/clang-tidy/checks/modernize/use-std-print.rst
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/docs/clang-tidy/checks/modernize/use-std-print.rst')
-rw-r--r--clang-tools-extra/docs/clang-tidy/checks/modernize/use-std-print.rst40
1 files changed, 22 insertions, 18 deletions
diff --git a/clang-tools-extra/docs/clang-tidy/checks/modernize/use-std-print.rst b/clang-tools-extra/docs/clang-tidy/checks/modernize/use-std-print.rst
index 0cf51e3..4641975 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/modernize/use-std-print.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/modernize/use-std-print.rst
@@ -7,9 +7,11 @@ Converts calls to ``printf``, ``fprintf``, ``absl::PrintF`` and
``absl::FPrintf`` to equivalent calls to C++23's ``std::print`` or
``std::println`` as appropriate, modifying the format string appropriately.
The replaced and replacement functions can be customised by configuration
-options. Each argument that is the result of a call to ``std::string::c_str()`` and
-``std::string::data()`` will have that now-unnecessary call removed in a
-similar manner to the `readability-redundant-string-cstr` check.
+options. Each argument that is the result of a call to
+``std::string::c_str()`` and ``std::string::data()`` will have that
+now-unnecessary call removed in a similar manner to the
+:doc:`readability-redundant-string-cstr
+<../readability/redundant-string-cstr>` check.
In other words, it turns lines like:
@@ -122,25 +124,27 @@ Options
.. option:: PrintfLikeFunctions
- A semicolon-separated list of (fully qualified) function names to
- replace, with the requirement that the first parameter contains the
- printf-style format string and the arguments to be formatted follow
- immediately afterwards. Qualified member function names are supported,
- but the replacement function name must be unqualified. If neither this
- option nor `FprintfLikeFunctions` are set then the default value for
- this option is `printf; absl::PrintF`, otherwise it is empty.
+ A semicolon-separated list of regular expressions matching the
+ (fully qualified) names of functions to replace, with the requirement
+ that the first parameter contains the printf-style format string and the
+ arguments to be formatted follow immediately afterwards. Qualified member
+ function names are supported, but the replacement function name must be
+ unqualified. If neither this option nor `FprintfLikeFunctions` are set then
+ the default value is `printf; absl::PrintF`, otherwise it is the empty
+ string.
.. option:: FprintfLikeFunctions
- A semicolon-separated list of (fully qualified) function names to
- replace, with the requirement that the first parameter is retained, the
- second parameter contains the printf-style format string and the
- arguments to be formatted follow immediately afterwards. Qualified
- member function names are supported, but the replacement function name
- must be unqualified. If neither this option nor `PrintfLikeFunctions`
- are set then the default value for this option is `fprintf;
- absl::FPrintF`, otherwise it is empty.
+ A semicolon-separated list of regular expressions matching the
+ (fully qualified) names of functions to replace, with the requirement
+ that the first parameter is retained, the second parameter contains the
+ printf-style format string and the arguments to be formatted follow
+ immediately afterwards. Qualified member function names are supported,
+ but the replacement function name must be unqualified. If neither this
+ option nor `PrintfLikeFunctions` are set then the default value is
+ `fprintf;absl::FPrintF`, otherwise it is the empty string.
+
.. option:: ReplacementPrintFunction