llvm-project
54a8b206 - [clang-tidy] Refactor `modernize-redundant-void-arg` (#173340)

Commit
67 days ago
[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).
Author
Parents
Loading