Open Quuxplusone opened 9 years ago
Bugzilla Link | PR23585 |
Status | NEW |
Importance | P normal |
Reported by | Tony Arnold (tony@thecocoabots.com) |
Reported on | 2015-05-19 19:16:33 -0700 |
Last modified on | 2015-08-31 16:10:17 -0700 |
Version | unspecified |
Hardware | PC All |
CC | djasper@google.com, klimek@google.com, ksuther@ithinksw.com |
Fixed by commit(s) | |
Attachments | |
Blocks | |
Blocked by | |
See also |
It seems there's something unusual happening here, too:
[self setupTextFieldSignals:@[
self.documentWidthField,
self.documentHeightField,
] solver:^(NSTextField *textField) {
return [self.representedObject solveEquationForTextField:textField];
}];
Gets reformatted to:
[self setupTextFieldSignals:@[
self.documentWidthField,
self.documentHeightField,
]
solver:^(NSTextField *textField) {
return [self.representedObject solveEquationForTextField:textField];
}];
The commit that introduced this issue is r235580 (clang-format: Support nested block formatting with ColumnLimit=0.)
Not setting BreakBeforeParameter to true if ColumnLimit is zero fixes the issue, but this commit explicitly introduced this change. I don't fully understand the logic behind the change. It seems that Tok->MustBreakBefore is always going to be true when encountering a "}]" at the end of a block inside of an Obj-C method call, which is going to always force a break before the parameter.
I can see this making sense if there's already a newline before the parameter with the block, but I don't think it should be always introducing newlines if the parameter isn't already on a separate line.