[clang] [clang-format] Add `TemplateTypeParameterKeyword` fixer (PR #192223)
via cfe-commits
cfe-commits at lists.llvm.org
Sun May 3 17:19:07 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results
* 53665 tests passed
* 1114 tests skipped
* 2 tests failed
## Failed Tests
(click on a test name to see its output)
### Clang
<details>
<summary>Clang.Format/docs_updated.test</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
"C:\Python312\python.exe" C:\_work\llvm-project\llvm-project\clang\test\Format/../../docs/tools/dump_format_style.py -o C:\_work\llvm-project\llvm-project\build\tools\clang\test\Format\Output\docs_updated.test.tmp.style
# executed command: 'C:\Python312\python.exe' 'C:\_work\llvm-project\llvm-project\clang\test\Format/../../docs/tools/dump_format_style.py' -o 'C:\_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 C:\_work\llvm-project\llvm-project\build\tools\clang\test\Format\Output\docs_updated.test.tmp.style C:\_work\llvm-project\llvm-project\clang\test\Format/../../docs/ClangFormatStyleOptions.rst
# executed command: diff --strip-trailing-cr 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Format\Output\docs_updated.test.tmp.style' 'C:\_work\llvm-project\llvm-project\clang\test\Format/../../docs/ClangFormatStyleOptions.rst'
# .---command stdout------------
# | *** C:\_work\llvm-project\llvm-project\build\tools\clang\test\Format\Output\docs_updated.test.tmp.style
# | --- C:\_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_exe/FormatTest/TemplateTypeParameterKeyword</summary>
```
Script:
--
C:\_work\llvm-project\llvm-project\build\tools\clang\unittests\Format\.\FormatTests.exe --gtest_filter=FormatTest.TemplateTypeParameterKeyword
--
C:\_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:
C:\_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