Patch to prefer not breaking before the first parameter on an Objective-c method call if possible.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Format/TokenAnnotator.cpp | ||
---|---|---|
1751 | 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. |
Fixing obj-c method calls with no parameters and and adding unit test for when callee is an expression.
Responding to comments form djasper
lib/Format/TokenAnnotator.cpp | ||
---|---|---|
1701 | without this single Objective-C calls with no parameters ([self foo]) didn't have PenaltyBreakBeforeFirstCallParameter applied to stop a break before "foo". I wanted to return the max between the old default of 200 and PenaltyBreakBeforeFirstCallParameter but didn't want to have specify 200 multiple times. | |
unittests/Format/FormatTest.cpp | ||
7343–7344 | Removed that statement. |
I don't understand this change. Could you elaborate?