Files
acceptance-tests
data
debian
docs
external
Newtonsoft.Json
api-doc-tools
api-snapshot
aspnetwebstack
bdwgc
binary-reference-assemblies
bockbuild
boringssl
cecil
cecil-legacy
corefx
corert
helix-binaries
ikdasm
ikvm
illinker-test-assets
linker
llvm-project
clang
clang-tools-extra
change-namespace
clang-apply-replacements
clang-move
clang-query
clang-reorder-fields
clang-tidy
clang-tidy-vs
clangd
docs
include-fixer
modularize
pp-trace
test
Unit
change-namespace
clang-apply-replacements
clang-move
clang-query
clang-reorder-fields
clang-tidy
Inputs
android-cloexec-accept.cpp
android-cloexec-accept4.cpp
android-cloexec-creat.cpp
android-cloexec-dup.cpp
android-cloexec-epoll-create.cpp
android-cloexec-epoll-create1.cpp
android-cloexec-fopen.cpp
android-cloexec-inotify-init.cpp
android-cloexec-inotify-init1.cpp
android-cloexec-memfd-create.cpp
android-cloexec-open.cpp
android-cloexec-socket.cpp
basic.cpp
boost-use-to-string.cpp
bugprone-argument-comment-gmock.cpp
bugprone-argument-comment-strict.cpp
bugprone-argument-comment.cpp
bugprone-assert-side-effect.cpp
bugprone-bool-pointer-implicit-conversion.cpp
bugprone-copy-constructor-init.cpp
bugprone-dangling-handle.cpp
bugprone-fold-init-type.cpp
bugprone-forward-declaration-namespace.cpp
bugprone-inaccurate-erase.cpp
bugprone-integer-division.cpp
bugprone-misplaced-operator-in-strlen-in-alloc.c
bugprone-misplaced-operator-in-strlen-in-alloc.cpp
bugprone-move-forwarding-reference.cpp
bugprone-multiple-statement-macro.cpp
bugprone-string-constructor.cpp
bugprone-suspicious-memset-usage.cpp
bugprone-undefined-memory-manipulation.cpp
bugprone-use-after-move.cpp
bugprone-virtual-near-miss.cpp
cert-dcl21-cpp.cpp
cert-dcl58-cpp.cpp
cert-env33-c.c
cert-err34-c.c
cert-err34-c.cpp
cert-flp30-c.c
cert-limited-randomness.c
cert-limited-randomness.cpp
cert-oop11-cpp.cpp
cert-setlongjmp.cpp
cert-static-object-exception.cpp
cert-throw-exception-type.cpp
cert-variadic-function-def.cpp
check_clang_tidy.py
clang-tidy-diff.cpp
clang-tidy-run-with-database.cpp
clean-up-code.cpp
config-files.cpp
cppcoreguidelines-interfaces-global-init.cpp
cppcoreguidelines-no-malloc-custom.cpp
cppcoreguidelines-no-malloc-no-functions.cpp
cppcoreguidelines-no-malloc.cpp
cppcoreguidelines-owning-memory-containers.cpp
cppcoreguidelines-owning-memory-legacy-functions.cpp
cppcoreguidelines-owning-memory.cpp
cppcoreguidelines-pro-bounds-array-to-pointer-decay.cpp
cppcoreguidelines-pro-bounds-constant-array-index-c++03.cpp
cppcoreguidelines-pro-bounds-constant-array-index-gslheader.cpp
cppcoreguidelines-pro-bounds-constant-array-index.cpp
cppcoreguidelines-pro-bounds-pointer-arithmetic.cpp
cppcoreguidelines-pro-type-const-cast.cpp
cppcoreguidelines-pro-type-cstyle-cast.cpp
cppcoreguidelines-pro-type-member-init-cxx98.cpp
cppcoreguidelines-pro-type-member-init-delayed.cpp
cppcoreguidelines-pro-type-member-init.cpp
cppcoreguidelines-pro-type-reinterpret-cast.cpp
cppcoreguidelines-pro-type-static-cast-downcast.cpp
cppcoreguidelines-pro-type-union-access.cpp
cppcoreguidelines-pro-type-vararg.cpp
cppcoreguidelines-slicing.cpp
cppcoreguidelines-special-member-functions-cxx-03.cpp
cppcoreguidelines-special-member-functions-relaxed.cpp
cppcoreguidelines-special-member-functions.cpp
custom-diagnostics.cpp
deduplication.cpp
diagnostic.cpp
explain-checks.cpp
extra-args.cpp
file-filter.cpp
fix-errors.cpp
fix.cpp
fuchsia-default-arguments.cpp
fuchsia-overloaded-operator.cpp
fuchsia-virtual-inheritance.cpp
google-build-explicit-make-pair.cpp
google-default-arguments.cpp
google-explicit-constructor.cpp
google-module.cpp
google-namespaces.cpp
google-objc-avoid-throwing-exception.m
google-objc-global-variable-declaration.m
google-overloaded-unary-and.cpp
google-readability-casting.c
google-readability-casting.cpp
google-readability-namespace-comments.cpp
google-readability-todo.cpp
google-runtime-int-std.cpp
google-runtime-int.c
google-runtime-int.cpp
google-runtime-member-string-references.cpp
google-runtime-references.cpp
hicpp-exception-baseclass.cpp
hicpp-no-assembler-msvc.cpp
hicpp-no-assembler.cpp
hicpp-signed-bitwise-bug34747.cpp
hicpp-signed-bitwise-standard-types.cpp
hicpp-signed-bitwise-standard-types.h
hicpp-signed-bitwise.cpp
line-filter.cpp
list-checks.cpp
llvm-include-order.cpp
llvm-twine-local.cpp
macros.cpp
misc-definitions-in-headers-1z.hpp
misc-definitions-in-headers.hpp
misc-forwarding-reference-overload.cpp
misc-incorrect-roundings.cpp
misc-lambda-function-name.cpp
misc-macro-parentheses-cmdline.cpp
misc-macro-parentheses.cpp
misc-macro-repeated-side-effects.c
misc-misplaced-const.c
misc-misplaced-const.cpp
misc-misplaced-widening-cast-explicit-only.cpp
misc-misplaced-widening-cast-implicit-enabled.cpp
misc-new-delete-overloads-sized-dealloc.cpp
misc-new-delete-overloads.cpp
misc-non-copyable-objects.c
misc-non-copyable-objects.cpp
misc-redundant-expression.cpp
misc-sizeof-container.cpp
misc-sizeof-expression.cpp
misc-static-assert.c
misc-static-assert.cpp
misc-string-compare.cpp
misc-string-integer-assignment.cpp
misc-string-literal-with-embedded-nul.cpp
misc-suspicious-enum-usage-strict.cpp
misc-suspicious-enum-usage.cpp
misc-suspicious-missing-comma.cpp
misc-suspicious-semicolon-fail.cpp
misc-suspicious-semicolon.cpp
misc-suspicious-string-compare.c
misc-suspicious-string-compare.cpp
misc-swapped-arguments.cpp
misc-throw-by-value-catch-by-reference.cpp
misc-unconventional-assign-operator.cpp
misc-undelegated-constructor-cxx98.cpp
misc-undelegated-constructor.cpp
misc-uniqueptr-reset-release.cpp
misc-unused-alias-decls.cpp
misc-unused-parameters.c
misc-unused-parameters.cpp
misc-unused-raii.cpp
misc-unused-using-decls-errors.cpp
misc-unused-using-decls.cpp
modernize-avoid-bind.cpp
modernize-deprecated-headers-cxx03.cpp
modernize-deprecated-headers-cxx11.cpp
modernize-loop-convert-assert-failure.cpp
modernize-loop-convert-basic.cpp
modernize-loop-convert-camelback.cpp
modernize-loop-convert-const.cpp
modernize-loop-convert-extra.cpp
modernize-loop-convert-lowercase.cpp
modernize-loop-convert-negative.cpp
modernize-loop-convert-uppercase.cpp
modernize-loop-convert.c
modernize-make-shared-header.cpp
modernize-make-shared.cpp
modernize-make-unique-header.cpp
modernize-make-unique-macros.cpp
modernize-make-unique.cpp
modernize-pass-by-value-header.cpp
modernize-pass-by-value-macro-header.cpp
modernize-pass-by-value-multi-fixes.cpp
modernize-pass-by-value.cpp
modernize-raw-string-literal-delimiter.cpp
modernize-raw-string-literal-replace-shorter.cpp
modernize-raw-string-literal.cpp
modernize-redundant-void-arg-delayed.cpp
modernize-redundant-void-arg.c
modernize-redundant-void-arg.cpp
modernize-replace-auto-ptr.cpp
modernize-replace-random-shuffle.cpp
modernize-return-braced-init-list.cpp
modernize-shrink-to-fit.cpp
modernize-unary-static-assert.cpp
modernize-use-auto-cast-remove-stars.cpp
modernize-use-auto-cast.cpp
modernize-use-auto-iterator.cpp
modernize-use-auto-new-remove-stars.cpp
modernize-use-auto-new.cpp
modernize-use-bool-literals-ignore-macros.cpp
modernize-use-bool-literals.cpp
modernize-use-default-member-init-assignment.cpp
modernize-use-default-member-init-macros.cpp
modernize-use-default-member-init.cpp
modernize-use-emplace-ignore-implicit-constructors.cpp
modernize-use-emplace.cpp
modernize-use-equals-default-copy.cpp
modernize-use-equals-default-delayed.cpp
modernize-use-equals-default-macros.cpp
modernize-use-equals-default.cpp
modernize-use-equals-delete.cpp
modernize-use-noexcept-macro.cpp
modernize-use-noexcept-opt.cpp
modernize-use-noexcept.cpp
modernize-use-nullptr-basic.cpp
modernize-use-nullptr.c
modernize-use-nullptr.cpp
modernize-use-override-cxx98.cpp
modernize-use-override-ms.cpp
modernize-use-override.cpp
modernize-use-transparent-functors.cpp
modernize-use-using-macros.cpp
modernize-use-using.cpp
mpi-buffer-deref.cpp
mpi-type-mismatch.cpp
nolint.cpp
nolintnextline.cpp
nonstandard-file-extension.test
objc-arc-and-properties.m
objc-avoid-nserror-init.m
objc-avoid-spinlock.m
objc-forbidden-subclassing-custom.m
objc-forbidden-subclassing.m
objc-no-arc-or-properties.m
objc-property-declaration-custom.m
objc-property-declaration.m
overlapping.cpp
performance-faster-string-find.cpp
performance-for-range-copy-warn-on-all-auto-copies.cpp
performance-for-range-copy.cpp
performance-implicit-conversion-in-loop.cpp
performance-inefficient-algorithm.cpp
performance-inefficient-string-concatenation.cpp
performance-inefficient-vector-operation.cpp
performance-move-const-arg-trivially-copyable.cpp
performance-move-const-arg.cpp
performance-move-constructor-init.cpp
performance-noexcept-move-constructor.cpp
performance-type-promotion-in-math-fn.cpp
performance-unnecessary-copy-initialization.cpp
performance-unnecessary-value-param-delayed.cpp
performance-unnecessary-value-param-header.cpp
performance-unnecessary-value-param-incomplete-type.cpp
performance-unnecessary-value-param.cpp
readability-avoid-const-params-in-decls.cpp
readability-braces-around-statements-assert-failure.cpp
readability-braces-around-statements-few-lines.cpp
readability-braces-around-statements-format.cpp
readability-braces-around-statements-same-line.cpp
readability-braces-around-statements-single-line.cpp
readability-braces-around-statements.cpp
readability-container-size-empty.cpp
readability-delete-null-pointer.cpp
readability-deleted-default.cpp
readability-else-after-return.cpp
readability-function-size.cpp
readability-identifier-naming.cpp
readability-implicit-bool-conversion-allow-in-conditions.cpp
readability-implicit-bool-conversion-cxx98.cpp
readability-implicit-bool-conversion.cpp
readability-inconsistent-declaration-parameter-name.cpp
readability-misleading-indentation.cpp
readability-misplaced-array-index.cpp
readability-named-parameter.cpp
readability-non-const-parameter.cpp
readability-redundant-control-flow.cpp
readability-redundant-declaration-ignore-macros.cpp
readability-redundant-declaration.cpp
readability-redundant-function-ptr-dereference.cpp
readability-redundant-member-init.cpp
readability-redundant-smartptr-get.cpp
readability-redundant-string-cstr-msvc.cpp
readability-redundant-string-cstr.cpp
readability-redundant-string-init-msvc.cpp
readability-redundant-string-init.cpp
readability-simplify-bool-expr-chained-conditional-assignment.cpp
readability-simplify-bool-expr-chained-conditional-return.cpp
readability-simplify-bool-expr.cpp
readability-static-accessed-through-instance-nesting-threshold.cpp
readability-static-accessed-through-instance.cpp
readability-static-definition-in-anonymous-namespace.cpp
readability-uniqueptr-delete-release.cpp
select-checks.cpp
serialize-diagnostics.cpp
static-analyzer-config.cpp
static-analyzer.cpp
temporaries.cpp
validate-check-names.cpp
werrors-diagnostics.cpp
werrors-plural.cpp
werrors.cpp
clangd
include-fixer
modularize
pp-trace
.clang-format
CMakeLists.txt
lit.cfg
lit.site.cfg.in
tool-template
unittests
.arcconfig
.gitignore
CMakeLists.txt
CODE_OWNERS.TXT
LICENSE.TXT
README.txt
compiler-rt
libcxx
libcxxabi
libunwind
lld
lldb
llvm
openmp
polly
nuget-buildtasks
nunit-lite
roslyn-binaries
rx
xunit-binaries
how-to-bump-roslyn-binaries.md
ikvm-native
llvm
m4
man
mcs
mk
mono
msvc
netcore
po
runtime
samples
scripts
support
tools
COPYING.LIB
LICENSE
Makefile.am
Makefile.in
NEWS
README.md
acinclude.m4
aclocal.m4
autogen.sh
code_of_conduct.md
compile
config.guess
config.h.in
config.rpath
config.sub
configure.REMOVED.git-id
configure.ac.REMOVED.git-id
depcomp
install-sh
ltmain.sh.REMOVED.git-id
missing
mkinstalldirs
mono-uninstalled.pc.in
test-driver
winconfig.h
linux-packaging-mono/external/llvm-project/clang-tools-extra/test/clang-tidy/readability-inconsistent-declaration-parameter-name.cpp
Xamarin Public Jenkins (auto-signing) 468663ddbb Imported Upstream version 6.10.0.49
Former-commit-id: 1d6753294b2993e1fbf92de9366bb9544db4189b
2020-01-16 16:38:04 +00:00

