Open Quuxplusone opened 3 years ago
Bugzilla Link | PR50931 |
Status | CONFIRMED |
Importance | P normal |
Reported by | Vadim Kalinnikov (kalinnikov@seaproject.ru) |
Reported on | 2021-06-29 06:09:22 -0700 |
Last modified on | 2021-07-07 02:16:46 -0700 |
Version | 12.0 |
Hardware | PC Linux |
CC | djasper@google.com, klimek@google.com, llvm-bugs@lists.llvm.org, mydeveloperday@gmail.com |
Fixed by commit(s) | |
Attachments | |
Blocks | |
Blocked by | |
See also |
I don't know if there is a cause other than that you've said you want to break before the {
also in the documentation it does say
A column limit of 0 means that there is no column limit. In this case, clang-format will respect the input’s line breaking decisions within statements unless they contradict other rules.
Emphasis on the "unless they contradict other rules"
I'm not sure if this classes as one of those other rules
Such behavior is inconsistent with some other rules.
For functions breaking doesn't happen if I put everything on a single line, so
I reckon neither should it happen for lambdas.
Maybe looks at AllowShortLambdasOnASingleLine
Yes, AllowShortLambdasOnASingleLine would fix the issue.