summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-tidy/readability-inconsistent-declaration-parameter-name.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/readability-inconsistent-declaration-parameter-name.cpp')
-rw-r--r--clang-tools-extra/test/clang-tidy/readability-inconsistent-declaration-parameter-name.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/clang-tools-extra/test/clang-tidy/readability-inconsistent-declaration-parameter-name.cpp b/clang-tools-extra/test/clang-tidy/readability-inconsistent-declaration-parameter-name.cpp
index d2c2d7d7054..43412f528fe 100644
--- a/clang-tools-extra/test/clang-tidy/readability-inconsistent-declaration-parameter-name.cpp
+++ b/clang-tools-extra/test/clang-tidy/readability-inconsistent-declaration-parameter-name.cpp
@@ -178,11 +178,14 @@ void Class::memberFunctionTemplateWithSpecializations(float c) { c; }
//////////////////////////////////////////////////////
-#define DECLARE_FUNCTION_WITH_PARAM_NAME(function_name, param_name) \
- void function_name(int param_name)
-
-// CHECK-MESSAGES: :[[@LINE+1]]:34: warning: function 'macroFunction' has 1 other declaration with different parameter names [readability-inconsistent-declaration-parameter-name]
-DECLARE_FUNCTION_WITH_PARAM_NAME(macroFunction, a);
-// CHECK-MESSAGES: :[[@LINE+2]]:34: note: the 1st inconsistent declaration seen here
-// CHECK-MESSAGES: :[[@LINE+1]]:34: note: differing parameters are named here: ('b'), in the other declaration: ('a')
-DECLARE_FUNCTION_WITH_PARAM_NAME(macroFunction, b);
+// This resulted in a warning by default.
+#define MACRO() \
+ void f(int x);
+
+struct S {
+ MACRO();
+};
+
+void S::f(int y)
+{
+}
OpenPOWER on IntegriCloud