[clang] No spaces after colon and comma in initializer list (PR #190657)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 7 13:53:20 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results
* 87242 tests passed
* 1375 tests skipped
* 1 test 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
"/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
# | ***************
# | *** 6711,6736 ****
# | true: false:
# | (int) i; vs. (int)i;
# |
# | - .. _SpaceAfterCtorInitializerColon:
# | -
# | - **SpaceAfterCtorInitializerColon** (``Boolean``) :versionbadge:`clang-format 22` :ref:`¶ <SpaceAfterCtorInitializerColon>`
# | - If ``false``, spaces will be removed after constructor initializer colon.
# | -
# | - .. code-block:: c++
# | -
# | - true: false:
# | - Foo::Foo() : a(a) {} Foo::Foo() :a(a) {}
# | -
# | - .. _SpaceAfterCtorInitializerComma:
# | -
# | - **SpaceAfterCtorInitializerComma** (``Boolean``) :versionbadge:`clang-format 22` :ref:`¶ <SpaceAfterCtorInitializerComma>`
# | - If ``false``, spaces will be removed after constructor initializer comma.
# | -
# | - .. code-block:: c++
# | -
# | - true: false:
# | - Foo::Foo() : a(a), b(b) {} Foo::Foo() : a(a),b(b) {}
# | -
# | .. _SpaceAfterLogicalNot:
# |
# | **SpaceAfterLogicalNot** (``Boolean``) :versionbadge:`clang-format 9` :ref:`¶ <SpaceAfterLogicalNot>`
# | --- 6711,6716 ----
# | ***************
# | *** 6870,6875 ****
# | --- 6850,6875 ----
# |
# | true: false:
# | class Foo : Bar {} vs. class Foo: Bar {}
# | +
# | + .. _SpaceAfterCtorInitializerColon:
# | +
# | + **SpaceAfterCtorInitializerColon** (``Boolean``) :versionbadge:`clang-format 22` :ref:`¶ <SpaceAfterCtorInitializerColon>`
# | + If ``false``, spaces will be removed after constructor initializer colon.
# | +
# | + .. code-block:: c++
# | +
# | + true: false:
# | + Foo::Foo() : a(a) {} Foo::Foo() :a(a) {}
# | +
# | + .. _SpaceAfterCtorInitializerComma:
# | +
# | + **SpaceAfterCtorInitializerComma** (``Boolean``) :versionbadge:`clang-format 22` :ref:`¶ <SpaceAfterCtorInitializerComma>`
# | + If ``false``, spaces will be removed after constructor initializer comma.
# | +
# | + .. code-block:: c++
# | +
# | + true: false:
# | + Foo::Foo() : a(a), b(b) {} Foo::Foo() : a(a),b(b) {}
# |
# | .. _SpaceBeforeJsonColon:
# |
# `-----------------------------
# 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/190657
More information about the cfe-commits
mailing list