[PATCH] D116425: [clang-tidy] Improve modernize-redundant-void-arg to recognize macro uses
Richard via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 5 12:27:17 PST 2022
LegalizeAdulthood added inline comments.
================
Comment at: clang-tools-extra/test/clang-tidy/checkers/modernize-redundant-void-arg.cpp:561
+#define return_t(T) T
+return_t(void) func(void);
+// CHECK-MESSAGES: :[[@LINE-1]]:21: warning: redundant void argument list in function declaration
----------------
aaron.ballman wrote:
> Can you also add a test for:
> ```
> void func(return_t(void));
> ```
`:-)`
What are you suggesting the result should be? Honestly, looking at that, I'm not sure myself `:)`
IMO, if I saw this in a code review, I would flag it because you're using a macro called "return type" to specify the type of an argument.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116425/new/
https://reviews.llvm.org/D116425
More information about the cfe-commits
mailing list