Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2 |
|
#
a199fb12 |
| 08-Oct-2024 |
Mike Crowe <mac@mcrowe.com> |
[clang-tidy] Only expand <inttypes.h> macros in modernize-use-std-format/print (#97911)
Expanding all macros in the printf/absl::StrFormat format string before
conversion could easily break code if
[clang-tidy] Only expand <inttypes.h> macros in modernize-use-std-format/print (#97911)
Expanding all macros in the printf/absl::StrFormat format string before
conversion could easily break code if those macros are expanded change
their definition between builds. It's important for this check to expand
the <inttypes.h> PRI macros though, so let's ensure that the presence of
any other macros in the format string causes the check to emit a warning
and not perform any conversion.
show more ...
|
Revision tags: llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3 |
|
#
bbcb6257 |
| 18-Aug-2024 |
Mike Crowe <mac@mcrowe.com> |
[clang-tidy] Support member functions with modernize-use-std-print/format (#104675)
These checks can be made to work on member functions quite easily and
it's not unknown to have at least printf-st
[clang-tidy] Support member functions with modernize-use-std-print/format (#104675)
These checks can be made to work on member functions quite easily and
it's not unknown to have at least printf-style functions as members.
Let's remove the restriction.
show more ...
|
Revision tags: llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init |
|
#
666d2242 |
| 17-Jul-2024 |
Mike Crowe <mac@mcrowe.com> |
[clang-tidy] Fix modernize-use-std-print/format for fmt (#99021)
When fixing #92896 in 0e62d5cf55479981da5e05e406bbca4afb3cdc4f (#94104)
I failed to spot that I'd broken converting from fmt::printf
[clang-tidy] Fix modernize-use-std-print/format for fmt (#99021)
When fixing #92896 in 0e62d5cf55479981da5e05e406bbca4afb3cdc4f (#94104)
I failed to spot that I'd broken converting from fmt::printf,
fmt::fprintf and fmt::sprintf in these checks since the format parameter
of those functions is not a simple character pointer.
The first part of the previous fix to avoid the assert and instead
produce an error message was sufficient. It was only the second part
that required the format parameter of the called function to be a simple
character pointer that was problematic. Let's remove that second part
and add the now-expected error messages to the lit tests along with
fixing the prototype for the fmt functions to more accurately reflect
the ones used by the fmt library so they are actually useful.
Fixes #92896
show more ...
|
Revision tags: llvmorg-18.1.8, llvmorg-18.1.7 |
|
#
0e62d5cf |
| 03-Jun-2024 |
Mike Crowe <mac@mcrowe.com> |
[clang-tidy] Fix assert in modernize-use-std-format/print (#94104)
Ensure that FormatStringConverter's constructor fails with a sensible
error message rather than asserting if the format string is
[clang-tidy] Fix assert in modernize-use-std-format/print (#94104)
Ensure that FormatStringConverter's constructor fails with a sensible
error message rather than asserting if the format string is not a narrow
string literal.
Also, ensure that we don't even get that far in modernize-use-std-print
and modernize-use-std-format by checking that the format string
parameter is a char pointer.
Fixes #92896
show more ...
|
Revision tags: llvmorg-18.1.6 |
|
#
af79372d |
| 13-May-2024 |
Mike Crowe <mac@mcrowe.com> |
[clang-tidy] Add modernize-use-std-format check (#90397)
Add a new clang-tidy check that converts absl::StrFormat (and similar
functions) to std::format (and similar functions.)
Split the config
[clang-tidy] Add modernize-use-std-format check (#90397)
Add a new clang-tidy check that converts absl::StrFormat (and similar
functions) to std::format (and similar functions.)
Split the configuration of FormatStringConverter out to a separate
Configuration class so that we don't risk confusion by passing two
boolean configuration parameters into the constructor. Add
AllowTrailingNewlineRemoval option since we never want to remove
trailing newlines in this check.
show more ...
|