[all-commits] [llvm/llvm-project] a199fb: [clang-tidy] Only expand <inttypes.h> macros in mo...
Mike Crowe via All-commits
all-commits at lists.llvm.org
Tue Oct 8 13:04:20 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a199fb1229987d0885a4367e3a439db336069156
https://github.com/llvm/llvm-project/commit/a199fb1229987d0885a4367e3a439db336069156
Author: Mike Crowe <mac at mcrowe.com>
Date: 2024-10-08 (Tue, 08 Oct 2024)
Changed paths:
M clang-tools-extra/clang-tidy/modernize/UseStdFormatCheck.cpp
M clang-tools-extra/clang-tidy/modernize/UseStdFormatCheck.h
M clang-tools-extra/clang-tidy/modernize/UseStdPrintCheck.cpp
M clang-tools-extra/clang-tidy/modernize/UseStdPrintCheck.h
M clang-tools-extra/clang-tidy/utils/FormatStringConverter.cpp
M clang-tools-extra/clang-tidy/utils/FormatStringConverter.h
M clang-tools-extra/docs/ReleaseNotes.rst
M clang-tools-extra/docs/clang-tidy/checks/modernize/use-std-format.rst
M clang-tools-extra/docs/clang-tidy/checks/modernize/use-std-print.rst
M clang-tools-extra/test/clang-tidy/checkers/Inputs/Headers/inttypes.h
M clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-format.cpp
M clang-tools-extra/test/clang-tidy/checkers/modernize/use-std-print.cpp
Log Message:
-----------
[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.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list