[clang] Add C language support for clang-format IntegerLiteralSeparator (PR #182296)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 19 12:49:48 PST 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results
* 52628 tests passed
* 968 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
# | ***************
# | *** 4751,4758 ****
# | .. _IntegerLiteralSeparator:
# |
# | **IntegerLiteralSeparator** (``IntegerLiteralSeparatorStyle``) :versionbadge:`clang-format 16` :ref:`¶ <IntegerLiteralSeparator>`
# | ! Format integer literal separators (``'`` for C++ and ``_`` for C#, Java,
# | ! and JavaScript).
# |
# | Nested configuration flags:
# |
# | --- 4751,4758 ----
# | .. _IntegerLiteralSeparator:
# |
# | **IntegerLiteralSeparator** (``IntegerLiteralSeparatorStyle``) :versionbadge:`clang-format 16` :ref:`¶ <IntegerLiteralSeparator>`
# | ! Format integer literal separators (``'`` for C, C++ and ``_`` for C#, Java,
# | ! and JavaScript). Note that using the separator with C requires a C23+ compiler.
# |
# | Nested configuration flags:
# |
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
### Clang-Unit
<details>
<summary>Clang-Unit.Format/_/FormatTests_exe/IntegerLiteralSeparatorTest/SingleQuoteAsSeparator</summary>
```
Script:
--
C:\_work\llvm-project\llvm-project\build\tools\clang\unittests\Format\.\FormatTests.exe --gtest_filter=IntegerLiteralSeparatorTest.SingleQuoteAsSeparator
--
C:\_work\llvm-project\llvm-project\clang\unittests\Format\FormatTestBase.h:90
Expected equality of these values:
ExpectedCode
Which is: "b = 0b10011'11'0110'1u;"
FormattedCode
Which is: "b = 0b1001'1110'1101u;"
Google Test trace:
C:\_work\llvm-project\llvm-project\clang\unittests\Format\IntegerLiteralSeparatorTest.cpp(31): b = 0b10011'11'0110'1u;
C:\_work\llvm-project\llvm-project\clang\unittests\Format\FormatTestBase.h:90
Expected equality of these values:
ExpectedCode
Which is: "d = 184467'440737'0'95505'92Ull;"
FormattedCode
Which is: "d = 18'446'744'073'709'550'592Ull;"
Google Test trace:
C:\_work\llvm-project\llvm-project\clang\unittests\Format\IntegerLiteralSeparatorTest.cpp(40): d = 184467'440737'0'95505'92Ull;
C:\_work\llvm-project\llvm-project\clang\unittests\Format\FormatTestBase.h:90
Expected equality of these values:
ExpectedCode
Which is: "h = 0xDEAD'BEEF'DE'AD'BEE'Fuz;"
FormattedCode
Which is: "h = 0xDE'AD'BE'EF'DE'AD'BE'EFuz;"
Google Test trace:
C:\_work\llvm-project\llvm-project\clang\unittests\Format\IntegerLiteralSeparatorTest.cpp(47): h = 0xDEAD'BEEF'DE'AD'BEE'Fuz;
```
</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/182296
More information about the cfe-commits
mailing list