[clang] [clang-format] Add `TemplateTypeParameterKeyword` fixer (PR #192223)
via cfe-commits
cfe-commits at lists.llvm.org
Sun May 3 17:19:08 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results
* 87424 tests passed
* 1425 tests skipped
* 3 tests failed
## Failed Tests
(click on a test name to see its output)
### lldb-api
<details>
<summary>lldb-api.python_api/run_locker/TestRunLocker.py</summary>
```
Script:
--
/usr/bin/python3 /home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/test/API/dotest.py -u CXXFLAGS -u CFLAGS --env LLVM_LIBS_DIR=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/./lib --env LLVM_INCLUDE_DIR=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/include --env LLVM_TOOLS_DIR=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/./bin --libcxx-include-dir /home/gha/actions-runner/_work/llvm-project/llvm-project/build/include/c++/v1 --libcxx-include-target-dir /home/gha/actions-runner/_work/llvm-project/llvm-project/build/include/x86_64-unknown-linux-gnu/c++/v1 --libcxx-library-dir /home/gha/actions-runner/_work/llvm-project/llvm-project/build/./lib/x86_64-unknown-linux-gnu --triple x86_64-unknown-linux-gnu --build-dir /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lldb-test-build.noindex --lldb-module-cache-dir /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lldb-test-build.noindex/module-cache-lldb/lldb-api --clang-module-cache-dir /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lldb-test-build.noindex/module-cache-clang/lldb-api --executable /home/gha/actions-runner/_work/llvm-project/llvm-project/build/./bin/lldb --compiler /home/gha/actions-runner/_work/llvm-project/llvm-project/build/./bin/clang --dsymutil /home/gha/actions-runner/_work/llvm-project/llvm-project/build/./bin/dsymutil --make /usr/bin/gmake --llvm-tools-dir /home/gha/actions-runner/_work/llvm-project/llvm-project/build/./bin --lldb-obj-root /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/lldb --lldb-libs-dir /home/gha/actions-runner/_work/llvm-project/llvm-project/build/./lib --cmake-build-type Release /home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/test/API/python_api/run_locker -p TestRunLocker.py
--
Exit Code: 1
Command Output (stdout):
--
lldb version 23.0.0git (https://github.com/llvm/llvm-project revision 6f72095f82af3189dcf50fb82302d43d61a6a04e)
clang revision 6f72095f82af3189dcf50fb82302d43d61a6a04e
llvm revision 6f72095f82af3189dcf50fb82302d43d61a6a04e
"can't evaluate expressions when the process is running."
Skipping the following test categories: msvcstl, dsym, pdb, gmodules, debugserver, objc
--
Command Output (stderr):
--
Traceback (most recent call last):
File "<input>", line 1, in <module>
AttributeError: 'NoneType' object has no attribute 'EvaluateExpression'
FAIL: LLDB (/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang-x86_64) :: test_run_locker (TestRunLocker.TestRunLocker.test_run_locker)
Log Files:
- /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lldb-test-build.noindex/python_api/run_locker/TestRunLocker/Failure_test_run_locker.log
PASS: LLDB (/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang-x86_64) :: test_run_locker_stop_at_entry (TestRunLocker.TestRunLocker.test_run_locker_stop_at_entry)
======================================================================
FAIL: test_run_locker (TestRunLocker.TestRunLocker.test_run_locker)
Test that the run locker is set correctly when we launch
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/packages/Python/lldbsuite/test/decorators.py", line 160, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/test/API/python_api/run_locker/TestRunLocker.py", line 23, in test_run_locker
self.runlocker_test(False)
File "/home/gha/actions-runner/_work/llvm-project/llvm-project/lldb/test/API/python_api/run_locker/TestRunLocker.py", line 110, in runlocker_test
self.assertIn(
AssertionError: "can't evaluate expressions when the process is running" not found in ''
Config=x86_64-/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang
----------------------------------------------------------------------
Ran 2 tests in 0.751s
FAILED (failures=1)
--
```
</details>
### Clang
<details>
<summary>Clang.Format/docs_updated.test</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
"/usr/bin/python3" /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/Format/../../docs/tools/dump_format_style.py -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/Format/Output/docs_updated.test.tmp.style
# executed command: /usr/bin/python3 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/Format/../../docs/tools/dump_format_style.py -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/Format/Output/docs_updated.test.tmp.style
# note: command had no output on stdout or stderr
# RUN: at line 2
diff --strip-trailing-cr /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/Format/Output/docs_updated.test.tmp.style /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/Format/../../docs/ClangFormatStyleOptions.rst
# executed command: diff --strip-trailing-cr /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/Format/Output/docs_updated.test.tmp.style /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/Format/../../docs/ClangFormatStyleOptions.rst
# .---command stdout------------
# | *** /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/Format/Output/docs_updated.test.tmp.style
# | --- /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/Format/../../docs/ClangFormatStyleOptions.rst
# | ***************
# | *** 7538,7561 ****
# | A ``<`` after a template name is annotated as a template opener instead of
# | a binary operator.
# |
# | - .. _TemplateTypeParameterKeyword:
# | -
# | - **TemplateTypeParameterKeyword** (``TemplateTypeParameterKeywordOption``) :versionbadge:`clang-format 23` :ref:`¶ <TemplateTypeParameterKeyword>`
# | - TemplateTypeParameterKeywordOption
# | -
# | - Possible values:
# | -
# | - * ``TTPS_Leave`` (in configuration: ``Leave``)
# | - Leave the source spelling unchanged.
# | -
# | - * ``TTPS_UseTypename`` (in configuration: ``UseTypename``)
# | - Use ``typename``.
# | -
# | - * ``TTPS_UseClass`` (in configuration: ``UseClass``)
# | - Use ``class``.
# | -
# | -
# | -
# | .. _TypeNames:
# |
# | **TypeNames** (``List of Strings``) :versionbadge:`clang-format 17` :ref:`¶ <TypeNames>`
# | --- 7538,7543 ----
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
### Clang-Unit
<details>
<summary>Clang-Unit.Format/_/FormatTests/FormatTest/TemplateTypeParameterKeyword</summary>
```
Script:
--
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/unittests/Format/./FormatTests --gtest_filter=FormatTest.TemplateTypeParameterKeyword
--
/home/gha/actions-runner/_work/llvm-project/llvm-project/clang/unittests/Format/FormatTestBase.h:90
Expected equality of these values:
ExpectedCode
Which is: "template <template <typename U> class C> struct S;"
FormattedCode
Which is: "template <template <typename U> typename C> struct S;"
Google Test trace:
/home/gha/actions-runner/_work/llvm-project/llvm-project/clang/unittests/Format/FormatTest.cpp:22010: template <template <class U> typename C> struct S;
```
</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/192223
More information about the cfe-commits
mailing list