Page MenuHomePhabricator

[clang-format] Fix putting ObjC message arguments in one line for multiline receiver
ClosedPublic

Authored by jolesiak on May 15 2018, 7:10 AM.

Details

Summary

Currently BreakBeforeParameter is set to true everytime message receiver spans multiple lines, e.g.:

[[object block:^{
  return 42;
}] aa:42 bb:42];

will be formatted:

[[object block:^{
  return 42;
}] aa:42
   bb:42];

even though arguments could fit into one line. This change fixes this behavior.

Test Plan:
make -j12 FormatTests && tools/clang/unittests/Format/FormatTests

Diff Detail

Event Timeline

jolesiak created this revision.May 15 2018, 7:10 AM
jolesiak edited the summary of this revision. (Show Details)May 15 2018, 7:11 AM
jolesiak edited the summary of this revision. (Show Details)
jolesiak added reviewers: benhamilton, djasper.
benhamilton accepted this revision.May 15 2018, 11:00 AM
This revision is now accepted and ready to land.May 15 2018, 11:00 AM
This revision was automatically updated to reflect the committed changes.
This revision was automatically updated to reflect the committed changes.