[PATCH] clang-format: Builder closing paren must be a call
Adam Strzelecki
ono at java.pl
Mon May 4 08:13:30 PDT 2015
In http://reviews.llvm.org/D9469#165347, @djasper wrote:
> I am not sure this is the right direction. We have actually considered going the other way, i.e. do builder-type wrapping even after the first element, i.e.:
>
> aaaaaaaa
> .aaaaaa()
> .bbbbbb();
>
>
> There were some edge cases where I got stuck a bit, so I haven't proceeded. But engraining this more seems wrong. The given example seems wrong for other reasons, in particular, we should force wrapping the parameters/selectors if the callee spans multiple lines.
I may agree with that if it is constrained to something, like either a break if preceded with a real call or it is followed by real call. Current implementation expects (looking at the tests) that element preceding dot (and the break) if the call.
Now you give a sample that actually the stuff following a break and dot is a call. Either or is okay, but not:
aaaaaaaaa
.bbbbbbbbb
.cccccccccc
This is just accessing fields, not builder call.
http://reviews.llvm.org/D9469
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the cfe-commits
mailing list