[clang-tools-extra] [clang-tidy] Fix false-positive in inconsistent-declaration-parameter-name (PR #170593)

via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 4 00:22:45 PST 2025


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results

* 3052 tests passed
* 7 tests skipped
* 1 test failed

## Failed Tests
(click on a test name to see its output)

### Clang Tools
<details>
<summary>Clang Tools.clang-tidy/checkers/readability/inconsistent-declaration-parameter-name.cpp</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
/usr/bin/python3 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/readability/inconsistent-declaration-parameter-name.cpp readability-inconsistent-declaration-parameter-name /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp -- --fix-notes -- -fno-delayed-template-parsing
# executed command: /usr/bin/python3 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/readability/inconsistent-declaration-parameter-name.cpp readability-inconsistent-declaration-parameter-name /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp -- --fix-notes -- -fno-delayed-template-parsing
# .---command stdout------------
# | Running ['clang-tidy', '--experimental-custom-checks', '/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp', '-fix', '--checks=-*,readability-inconsistent-declaration-parameter-name', '--fix-notes', '--config={}', '--', '-fno-delayed-template-parsing', '-std=c++11', '-nostdinc++']...
# | ------------------------ clang-tidy output -----------------------
# | 27 warnings generated.
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:13:6: warning: function 'inconsistentFunction' has 2 other declarations with different parameter names [readability-inconsistent-declaration-parameter-name]
# |    13 | void inconsistentFunction(int a, int b, int c);
# |       |      ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:16:6: note: the 1st inconsistent declaration seen here
# |    16 | void inconsistentFunction(int d, int e, int f);
# |       |      ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:16:6: note: differing parameters are named here: ('d', 'e', 'f'), in the other declaration: ('a', 'b', 'c')
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:19:6: note: the 2nd inconsistent declaration seen here
# |    19 | void inconsistentFunction(int x, int y, int z);
# |       |      ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:19:6: note: differing parameters are named here: ('x', 'y', 'z'), in the other declaration: ('a', 'b', 'c')
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:27:6: warning: function 'inconsistentFunctionWithVisibleDefinition' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name]
# |    27 | void inconsistentFunctionWithVisibleDefinition(int a);
# |       |      ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:27:52: note: FIX-IT applied suggested code changes
# |    27 | void inconsistentFunctionWithVisibleDefinition(int a);
# |       |                                                    ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:33:6: note: the definition seen here
# |    33 | void inconsistentFunctionWithVisibleDefinition(int c) { c; }
# |       |      ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:27:6: note: differing parameters are named here: ('a'), in definition: ('c')
# |    27 | void inconsistentFunctionWithVisibleDefinition(int a);
# |       |      ^                                             ~
# |       |                                                    c
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:32:6: warning: function 'inconsistentFunctionWithVisibleDefinition' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name]
# |    32 | void inconsistentFunctionWithVisibleDefinition(int b);
# |       |      ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:32:52: note: FIX-IT applied suggested code changes
# |    32 | void inconsistentFunctionWithVisibleDefinition(int b);
# |       |                                                    ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:33:6: note: the definition seen here
# |    33 | void inconsistentFunctionWithVisibleDefinition(int c) { c; }
# |       |      ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:32:6: note: differing parameters are named here: ('b'), in definition: ('c')
# |    32 | void inconsistentFunctionWithVisibleDefinition(int b);
# |       |      ^                                             ~
# |       |                                                    c
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:38:6: warning: function 'inconsidentFunctionWithUnreferencedParameterInDefinition' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name]
# |    38 | void inconsidentFunctionWithUnreferencedParameterInDefinition(int a);
# |       |      ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:39:6: note: the definition seen here
# |    39 | void inconsidentFunctionWithUnreferencedParameterInDefinition(int b) {}
# |       |      ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:38:6: note: differing parameters are named here: ('a'), in definition: ('b')
# |    38 | void inconsidentFunctionWithUnreferencedParameterInDefinition(int a);
# |       |      ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:48:8: warning: function 'Struct::inconsistentFunction' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name]
# |    48 |   void inconsistentFunction(int a);
# |       |        ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:48:33: note: FIX-IT applied suggested code changes
# |    48 |   void inconsistentFunction(int a);
# |       |                                 ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:51:14: note: the definition seen here
# |    51 | void Struct::inconsistentFunction(int b) { b = 0; }
# |       |              ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:48:8: note: differing parameters are named here: ('a'), in definition: ('b')
# |    48 |   void inconsistentFunction(int a);
# |       |        ^                        ~
# |       |                                 b
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:60:3: warning: function 'SpecialFunctions::SpecialFunctions' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name]
# |    60 |   SpecialFunctions(int a);
# |       |   ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:60:24: note: FIX-IT applied suggested code changes
# |    60 |   SpecialFunctions(int a);
# |       |                        ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:69:19: note: the definition seen here
# |    69 | SpecialFunctions::SpecialFunctions(int b) { b; }
# |       |                   ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:60:3: note: differing parameters are named here: ('a'), in definition: ('b')
# |    60 |   SpecialFunctions(int a);
# |       |   ^                    ~
# |       |                        b
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:66:21: warning: function 'SpecialFunctions::operator=' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name]
# |    66 |   SpecialFunctions& operator=(const SpecialFunctions& a);
# |       |                     ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:66:55: note: FIX-IT applied suggested code changes
# |    66 |   SpecialFunctions& operator=(const SpecialFunctions& a);
# |       |                                                       ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:71:37: note: the definition seen here
# |    71 | SpecialFunctions& SpecialFunctions::operator=(const SpecialFunctions& b) { b; return *this; }
# |       |                                     ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:66:21: note: differing parameters are named here: ('a'), in definition: ('b')
# |    66 |   SpecialFunctions& operator=(const SpecialFunctions& a);
# |       |                     ^                                 ~
# |       |                                                       b
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:80:6: warning: function 'templateFunctionWithSeparateDeclarationAndDefinition' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name]
# |    80 | void templateFunctionWithSeparateDeclarationAndDefinition(T a);
# |       |      ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:80:61: note: FIX-IT applied suggested code changes
# |    80 | void templateFunctionWithSeparateDeclarationAndDefinition(T a);
# |       |                                                             ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:83:6: note: the definition seen here
# |    83 | void templateFunctionWithSeparateDeclarationAndDefinition(T b) { b; }
# |       |      ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:80:6: note: differing parameters are named here: ('a'), in definition: ('b')
# |    80 | void templateFunctionWithSeparateDeclarationAndDefinition(T a);
# |       |      ^                                                      ~
# |       |                                                             b
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:94:6: warning: function template specialization 'templateFunctionWithSpecializations<int>' has a primary template declaration with different parameter names [readability-inconsistent-declaration-parameter-name]
# |    94 | void templateFunctionWithSpecializations(int b) { b; }
# |       |      ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:88:6: note: the primary template declaration seen here
# |    88 | void templateFunctionWithSpecializations(T a) { a; }
# |       |      ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:94:6: note: differing parameters are named here: ('b'), in primary template declaration: ('a')
# |    94 | void templateFunctionWithSpecializations(int b) { b; }
# |       |      ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:100:6: warning: function template specialization 'templateFunctionWithSpecializations<float>' has a primary template declaration with different parameter names [readability-inconsistent-declaration-parameter-name]
# |   100 | void templateFunctionWithSpecializations(float c) { c; }
# |       |      ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:88:6: note: the primary template declaration seen here
# |    88 | void templateFunctionWithSpecializations(T a) { a; }
# |       |      ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:100:6: note: differing parameters are named here: ('c'), in primary template declaration: ('a')
# |   100 | void templateFunctionWithSpecializations(float c) { c; }
# |       |      ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:111:6: warning: function template specialization 'templateFunctionWithoutDefinitionButWithSpecialization<int>' has a primary template declaration with different parameter names [readability-inconsistent-declaration-parameter-name]
# |   111 | void templateFunctionWithoutDefinitionButWithSpecialization(int b) { b; }
# |       |      ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:105:6: note: the primary template declaration seen here
# |   105 | void templateFunctionWithoutDefinitionButWithSpecialization(T a);
# |       |      ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:111:6: note: differing parameters are named here: ('b'), in primary template declaration: ('a')
# |   111 | void templateFunctionWithoutDefinitionButWithSpecialization(int b) { b; }
# |       |      ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:122:6: warning: function template specialization 'templateFunctionWithSeparateSpecializationDeclarationAndDefinition<int>' has a primary template declaration with different parameter names [readability-inconsistent-declaration-parameter-name]
# |   122 | void templateFunctionWithSeparateSpecializationDeclarationAndDefinition(int b);
# |       |      ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:116:6: note: the primary template declaration seen here
# |   116 | void templateFunctionWithSeparateSpecializationDeclarationAndDefinition(T a);
# |       |      ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:122:6: note: differing parameters are named here: ('b'), in primary template declaration: ('a')
# |   122 | void templateFunctionWithSeparateSpecializationDeclarationAndDefinition(int b);
# |       |      ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:128:6: warning: function template specialization 'templateFunctionWithSeparateSpecializationDeclarationAndDefinition<int>' has a primary template declaration with different parameter names [readability-inconsistent-declaration-parameter-name]
# |   128 | void templateFunctionWithSeparateSpecializationDeclarationAndDefinition(int c) { c; }
# |       |      ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:116:6: note: the primary template declaration seen here
# |   116 | void templateFunctionWithSeparateSpecializationDeclarationAndDefinition(T a);
# |       |      ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:128:6: note: differing parameters are named here: ('c'), in primary template declaration: ('a')
# |   128 | void templateFunctionWithSeparateSpecializationDeclarationAndDefinition(int c) { c; }
# |       |      ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:140:10: warning: function 'ClassTemplate::functionInClassTemplateWithSeparateDeclarationAndDefinition' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name]
# |   140 |     void functionInClassTemplateWithSeparateDeclarationAndDefinition(int a);
# |       |          ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:140:74: note: FIX-IT applied suggested code changes
# |   140 |     void functionInClassTemplateWithSeparateDeclarationAndDefinition(int a);
# |       |                                                                          ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:144:24: note: the definition seen here
# |   144 | void ClassTemplate<T>::functionInClassTemplateWithSeparateDeclarationAndDefinition(int b) { b; }
# |       |                        ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:140:10: note: differing parameters are named here: ('a'), in definition: ('b')
# |   140 |     void functionInClassTemplateWithSeparateDeclarationAndDefinition(int a);
# |       |          ^                                                               ~
# |       |                                                                          b
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:156:8: warning: function 'Class::memberFunctionTemplateWithSeparateDeclarationAndDefinition' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name]
# |   156 |   void memberFunctionTemplateWithSeparateDeclarationAndDefinition(T a);
# |       |        ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:156:69: note: FIX-IT applied suggested code changes
# |   156 |   void memberFunctionTemplateWithSeparateDeclarationAndDefinition(T a);
# |       |                                                                     ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:165:13: note: the definition seen here
# |   165 | void Class::memberFunctionTemplateWithSeparateDeclarationAndDefinition(T b) { b; }
# |       |             ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:156:8: note: differing parameters are named here: ('a'), in definition: ('b')
# |   156 |   void memberFunctionTemplateWithSeparateDeclarationAndDefinition(T a);
# |       |        ^                                                            ~
# |       |                                                                     b
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:173:13: warning: function template specialization 'Class::memberFunctionTemplateWithSpecializations<int>' has a primary template declaration with different parameter names [readability-inconsistent-declaration-parameter-name]
# |   173 | void Class::memberFunctionTemplateWithSpecializations(int b) { b; }
# |       |             ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:159:8: note: the primary template declaration seen here
# |   159 |   void memberFunctionTemplateWithSpecializations(T a) { a; }
# |       |        ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:173:13: note: differing parameters are named here: ('b'), in primary template declaration: ('a')
# |   173 | void Class::memberFunctionTemplateWithSpecializations(int b) { b; }
# |       |             ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:179:13: warning: function template specialization 'Class::memberFunctionTemplateWithSpecializations<float>' has a primary template declaration with different parameter names [readability-inconsistent-declaration-parameter-name]
# |   179 | void Class::memberFunctionTemplateWithSpecializations(float c) { c; }
# |       |             ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:159:8: note: the primary template declaration seen here
# |   159 |   void memberFunctionTemplateWithSpecializations(T a) { a; }
# |       |        ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:179:13: note: differing parameters are named here: ('c'), in primary template declaration: ('a')
# |   179 | void Class::memberFunctionTemplateWithSpecializations(float c) { c; }
# |       |             ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:216:6: warning: function template specialization 'variadicFunction2WithWarning<float>' has a primary template declaration with different parameter names [readability-inconsistent-declaration-parameter-name]
# |   216 | void variadicFunction2WithWarning(int wrong, float a) {}
# |       |      ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:207:6: note: the primary template declaration seen here
# |   207 | void variadicFunction2WithWarning(int fixed, Args... args);
# |       |      ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:216:6: note: differing parameters are named here: ('wrong'), in primary template declaration: ('fixed')
# | clang-tidy applied 8 of 8 suggested fixes.
# |   216 | void variadicFunction2WithWarning(int wrong, float a) {}
# |       |      ^
# | Suppressed 9 warnings (9 with check filters).
# | 
# | ------------------------------------------------------------------
# | diff -u /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.orig /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp failed:
# | --- /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.orig	2025-12-04 08:18:17.724362121 +0000
# | +++ /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp	2025-12-04 08:18:17.737362271 +0000
# | @@ -24,12 +24,12 @@
# |  //
# |  //
# |  //
# | -void inconsistentFunctionWithVisibleDefinition(int a);
# | +void inconsistentFunctionWithVisibleDefinition(int c);
# |  //
# |  //
# |  //
# |  //
# | -void inconsistentFunctionWithVisibleDefinition(int b);
# | +void inconsistentFunctionWithVisibleDefinition(int c);
# |  void inconsistentFunctionWithVisibleDefinition(int c) { c; }
# |  
# |  //
# | @@ -45,7 +45,7 @@
# |  //
# |  //
# |  //
# | -  void inconsistentFunction(int a);
# | +  void inconsistentFunction(int b);
# |  };
# |  
# |  void Struct::inconsistentFunction(int b) { b = 0; }
# | @@ -57,13 +57,13 @@
# |  //
# |  //
# |  //
# | -  SpecialFunctions(int a);
# | +  SpecialFunctions(int b);
# |  
# |  //
# |  //
# |  //
# |  //
# | -  SpecialFunctions& operator=(const SpecialFunctions& a);
# | +  SpecialFunctions& operator=(const SpecialFunctions& b);
# |  };
# |  
# |  SpecialFunctions::SpecialFunctions(int b) { b; }
# | @@ -77,7 +77,7 @@
# |  //
# |  //
# |  template<typename T>
# | -void templateFunctionWithSeparateDeclarationAndDefinition(T a);
# | +void templateFunctionWithSeparateDeclarationAndDefinition(T b);
# |  
# |  template<typename T>
# |  void templateFunctionWithSeparateDeclarationAndDefinition(T b) { b; }
# | @@ -137,7 +137,7 @@
# |  //
# |  //
# |  //
# | -    void functionInClassTemplateWithSeparateDeclarationAndDefinition(int a);
# | +    void functionInClassTemplateWithSeparateDeclarationAndDefinition(int b);
# |  };
# |  
# |  template<typename T>
# | @@ -153,7 +153,7 @@
# |  //
# |  //
# |  //
# | -  void memberFunctionTemplateWithSeparateDeclarationAndDefinition(T a);
# | +  void memberFunctionTemplateWithSeparateDeclarationAndDefinition(T b);
# |  
# |    template<typename T>
# |    void memberFunctionTemplateWithSpecializations(T a) { a; }
# | 
# | ------------------------------ Fixes -----------------------------
# | --- /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.orig	2025-12-04 08:18:17.724362121 +0000
# | +++ /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp	2025-12-04 08:18:17.737362271 +0000
# | @@ -24,12 +24,12 @@
# |  //
# |  //
# |  //
# | -void inconsistentFunctionWithVisibleDefinition(int a);
# | +void inconsistentFunctionWithVisibleDefinition(int c);
# |  //
# |  //
# |  //
# |  //
# | -void inconsistentFunctionWithVisibleDefinition(int b);
# | +void inconsistentFunctionWithVisibleDefinition(int c);
# |  void inconsistentFunctionWithVisibleDefinition(int c) { c; }
# |  
# |  //
# | @@ -45,7 +45,7 @@
# |  //
# |  //
# |  //
# | -  void inconsistentFunction(int a);
# | +  void inconsistentFunction(int b);
# |  };
# |  
# |  void Struct::inconsistentFunction(int b) { b = 0; }
# | @@ -57,13 +57,13 @@
# |  //
# |  //
# |  //
# | -  SpecialFunctions(int a);
# | +  SpecialFunctions(int b);
# |  
# |  //
# |  //
# |  //
# |  //
# | -  SpecialFunctions& operator=(const SpecialFunctions& a);
# | +  SpecialFunctions& operator=(const SpecialFunctions& b);
# |  };
# |  
# |  SpecialFunctions::SpecialFunctions(int b) { b; }
# | @@ -77,7 +77,7 @@
# |  //
# |  //
# |  template<typename T>
# | -void templateFunctionWithSeparateDeclarationAndDefinition(T a);
# | +void templateFunctionWithSeparateDeclarationAndDefinition(T b);
# |  
# |  template<typename T>
# |  void templateFunctionWithSeparateDeclarationAndDefinition(T b) { b; }
# | @@ -137,7 +137,7 @@
# |  //
# |  //
# |  //
# | -    void functionInClassTemplateWithSeparateDeclarationAndDefinition(int a);
# | +    void functionInClassTemplateWithSeparateDeclarationAndDefinition(int b);
# |  };
# |  
# |  template<typename T>
# | @@ -153,7 +153,7 @@
# |  //
# |  //
# |  //
# | -  void memberFunctionTemplateWithSeparateDeclarationAndDefinition(T a);
# | +  void memberFunctionTemplateWithSeparateDeclarationAndDefinition(T b);
# |  
# |    template<typename T>
# |    void memberFunctionTemplateWithSpecializations(T a) { a; }
# | 
# | ------------------------------------------------------------------
# | FileCheck -input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp.msg /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/readability/inconsistent-declaration-parameter-name.cpp -check-prefixes=CHECK-MESSAGES -implicit-check-not={{warning|error}}: failed:
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/readability/inconsistent-declaration-parameter-name.cpp:214:20: error: CHECK-MESSAGES: expected string not found in input
# | // CHECK-MESSAGES: :[[@LINE-9]]:6: note: the primary template declaration seen here
# |                    ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp.msg:189:293: note: scanning from here
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:216:6: warning: function template specialization 'variadicFunction2WithWarning<float>' has a primary template declaration with different parameter names [readability-inconsistent-declaration-parameter-name]
# |                                                                                                                                                                                                                                                                                                     ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp.msg:189:293: note: with "@LINE-9" equal to "205"
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:216:6: warning: function template specialization 'variadicFunction2WithWarning<float>' has a primary template declaration with different parameter names [readability-inconsistent-declaration-parameter-name]
# |                                                                                                                                                                                                                                                                                                     ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp.msg:192:186: note: possible intended match here
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:207:6: note: the primary template declaration seen here
# |                                                                                                                                                                                          ^
# | 
# | Input file: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp.msg
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/readability/inconsistent-declaration-parameter-name.cpp
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |              .
# |              .
# |              .
# |            184:  159 | void memberFunctionTemplateWithSpecializations(T a) { a; } 
# |            185:  | ^ 
# |            186: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:179:13: note: differing parameters are named here: ('c'), in primary template declaration: ('a') 
# |            187:  179 | void Class::memberFunctionTemplateWithSpecializations(float c) { c; } 
# |            188:  | ^ 
# |            189: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:216:6: warning: function template specialization 'variadicFunction2WithWarning<float>' has a primary template declaration with different parameter names [readability-inconsistent-declaration-parameter-name] 
# | check:214'0                                                                                                                                                                                                                                                                                                         X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# | check:214'1                                                                                                                                                                                                                                                                                                                                                                                                            with "@LINE-9" equal to "205"
# |            190:  216 | void variadicFunction2WithWarning(int wrong, float a) {} 
# | check:214'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            191:  | ^ 
# | check:214'0     ~~~~~
# |            192: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:207:6: note: the primary template declaration seen here 
# | check:214'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:214'2                                                                                                                                                                                              ?                                                      possible intended match
# |            193:  207 | void variadicFunction2WithWarning(int fixed, Args... args); 
# | check:214'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            194:  | ^ 
# | check:214'0     ~~~~~
# |            195: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp:216:6: note: differing parameters are named here: ('wrong'), in primary template declaration: ('fixed') 
# | check:214'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            196: clang-tidy applied 8 of 8 suggested fixes. 
# | check:214'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            197:  216 | void variadicFunction2WithWarning(int wrong, float a) {} 
# | check:214'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |              .
# |              .
# |              .
# | >>>>>>
# | 
# `-----------------------------
# .---command stderr------------
# | Traceback (most recent call last):
# |   File "/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py", line 413, in <module>
# |     main()
# |   File "/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py", line 409, in main
# |     CheckRunner(args, extra_args).run()
# |   File "/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py", line 312, in run
# |     self.check_messages(clang_tidy_output)
# |   File "/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py", line 273, in check_messages
# |     try_run(
# |   File "/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/../test/clang-tidy/check_clang_tidy.py", line 63, in try_run
# |     process_output = subprocess.check_output(args, stderr=subprocess.STDOUT).decode(
# |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# |   File "/usr/lib/python3.12/subprocess.py", line 466, in check_output
# |     return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
# |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# |   File "/usr/lib/python3.12/subprocess.py", line 571, in run
# |     raise CalledProcessError(retcode, process.args,
# | subprocess.CalledProcessError: Command '['FileCheck', '-input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/checkers/readability/Output/inconsistent-declaration-parameter-name.cpp.tmp.cpp.msg', '/home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/checkers/readability/inconsistent-declaration-parameter-name.cpp', '-check-prefixes=CHECK-MESSAGES', '-implicit-check-not={{warning|error}}:']' returned non-zero exit status 1.
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.

https://github.com/llvm/llvm-project/pull/170593


More information about the cfe-commits mailing list