[clang-tidy] Fix modernize-use-nullptr crash on 32-bit Windows (#160023)

Fixes #53778.
This commit is contained in:
Victor Chernyakin 2025-09-27 23:25:51 -07:00 committed by GitHub
parent 5a13c857f9
commit f9e7f95b3d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View File

@ -53,7 +53,7 @@ StatementMatcher makeCastSequenceMatcher(llvm::ArrayRef<StringRef> NameList) {
unless(hasImplicitDestinationType(
qualType(matchers::matchesAnyListedTypeName(NameList)))));
auto IsOrHasDescendant = [](auto InnerMatcher) {
auto IsOrHasDescendant = [](const auto &InnerMatcher) {
return anyOf(InnerMatcher, hasDescendant(InnerMatcher));
};

View File

@ -329,6 +329,11 @@ Changes in existing checks
<clang-tidy/checks/modernize/use-designated-initializers>` check to
suggest using designated initializers for aliased aggregate types.
- Improved :doc:`modernize-use-nullptr
<clang-tidy/checks/modernize/use-nullptr>` check by fixing a crash
on Windows when the check was enabled with a 32-bit :program:`clang-tidy`
binary.
- Improved :doc:`modernize-use-std-format
<clang-tidy/checks/modernize/use-std-format>` check to correctly match
when the format string is converted to a different type by an implicit