HomePhabricator

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

Authored by jolesiak on May 17 2018, 1:35 AM.

Description

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

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

Reviewers: benhamilton, djasper

Reviewed By: benhamilton

Subscribers: klimek, cfe-commits

Differential Revision: https://reviews.llvm.org/D46879

llvm-svn: 332582