summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-tidy/modernize-redundant-void-arg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/modernize-redundant-void-arg.cpp')
-rw-r--r--clang-tools-extra/test/clang-tidy/modernize-redundant-void-arg.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/clang-tools-extra/test/clang-tidy/modernize-redundant-void-arg.cpp b/clang-tools-extra/test/clang-tidy/modernize-redundant-void-arg.cpp
index dd758bc10a2..b0bdeae78bb 100644
--- a/clang-tools-extra/test/clang-tidy/modernize-redundant-void-arg.cpp
+++ b/clang-tools-extra/test/clang-tidy/modernize-redundant-void-arg.cpp
@@ -417,3 +417,19 @@ void test_lambda_functions() {
// CHECK-MESSAGES: [[@LINE-2]]:45: warning: {{.*}} in lambda expression
// CHECK-FIXES: {{^ }}auto void_returner = []() -> void (*)() { return f1; };{{$}}
}
+
+#define M(x) x
+
+M(void inmacro(void) {})
+// CHECK-MESSAGES: :[[@LINE-1]]:16: warning: {{.*}} in function definition
+// CHECK-FIXES: M(void inmacro() {})
+
+#define F(A, B) \
+ struct F_##A##_##B { \
+ F_##A##_##B(void); \
+ }; \
+ F_##A##_##B::F_##A##_##B(void)
+
+F(Foo, Bar) {
+
+}
OpenPOWER on IntegriCloud