[all-commits] [llvm/llvm-project] 531cf8: [clang-format] Stop ctor initializer from being in...
Eric Li via All-commits
all-commits at lists.llvm.org
Thu Jul 24 01:06:24 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 531cf8298b08eacdf670bac8c28db97a5dc8cb01
https://github.com/llvm/llvm-project/commit/531cf8298b08eacdf670bac8c28db97a5dc8cb01
Author: Eric Li <li.zhe.hua at gmail.com>
Date: 2025-07-24 (Thu, 24 Jul 2025)
Changed paths:
M clang/lib/Format/ContinuationIndenter.cpp
M clang/unittests/Format/FormatTest.cpp
Log Message:
-----------
[clang-format] Stop ctor initializer from being inlined (#150361)
The colon in a constructor's initializer list triggers the inlining of a
nested block as if it was a conditional operator expression. This
prevents line breaks under certain circumstances when the initializer
list contains braced initializers, which in turn prevents the line
formatter from finding a solution.
In this commit we exclude colons that are a constructor initializer
colon from consideration of nested block inlining.
Fixes #97242.
Fixes #81822.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list