189 lines
10 KiB
C++

// RUN: %check_clang_tidy %s readability-inconsistent-declaration-parameter-name %t -- -- -std=c++11 -fno-delayed-template-parsing
void consistentFunction(int a, int b, int c);
void consistentFunction(int a, int b, int c);
void consistentFunction(int a, int b, int /*c*/);
void consistentFunction(int /*c*/, int /*c*/, int /*c*/);
//////////////////////////////////////////////////////
// CHECK-MESSAGES: :[[@LINE+1]]:6: warning: function 'inconsistentFunction' has 2 other declarations with different parameter names [readability-inconsistent-declaration-parameter-name]
void inconsistentFunction(int a, int b, int c);
// CHECK-MESSAGES: :[[@LINE+2]]:6: note: the 1st inconsistent declaration seen here
// CHECK-MESSAGES: :[[@LINE+1]]:6: note: differing parameters are named here: ('d', 'e', 'f'), in the other declaration: ('a', 'b', 'c')
void inconsistentFunction(int d, int e, int f);
// CHECK-MESSAGES: :[[@LINE+2]]:6: note: the 2nd inconsistent declaration seen here
// CHECK-MESSAGES: :[[@LINE+1]]:6: note: differing parameters are named here: ('x', 'y', 'z'), in the other declaration: ('a', 'b', 'c')
void inconsistentFunction(int x, int y, int z);
//////////////////////////////////////////////////////
// CHECK-MESSAGES: :[[@LINE+4]]:6: warning: function 'inconsistentFunctionWithVisibleDefinition' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name]
// CHECK-MESSAGES: :[[@LINE+9]]:6: note: the definition seen here
// CHECK-MESSAGES: :[[@LINE+2]]:6: note: differing parameters are named here: ('a'), in definition: ('c')
// CHECK-FIXES: void inconsistentFunctionWithVisibleDefinition(int c);
void inconsistentFunctionWithVisibleDefinition(int a);
// CHECK-MESSAGES: :[[@LINE+4]]:6: warning: function 'inconsistentFunctionWithVisibleDefinition' has a definition
// CHECK-MESSAGES: :[[@LINE+4]]:6: note: the definition seen here
// CHECK-MESSAGES: :[[@LINE+2]]:6: note: differing parameters are named here: ('b'), in definition: ('c')
// CHECK-FIXES: void inconsistentFunctionWithVisibleDefinition(int c);
void inconsistentFunctionWithVisibleDefinition(int b);
void inconsistentFunctionWithVisibleDefinition(int c) { c; }
// CHECK-MESSAGES: :[[@LINE+3]]:6: warning: function 'inconsidentFunctionWithUnreferencedParameterInDefinition' has a definition
// CHECK-MESSAGES: :[[@LINE+3]]:6: note: the definition seen here
// CHECK-MESSAGES: :[[@LINE+1]]:6: note: differing parameters are named here: ('a'), in definition: ('b')
void inconsidentFunctionWithUnreferencedParameterInDefinition(int a);
void inconsidentFunctionWithUnreferencedParameterInDefinition(int b) {}
//////////////////////////////////////////////////////
struct Struct {
// CHECK-MESSAGES: :[[@LINE+4]]:8: warning: function 'Struct::inconsistentFunction' has a definition
// CHECK-MESSAGES: :[[@LINE+6]]:14: note: the definition seen here
// CHECK-MESSAGES: :[[@LINE+2]]:8: note: differing parameters are named here: ('a'), in definition: ('b')
// CHECK-FIXES: void inconsistentFunction(int b);
void inconsistentFunction(int a);
};
void Struct::inconsistentFunction(int b) { b = 0; }
//////////////////////////////////////////////////////
struct SpecialFunctions {
// CHECK-MESSAGES: :[[@LINE+4]]:3: warning: function 'SpecialFunctions::SpecialFunctions' has a definition
// CHECK-MESSAGES: :[[@LINE+12]]:19: note: the definition seen here
// CHECK-MESSAGES: :[[@LINE+2]]:3: note: differing parameters are named here: ('a'), in definition: ('b')
// CHECK-FIXES: SpecialFunctions(int b);
SpecialFunctions(int a);
// CHECK-MESSAGES: :[[@LINE+4]]:21: warning: function 'SpecialFunctions::operator=' has a definition
// CHECK-MESSAGES: :[[@LINE+8]]:37: note: the definition seen here
// CHECK-MESSAGES: :[[@LINE+2]]:21: note: differing parameters are named here: ('a'), in definition: ('b')
// CHECK-FIXES: SpecialFunctions& operator=(const SpecialFunctions& b);
SpecialFunctions& operator=(const SpecialFunctions& a);
};
SpecialFunctions::SpecialFunctions(int b) { b; }
SpecialFunctions& SpecialFunctions::operator=(const SpecialFunctions& b) { b; return *this; }
//////////////////////////////////////////////////////
// CHECK-MESSAGES: :[[@LINE+5]]:6: warning: function 'templateFunctionWithSeparateDeclarationAndDefinition' has a definition
// CHECK-MESSAGES: :[[@LINE+7]]:6: note: the definition seen here
// CHECK-MESSAGES: :[[@LINE+3]]:6: note: differing parameters are named here: ('a'), in definition: ('b')
// CHECK-FIXES: void templateFunctionWithSeparateDeclarationAndDefinition(T b);
template<typename T>
void templateFunctionWithSeparateDeclarationAndDefinition(T a);
template<typename T>
void templateFunctionWithSeparateDeclarationAndDefinition(T b) { b; }
//////////////////////////////////////////////////////
template<typename T>
void templateFunctionWithSpecializations(T a) { a; }
template<>
// CHECK-MESSAGES: :[[@LINE+3]]:6: warning: function template specialization 'templateFunctionWithSpecializations<int>' has a primary template declaration with different parameter names [readability-inconsistent-declaration-parameter-name]
// CHECK-MESSAGES: :[[@LINE-4]]:6: note: the primary template declaration seen here
// CHECK-MESSAGES: :[[@LINE+1]]:6: note: differing parameters are named here: ('b'), in primary template declaration: ('a')
void templateFunctionWithSpecializations(int b) { b; }
template<>
// CHECK-MESSAGES: :[[@LINE+3]]:6: warning: function template specialization 'templateFunctionWithSpecializations<float>' has a primary template
// CHECK-MESSAGES: :[[@LINE-10]]:6: note: the primary template declaration seen here
// CHECK-MESSAGES: :[[@LINE+1]]:6: note: differing parameters are named here: ('c'), in primary template declaration: ('a')
void templateFunctionWithSpecializations(float c) { c; }
//////////////////////////////////////////////////////
template<typename T>
void templateFunctionWithoutDefinitionButWithSpecialization(T a);
template<>
// CHECK-MESSAGES: :[[@LINE+3]]:6: warning: function template specialization 'templateFunctionWithoutDefinitionButWithSpecialization<int>' has a primary template
// CHECK-MESSAGES: :[[@LINE-4]]:6: note: the primary template declaration seen here
// CHECK-MESSAGES: :[[@LINE+1]]:6: note: differing parameters are named here: ('b'), in primary template declaration: ('a')
void templateFunctionWithoutDefinitionButWithSpecialization(int b) { b; }
//////////////////////////////////////////////////////
template<typename T>
void templateFunctionWithSeparateSpecializationDeclarationAndDefinition(T a);
template<>
// CHECK-MESSAGES: :[[@LINE+3]]:6: warning: function template specialization 'templateFunctionWithSeparateSpecializationDeclarationAndDefinition<int>' has a primary template
// CHECK-MESSAGES: :[[@LINE-4]]:6: note: the primary template declaration seen here
// CHECK-MESSAGES: :[[@LINE+1]]:6: note: differing parameters are named here: ('b'), in primary template declaration: ('a')
void templateFunctionWithSeparateSpecializationDeclarationAndDefinition(int b);
template<>
// CHECK-MESSAGES: :[[@LINE+3]]:6: warning: function template specialization 'templateFunctionWithSeparateSpecializationDeclarationAndDefinition<int>' has a primary template
// CHECK-MESSAGES: :[[@LINE-10]]:6: note: the primary template declaration seen here
// CHECK-MESSAGES: :[[@LINE+1]]:6: note: differing parameters are named here: ('c'), in primary template declaration: ('a')
void templateFunctionWithSeparateSpecializationDeclarationAndDefinition(int c) { c; }
//////////////////////////////////////////////////////
template<typename T>
class ClassTemplate
{
public:
// CHECK-MESSAGES: :[[@LINE+4]]:10: warning: function 'ClassTemplate::functionInClassTemplateWithSeparateDeclarationAndDefinition' has a definition
// CHECK-MESSAGES: :[[@LINE+7]]:24: note: the definition seen here
// CHECK-MESSAGES: :[[@LINE+2]]:10: note: differing parameters are named here: ('a'), in definition: ('b')
// CHECK-FIXES: void functionInClassTemplateWithSeparateDeclarationAndDefinition(int b);
void functionInClassTemplateWithSeparateDeclarationAndDefinition(int a);
};
template<typename T>
void ClassTemplate<T>::functionInClassTemplateWithSeparateDeclarationAndDefinition(int b) { b; }
//////////////////////////////////////////////////////
class Class
{
public:
template<typename T>
// CHECK-MESSAGES: :[[@LINE+4]]:8: warning: function 'Class::memberFunctionTemplateWithSeparateDeclarationAndDefinition' has a definition
// CHECK-MESSAGES: :[[@LINE+12]]:13: note: the definition seen here
// CHECK-MESSAGES: :[[@LINE+2]]:8: note: differing parameters are named here: ('a'), in definition: ('b')
// CHECK-FIXES: void memberFunctionTemplateWithSeparateDeclarationAndDefinition(T b);
void memberFunctionTemplateWithSeparateDeclarationAndDefinition(T a);
template<typename T>
void memberFunctionTemplateWithSpecializations(T a) { a; }
};
//////////////////////////////////////////////////////
template<typename T>
void Class::memberFunctionTemplateWithSeparateDeclarationAndDefinition(T b) { b; }
//////////////////////////////////////////////////////
template<>
// CHECK-MESSAGES: :[[@LINE+3]]:13: warning: function template specialization 'Class::memberFunctionTemplateWithSpecializations<int>' has a primary template
// CHECK-MESSAGES: :[[@LINE-12]]:8: note: the primary template declaration seen here
// CHECK-MESSAGES: :[[@LINE+1]]:13: note: differing parameters are named here: ('b'), in primary template declaration: ('a')
void Class::memberFunctionTemplateWithSpecializations(int b) { b; }
template<>
// CHECK-MESSAGES: :[[@LINE+3]]:13: warning: function template specialization 'Class::memberFunctionTemplateWithSpecializations<float>' has a primary template
// CHECK-MESSAGES: :[[@LINE-18]]:8: note: the primary template declaration seen here
// CHECK-MESSAGES: :[[@LINE+1]]:13: note: differing parameters are named here: ('c'), in primary template declaration: ('a')
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);