[clang-tools-extra] readability-identifier-naming should add universal default options (PR #171686)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 11 11:52:05 PST 2025
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results
* 2987 tests passed
* 30 tests skipped
* 2 tests failed
## Failed Tests
(click on a test name to see its output)
### Clang Tools
<details>
<summary>Clang Tools.clang-tidy/checkers/readability/identifier-naming-default-lower.cpp</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
C:/Python39/python.exe C:/_work/llvm-project/llvm-project/clang-tools-extra/test/../test\clang-tidy\check_clang_tidy.py C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\checkers\readability\identifier-naming-default-lower.cpp readability-identifier-naming C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-lower.cpp.tmp -- -config='{CheckOptions: { readability-identifier-naming.DefaultCase: "lower_case", }}'
# executed command: C:/Python39/python.exe 'C:/_work/llvm-project/llvm-project/clang-tools-extra/test/../test\clang-tidy\check_clang_tidy.py' 'C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\checkers\readability\identifier-naming-default-lower.cpp' readability-identifier-naming 'C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-lower.cpp.tmp' -- '-config={CheckOptions: { readability-identifier-naming.DefaultCase: "lower_case", }}'
# .---command stdout------------
# | Running ['clang-tidy', '--experimental-custom-checks', 'C:\\_work\\llvm-project\\llvm-project\\build\\tools\\clang\\tools\\extra\\test\\clang-tidy\\checkers\\readability\\Output\\identifier-naming-default-lower.cpp.tmp.cpp', '-fix', '--checks=-*,readability-identifier-naming', '-config={CheckOptions: { readability-identifier-naming.DefaultCase: "lower_case", }}', '--', '-std=c++11', '-nostdinc++']...
# | ------------------------ clang-tidy output -----------------------
# | 9 warnings generated.
# |
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-lower.cpp.tmp.cpp:7:9: warning: invalid case style for default 'MyMacro' [readability-identifier-naming]
# | 7 | #define MyMacro
# | | ^~~~~~~
# | | my_macro
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-lower.cpp.tmp.cpp:7:9: note: FIX-IT applied suggested code changes
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-lower.cpp.tmp.cpp:11:11: warning: invalid case style for default 'MyNamespace' [readability-identifier-naming]
# | 11 | namespace MyNamespace {
# | | ^~~~~~~~~~~
# | | my_namespace
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-lower.cpp.tmp.cpp:11:11: note: FIX-IT applied suggested code changes
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-lower.cpp.tmp.cpp:15:7: warning: invalid case style for default 'MyAlias' [readability-identifier-naming]
# | 15 | using MyAlias = int;
# | | ^~~~~~~
# | | my_alias
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-lower.cpp.tmp.cpp:15:7: note: FIX-IT applied suggested code changes
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-lower.cpp.tmp.cpp:19:5: warning: invalid case style for default 'MyGlobal' [readability-identifier-naming]
# | 19 | int MyGlobal;
# | | ^~~~~~~~
# | | my_global
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-lower.cpp.tmp.cpp:19:5: note: FIX-IT applied suggested code changes
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-lower.cpp.tmp.cpp:23:8: warning: invalid case style for default 'MyStruct' [readability-identifier-naming]
# | 23 | struct MyStruct {
# | | ^~~~~~~~
# | | my_struct
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-lower.cpp.tmp.cpp:23:8: note: FIX-IT applied suggested code changes
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-lower.cpp.tmp.cpp:26:7: warning: invalid case style for default 'MyField' [readability-identifier-naming]
# | 26 | int MyField;
# | | ^~~~~~~
# | | my_field
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-lower.cpp.tmp.cpp:26:7: note: FIX-IT applied suggested code changes
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-lower.cpp.tmp.cpp:31:20: warning: invalid case style for default 'MyTypename' [readability-identifier-naming]
# | 31 | template <typename MyTypename>
# | | ^~~~~~~~~~
# | | my_typename
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-lower.cpp.tmp.cpp:31:20: note: FIX-IT applied suggested code changes
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-lower.cpp.tmp.cpp:34:5: warning: invalid case style for default 'MyFunction' [readability-identifier-naming]
# | 34 | int MyFunction(int MyArgument) {
# | | ^~~~~~~~~~
# | | my_function
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-lower.cpp.tmp.cpp:34:5: note: FIX-IT applied suggested code changes
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-lower.cpp.tmp.cpp:34:20: warning: invalid case style for default 'MyArgument' [readability-identifier-naming]
# | 34 | int MyFunction(int MyArgument) {
# | | ^~~~~~~~~~
# | | my_argument
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-lower.cpp.tmp.cpp:34:20: note: FIX-IT applied suggested code changes
# | clang-tidy applied 9 of 9 suggested fixes.
# |
# |
# | ------------------------------------------------------------------
# | diff -u C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-lower.cpp.tmp.orig C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-lower.cpp.tmp.cpp failed:
# | --- C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-lower.cpp.tmp.orig 2025-12-11 19:51:06.851062900 +0000
# | +++ C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-lower.cpp.tmp.cpp 2025-12-11 19:51:06.885187400 +0000
# | @@ -4,34 +4,34 @@
# | // RUN: }}'
# |
# |
# |
# | // DefaultCase enables every type of identifier to be checked with same case
# |
# | -#define MyMacro
# |
# | +#define my_macro
# |
# | //
# |
# | //
# |
# |
# |
# | -namespace MyNamespace {
# |
# | +namespace my_namespace {
# |
# | //
# |
# | //
# |
# |
# |
# | -using MyAlias = int;
# |
# | +using my_alias = int;
# |
# | //
# |
# | //
# |
# |
# |
# | -int MyGlobal;
# |
# | +int my_global;
# |
# | //
# |
# | //
# |
# |
# |
# | -struct MyStruct {
# |
# | +struct my_struct {
# |
# | //
# |
# | //
# |
# | - int MyField;
# |
# | + int my_field;
# |
# | //
# |
# | //
# |
# | };
# |
# |
# |
# | -template <typename MyTypename>
# |
# | +template <typename my_typename>
# |
# | //
# |
# | //
# |
# | -int MyFunction(int MyArgument) {
# |
# | +int my_function(int my_argument) {
# |
# | //
# |
# | //
# |
# | //
# |
# |
# | ------------------------------ Fixes -----------------------------
# | --- C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-lower.cpp.tmp.orig 2025-12-11 19:51:06.851062900 +0000
# | +++ C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-lower.cpp.tmp.cpp 2025-12-11 19:51:06.885187400 +0000
# | @@ -4,34 +4,34 @@
# | // RUN: }}'
# |
# |
# |
# | // DefaultCase enables every type of identifier to be checked with same case
# |
# | -#define MyMacro
# |
# | +#define my_macro
# |
# | //
# |
# | //
# |
# |
# |
# | -namespace MyNamespace {
# |
# | +namespace my_namespace {
# |
# | //
# |
# | //
# |
# |
# |
# | -using MyAlias = int;
# |
# | +using my_alias = int;
# |
# | //
# |
# | //
# |
# |
# |
# | -int MyGlobal;
# |
# | +int my_global;
# |
# | //
# |
# | //
# |
# |
# |
# | -struct MyStruct {
# |
# | +struct my_struct {
# |
# | //
# |
# | //
# |
# | - int MyField;
# |
# | + int my_field;
# |
# | //
# |
# | //
# |
# | };
# |
# |
# |
# | -template <typename MyTypename>
# |
# | +template <typename my_typename>
# |
# | //
# |
# | //
# |
# | -int MyFunction(int MyArgument) {
# |
# | +int my_function(int my_argument) {
# |
# | //
# |
# | //
# |
# | //
# |
# |
# | ------------------------------------------------------------------
# | FileCheck -input-file=C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-lower.cpp.tmp.cpp.msg C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\checkers\readability\identifier-naming-default-lower.cpp -check-prefixes=CHECK-MESSAGES -implicit-check-not={{warning|error}}: failed:
# | C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\checkers\readability\identifier-naming-default-lower.cpp:39:20: error: CHECK-MESSAGES: expected string not found in input
# |
# | // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for default 'MyVariable' [readability-identifier-naming]
# |
# | ^
# |
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-lower.cpp.tmp.cpp.msg:42:245: note: scanning from here
# |
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-lower.cpp.tmp.cpp:34:20: warning: invalid case style for default 'MyArgument' [readability-identifier-naming]
# |
# | ^
# |
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-lower.cpp.tmp.cpp.msg:42:245: note: with "@LINE-1" equal to "38"
# |
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-lower.cpp.tmp.cpp:34:20: warning: invalid case style for default 'MyArgument' [readability-identifier-naming]
# |
# | ^
# |
# |
# |
# | Input file: C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-lower.cpp.tmp.cpp.msg
# |
# | Check file: C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\checkers\readability\identifier-naming-default-lower.cpp
# |
# |
# |
# | -dump-input=help explains the following input dump.
# |
# |
# |
# | Input was:
# |
# | <<<<<<
# |
# | .
# |
# | .
# |
# | .
# |
# | 37: C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-lower.cpp.tmp.cpp:34:5: warning: invalid case style for default 'MyFunction' [readability-identifier-naming]
# |
# | 38: 34 | int MyFunction(int MyArgument) {
# |
# | 39: | ^~~~~~~~~~
# |
# | 40: | my_function
# |
# | 41: C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-lower.cpp.tmp.cpp:34:5: note: FIX-IT applied suggested code changes
# |
# | 42: C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-lower.cpp.tmp.cpp:34:20: warning: invalid case style for default 'MyArgument' [readability-identifier-naming]
# |
# | check:39'0 X error: no match found
# |
# | check:39'1 with "@LINE-1" equal to "38"
# |
# | 43: 34 | int MyFunction(int MyArgument) {
# |
# | check:39'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |
# | 44: | ^~~~~~~~~~
# |
# | check:39'0 ~~~~~~~~~~~~~~
# |
# | 45: | my_argument
# |
# | check:39'0 ~~~~~~~~~~~~~~~
# |
# | 46: C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-lower.cpp.tmp.cpp:34:20: note: FIX-IT applied suggested code changes
# |
# | check:39'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |
# | 47: clang-tidy applied 9 of 9 suggested fixes.
# |
# |
# | check:39'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |
# | >>>>>>
# |
# |
# `-----------------------------
# .---command stderr------------
# | Traceback (most recent call last):
# | File "C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\check_clang_tidy.py", line 413, in <module>
# | main()
# | File "C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\check_clang_tidy.py", line 409, in main
# | CheckRunner(args, extra_args).run()
# | File "C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\check_clang_tidy.py", line 312, in run
# | self.check_messages(clang_tidy_output)
# | File "C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\check_clang_tidy.py", line 273, in check_messages
# | try_run(
# | File "C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\check_clang_tidy.py", line 63, in try_run
# | process_output = subprocess.check_output(args, stderr=subprocess.STDOUT).decode(
# | File "c:\python39\lib\subprocess.py", line 424, in check_output
# | return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
# | File "c:\python39\lib\subprocess.py", line 528, in run
# | raise CalledProcessError(retcode, process.args,
# | subprocess.CalledProcessError: Command '['FileCheck', '-input-file=C:\\_work\\llvm-project\\llvm-project\\build\\tools\\clang\\tools\\extra\\test\\clang-tidy\\checkers\\readability\\Output\\identifier-naming-default-lower.cpp.tmp.cpp.msg', 'C:\\_work\\llvm-project\\llvm-project\\clang-tools-extra\\test\\clang-tidy\\checkers\\readability\\identifier-naming-default-lower.cpp', '-check-prefixes=CHECK-MESSAGES', '-implicit-check-not={{warning|error}}:']' returned non-zero exit status 1.
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>Clang Tools.clang-tidy/checkers/readability/identifier-naming-default-override.cpp</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
C:/Python39/python.exe C:/_work/llvm-project/llvm-project/clang-tools-extra/test/../test\clang-tidy\check_clang_tidy.py C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\checkers\readability\identifier-naming-default-override.cpp readability-identifier-naming C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-override.cpp.tmp -- -config='{CheckOptions: { readability-identifier-naming.DefaultCase: "lower_case", readability-identifier-naming.MacroDefinitionCase: "UPPER_CASE", readability-identifier-naming.TemplateParameterCase: "UPPER_CASE", }}'
# executed command: C:/Python39/python.exe 'C:/_work/llvm-project/llvm-project/clang-tools-extra/test/../test\clang-tidy\check_clang_tidy.py' 'C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\checkers\readability\identifier-naming-default-override.cpp' readability-identifier-naming 'C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-override.cpp.tmp' -- '-config={CheckOptions: { readability-identifier-naming.DefaultCase: "lower_case", readability-identifier-naming.MacroDefinitionCase: "UPPER_CASE", readability-identifier-naming.TemplateParameterCase: "UPPER_CASE", }}'
# .---command stdout------------
# | Running ['clang-tidy', '--experimental-custom-checks', 'C:\\_work\\llvm-project\\llvm-project\\build\\tools\\clang\\tools\\extra\\test\\clang-tidy\\checkers\\readability\\Output\\identifier-naming-default-override.cpp.tmp.cpp', '-fix', '--checks=-*,readability-identifier-naming', '-config={CheckOptions: { readability-identifier-naming.DefaultCase: "lower_case", readability-identifier-naming.MacroDefinitionCase: "UPPER_CASE", readability-identifier-naming.TemplateParameterCase: "UPPER_CASE", }}', '--', '-std=c++11', '-nostdinc++']...
# | ------------------------ clang-tidy output -----------------------
# | 11 warnings generated.
# |
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-override.cpp.tmp.cpp:8:9: warning: invalid case style for macro definition 'MyMacro' [readability-identifier-naming]
# | 8 | #define MyMacro
# | | ^~~~~~~
# | | MY_MACRO
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-override.cpp.tmp.cpp:8:9: note: FIX-IT applied suggested code changes
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-override.cpp.tmp.cpp:12:11: warning: invalid case style for default 'MyNamespace' [readability-identifier-naming]
# | 12 | namespace MyNamespace {
# | | ^~~~~~~~~~~
# | | my_namespace
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-override.cpp.tmp.cpp:12:11: note: FIX-IT applied suggested code changes
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-override.cpp.tmp.cpp:16:7: warning: invalid case style for default 'MyAlias' [readability-identifier-naming]
# | 16 | using MyAlias = int;
# | | ^~~~~~~
# | | my_alias
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-override.cpp.tmp.cpp:16:7: note: FIX-IT applied suggested code changes
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-override.cpp.tmp.cpp:20:5: warning: invalid case style for default 'MyGlobal' [readability-identifier-naming]
# | 20 | int MyGlobal;
# | | ^~~~~~~~
# | | my_global
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-override.cpp.tmp.cpp:20:5: note: FIX-IT applied suggested code changes
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-override.cpp.tmp.cpp:24:8: warning: invalid case style for default 'MyStruct' [readability-identifier-naming]
# | 24 | struct MyStruct {
# | | ^~~~~~~~
# | | my_struct
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-override.cpp.tmp.cpp:24:8: note: FIX-IT applied suggested code changes
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-override.cpp.tmp.cpp:27:7: warning: invalid case style for default 'MyField' [readability-identifier-naming]
# | 27 | int MyField;
# | | ^~~~~~~
# | | my_field
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-override.cpp.tmp.cpp:27:7: note: FIX-IT applied suggested code changes
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-override.cpp.tmp.cpp:32:20: warning: invalid case style for template parameter 'MyTypename' [readability-identifier-naming]
# | 32 | template <typename MyTypename>
# | | ^~~~~~~~~~
# | | MY_TYPENAME
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-override.cpp.tmp.cpp:32:20: note: FIX-IT applied suggested code changes
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-override.cpp.tmp.cpp:35:5: warning: invalid case style for default 'MyFunction' [readability-identifier-naming]
# | 35 | int MyFunction(int MyArgument) {
# | | ^~~~~~~~~~
# | | my_function
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-override.cpp.tmp.cpp:35:5: note: FIX-IT applied suggested code changes
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-override.cpp.tmp.cpp:35:20: warning: invalid case style for default 'MyArgument' [readability-identifier-naming]
# | 35 | int MyFunction(int MyArgument) {
# | | ^~~~~~~~~~
# | | my_argument
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-override.cpp.tmp.cpp:35:20: note: FIX-IT applied suggested code changes
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-override.cpp.tmp.cpp:48:9: warning: invalid case style for macro definition 'my_macro_2' [readability-identifier-naming]
# | 48 | #define my_macro_2
# | | ^~~~~~~~~~
# | | MY_MACRO_2
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-override.cpp.tmp.cpp:48:9: note: FIX-IT applied suggested code changes
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-override.cpp.tmp.cpp:62:20: warning: invalid case style for template parameter 'my_typename' [readability-identifier-naming]
# | 62 | template <typename my_typename>
# | | ^~~~~~~~~~~
# | | MY_TYPENAME
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-override.cpp.tmp.cpp:62:20: note: FIX-IT applied suggested code changes
# | clang-tidy applied 11 of 11 suggested fixes.
# |
# |
# | ------------------------------------------------------------------
# | diff -u C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-override.cpp.tmp.orig C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-override.cpp.tmp.cpp failed:
# | --- C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-override.cpp.tmp.orig 2025-12-11 19:51:06.847588900 +0000
# | +++ C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-override.cpp.tmp.cpp 2025-12-11 19:51:06.886647100 +0000
# | @@ -5,34 +5,34 @@
# | // RUN: readability-identifier-naming.TemplateParameterCase: "UPPER_CASE", \
# |
# | // RUN: }}'
# |
# |
# |
# | -#define MyMacro
# |
# | +#define MY_MACRO
# |
# | //
# |
# | //
# |
# |
# |
# | -namespace MyNamespace {
# |
# | +namespace my_namespace {
# |
# | //
# |
# | //
# |
# |
# |
# | -using MyAlias = int;
# |
# | +using my_alias = int;
# |
# | //
# |
# | //
# |
# |
# |
# | -int MyGlobal;
# |
# | +int my_global;
# |
# | //
# |
# | //
# |
# |
# |
# | -struct MyStruct {
# |
# | +struct my_struct {
# |
# | //
# |
# | //
# |
# | - int MyField;
# |
# | + int my_field;
# |
# | //
# |
# | //
# |
# | };
# |
# |
# |
# | -template <typename MyTypename>
# |
# | +template <typename MY_TYPENAME>
# |
# | //
# |
# | //
# |
# | -int MyFunction(int MyArgument) {
# |
# | +int my_function(int my_argument) {
# |
# | //
# |
# | //
# |
# | //
# |
# | @@ -45,7 +45,7 @@
# |
# |
# | }
# |
# |
# |
# | -#define my_macro_2
# |
# | +#define MY_MACRO_2
# |
# | //
# |
# | //
# |
# |
# |
# | @@ -59,7 +59,7 @@
# | int my_field;
# |
# | };
# |
# |
# |
# | -template <typename my_typename>
# |
# | +template <typename MY_TYPENAME>
# |
# | //
# |
# | //
# |
# | int my_function(int my_argument) {
# |
# |
# | ------------------------------ Fixes -----------------------------
# | --- C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-override.cpp.tmp.orig 2025-12-11 19:51:06.847588900 +0000
# | +++ C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-override.cpp.tmp.cpp 2025-12-11 19:51:06.886647100 +0000
# | @@ -5,34 +5,34 @@
# | // RUN: readability-identifier-naming.TemplateParameterCase: "UPPER_CASE", \
# |
# | // RUN: }}'
# |
# |
# |
# | -#define MyMacro
# |
# | +#define MY_MACRO
# |
# | //
# |
# | //
# |
# |
# |
# | -namespace MyNamespace {
# |
# | +namespace my_namespace {
# |
# | //
# |
# | //
# |
# |
# |
# | -using MyAlias = int;
# |
# | +using my_alias = int;
# |
# | //
# |
# | //
# |
# |
# |
# | -int MyGlobal;
# |
# | +int my_global;
# |
# | //
# |
# | //
# |
# |
# |
# | -struct MyStruct {
# |
# | +struct my_struct {
# |
# | //
# |
# | //
# |
# | - int MyField;
# |
# | + int my_field;
# |
# | //
# |
# | //
# |
# | };
# |
# |
# |
# | -template <typename MyTypename>
# |
# | +template <typename MY_TYPENAME>
# |
# | //
# |
# | //
# |
# | -int MyFunction(int MyArgument) {
# |
# | +int my_function(int my_argument) {
# |
# | //
# |
# | //
# |
# | //
# |
# | @@ -45,7 +45,7 @@
# |
# |
# | }
# |
# |
# |
# | -#define my_macro_2
# |
# | +#define MY_MACRO_2
# |
# | //
# |
# | //
# |
# |
# |
# | @@ -59,7 +59,7 @@
# | int my_field;
# |
# | };
# |
# |
# |
# | -template <typename my_typename>
# |
# | +template <typename MY_TYPENAME>
# |
# | //
# |
# | //
# |
# | int my_function(int my_argument) {
# |
# |
# | ------------------------------------------------------------------
# | FileCheck --input-file=C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-override.cpp.tmp.cpp C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\checkers\readability\identifier-naming-default-override.cpp --check-prefixes=CHECK-FIXES --match-full-lines failed:
# | C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\checkers\readability\identifier-naming-default-override.cpp:50:17: error: CHECK-FIXES: expected string not found in input
# |
# | // CHECK-FIXES: #define MY_MACRO_2
# |
# | ^
# |
# | C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-override.cpp.tmp.cpp:67:21: note: scanning from here
# |
# | return my_variable;
# |
# | ^
# |
# |
# |
# | Input file: C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\checkers\readability\Output\identifier-naming-default-override.cpp.tmp.cpp
# |
# | Check file: C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\checkers\readability\identifier-naming-default-override.cpp
# |
# |
# |
# | -dump-input=help explains the following input dump.
# |
# |
# |
# | Input was:
# |
# | <<<<<<
# |
# | .
# |
# | .
# |
# | .
# |
# | 62: template <typename MY_TYPENAME>
# |
# | 63: //
# |
# | 64: //
# |
# | 65: int my_function(int my_argument) {
# |
# | 66: int my_variable = my_argument;
# |
# | 67: return my_variable;
# |
# | check:50 X error: no match found
# |
# | 68: }
# |
# | check:50 ~~
# |
# | 69:
# |
# | check:50 ~
# |
# | 70: }
# |
# | check:50 ~~
# |
# | 71:
# |
# | check:50 ~
# |
# | >>>>>>
# |
# |
# `-----------------------------
# .---command stderr------------
# | Traceback (most recent call last):
# | File "C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\check_clang_tidy.py", line 413, in <module>
# | main()
# | File "C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\check_clang_tidy.py", line 409, in main
# | CheckRunner(args, extra_args).run()
# | File "C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\check_clang_tidy.py", line 311, in run
# | self.check_fixes()
# | File "C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\check_clang_tidy.py", line 255, in check_fixes
# | try_run(
# | File "C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\check_clang_tidy.py", line 63, in try_run
# | process_output = subprocess.check_output(args, stderr=subprocess.STDOUT).decode(
# | File "c:\python39\lib\subprocess.py", line 424, in check_output
# | return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
# | File "c:\python39\lib\subprocess.py", line 528, in run
# | raise CalledProcessError(retcode, process.args,
# | subprocess.CalledProcessError: Command '['FileCheck', '--input-file=C:\\_work\\llvm-project\\llvm-project\\build\\tools\\clang\\tools\\extra\\test\\clang-tidy\\checkers\\readability\\Output\\identifier-naming-default-override.cpp.tmp.cpp', 'C:\\_work\\llvm-project\\llvm-project\\clang-tools-extra\\test\\clang-tidy\\checkers\\readability\\identifier-naming-default-override.cpp', '--check-prefixes=CHECK-FIXES', '--match-full-lines']' 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/171686
More information about the cfe-commits
mailing list