[clang] [clang-format] Remove special handling of comments after brace/paren (PR #71672)
Björn Schäpers via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 8 13:59:09 PDT 2025
================
@@ -1474,12 +1474,12 @@ TEST_F(FormatTestComments, CommentsInStaticInitializers) {
verifyFormat("S s = {{a, b, c}, // Group #1\n"
" {d, e, f}, // Group #2\n"
" {g, h, i}}; // Group #3");
- verifyFormat("S s = {{// Group #1\n"
- " a, b, c},\n"
- " {// Group #2\n"
- " d, e, f},\n"
- " {// Group #3\n"
- " g, h, i}};");
+ verifyFormat("S s = {{ // Group #1\n"
+ " a, b, c},\n"
----------------
HazardyKnusperkeks wrote:
It handles `{}` just the same as `()`, as a function call, and as @owenca pointed out: "If there is no name, a zero-length name is assumed."
It took so long, because things happen and I did not fine any time to actually try to work on this stuff. This is not an issue which happens in my code.
https://github.com/llvm/llvm-project/pull/71672
More information about the cfe-commits
mailing list