[PATCH] D11300: Allow PenaltyBreakBeforeFirstCallParameter to not break Obj-C call before first parameter
Daniel Jasper
djasper at google.com
Fri Jul 17 09:25:22 PDT 2015
djasper added inline comments.
================
Comment at: lib/Format/TokenAnnotator.cpp:1751
@@ +1750,3 @@
+ // apply PenaltyBreakBeforeFirstCallParameter
+ if (Left.is(tok::identifier) && Left.Previous &&
+ Left.Previous->is(tok::l_square)) {
----------------
I think this doesn't work yet, as the callee can also be the result of an expression, right?
so: [[self a] a:b c:d];
But I think you can just check whether Right.LongestObjCSelectorName is != 0. This value should only be set for the first selector.
Repository:
rL LLVM
http://reviews.llvm.org/D11300
More information about the cfe-commits
mailing list