[all-commits] [llvm/llvm-project] 54a8b2: [clang-tidy] Refactor `modernize-redundant-void-ar...
Victor Chernyakin via All-commits
all-commits at lists.llvm.org
Mon Feb 16 09:20:32 PST 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 54a8b206a9d5f35c9d6cf508e30e56289e000b0c
https://github.com/llvm/llvm-project/commit/54a8b206a9d5f35c9d6cf508e30e56289e000b0c
Author: Victor Chernyakin <chernyakin.victor.j at outlook.com>
Date: 2026-02-16 (Mon, 16 Feb 2026)
Changed paths:
M clang-tools-extra/clang-tidy/modernize/RedundantVoidArgCheck.cpp
M clang-tools-extra/clang-tidy/modernize/RedundantVoidArgCheck.h
M clang-tools-extra/test/clang-tidy/checkers/modernize/redundant-void-arg-delayed.cpp
M clang-tools-extra/test/clang-tidy/checkers/modernize/redundant-void-arg.cpp
Log Message:
-----------
[clang-tidy] Refactor `modernize-redundant-void-arg` (#173340)
Essentially, instead of having individual matchers for functions, and
for pointers to functions, and for casts to functions, and for typedefs
of functions, and (you get the point), this PR unifies them into one
`FunctionTypeLoc`-based matcher.
This refactor is not entirely NFC:
- First, it changes the diagnostic message. What used to be `redundant
void argument list in {function definition, lambda expression, etc.}` is
now just `redundant void argument list`. I don't think we're losing any
important information though.
- Second, it causes the check to fire in more places than it did before.
Specifically, it now removes the 2 `void`s in this test case:
https://github.com/llvm/llvm-project/blob/01effcd82dfbd3ce880a20c335334045191f217b/clang-tools-extra/test/clang-tidy/checkers/modernize/redundant-void-arg.cpp#L434-L442
Seeing as this check does want to remove `void` in macros, I believe
this is fixing an FN. And I don't believe I'm violating the intent of
the test case, because [the intent was just to ensure the check doesn't
crash when encountering it](https://reviews.llvm.org/D14204).
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