File tree Expand file tree Collapse file tree 2 files changed +0
-58
lines changed Expand file tree Collapse file tree 2 files changed +0
-58
lines changed Original file line number Diff line number Diff line change @@ -1387,29 +1387,6 @@ void ContinuationIndenter::moveStatePastScopeCloser(LineState &State) {
1387
1387
(Current.is (tok::greater) && Current.is (TT_DictLiteral))))
1388
1388
State.Stack .pop_back ();
1389
1389
1390
- // Reevaluate whether ObjC message arguments fit into one line.
1391
- // If a receiver spans multiple lines, e.g.:
1392
- // [[object block:^{
1393
- // return 42;
1394
- // }] a:42 b:42];
1395
- // BreakBeforeParameter is calculated based on an incorrect assumption
1396
- // (it is checked whether the whole expression fits into one line without
1397
- // considering a line break inside a message receiver).
1398
- // We check whether arguements fit after receiver scope closer (into the same
1399
- // line).
1400
- if (Current.MatchingParen && Current.MatchingParen ->Previous ) {
1401
- const FormatToken &CurrentScopeOpener = *Current.MatchingParen ->Previous ;
1402
- if (CurrentScopeOpener.is (TT_ObjCMethodExpr) &&
1403
- CurrentScopeOpener.MatchingParen ) {
1404
- int NecessarySpaceInLine =
1405
- getLengthToMatchingParen (CurrentScopeOpener, State.Stack ) +
1406
- CurrentScopeOpener.TotalLength - Current.TotalLength - 1 ;
1407
- if (State.Column + Current.ColumnWidth + NecessarySpaceInLine <=
1408
- Style.ColumnLimit )
1409
- State.Stack .back ().BreakBeforeParameter = false ;
1410
- }
1411
- }
1412
-
1413
1390
if (Current.is (tok::r_square)) {
1414
1391
// If this ends the array subscript expr, reset the corresponding value.
1415
1392
const FormatToken *NextNonComment = Current.getNextNonComment ();
Original file line number Diff line number Diff line change @@ -796,41 +796,6 @@ TEST_F(FormatTestObjC, FormatObjCMethodExpr) {
796
796
verifyFormat (" [((Foo *)foo) bar];" );
797
797
verifyFormat (" [((Foo *)foo) bar:1 blech:2];" );
798
798
799
- // Message receiver taking multiple lines.
800
- Style.ColumnLimit = 20 ;
801
- // Non-corner case.
802
- verifyFormat (" [[object block:^{\n "
803
- " return 42;\n "
804
- " }] a:42 b:42];" );
805
- // Arguments just fit into one line.
806
- verifyFormat (" [[object block:^{\n "
807
- " return 42;\n "
808
- " }] aaaaaaa:42 b:42];" );
809
- // Arguments just over a column limit.
810
- verifyFormat (" [[object block:^{\n "
811
- " return 42;\n "
812
- " }] aaaaaaa:42\n "
813
- " bb:42];" );
814
- // Arguments just fit into one line.
815
- Style.ColumnLimit = 23 ;
816
- verifyFormat (" [[obj a:42\n "
817
- " b:42\n "
818
- " c:42\n "
819
- " d:42] e:42 f:42];" );
820
-
821
- // Arguments do not fit into one line with a receiver.
822
- Style.ColumnLimit = 20 ;
823
- verifyFormat (" [[obj a:42] a:42\n "
824
- " b:42];" );
825
- verifyFormat (" [[obj a:42] a:42\n "
826
- " b:42\n "
827
- " c:42];" );
828
- verifyFormat (" [[obj aaaaaa:42\n "
829
- " b:42]\n "
830
- " cc:42\n "
831
- " d:42];" );
832
-
833
-
834
799
Style.ColumnLimit = 70 ;
835
800
verifyFormat (
836
801
" void f() {\n "
You can’t perform that action at this time.
0 commit comments