]> granicus.if.org Git - clang/commit
[clang-format/ObjC] Put ObjC method arguments into one line when they fit
authorJacek Olesiak <jolesiak@google.com>
Mon, 9 Jul 2018 07:08:45 +0000 (07:08 +0000)
committerJacek Olesiak <jolesiak@google.com>
Mon, 9 Jul 2018 07:08:45 +0000 (07:08 +0000)
commit15e70438359dad2206c30f87afc1c4f6cb063b5e
tree083b6aa0ce1db6ca383afd0875858707755948ae
parent33d0472e942860cca83bff49a8c65031a2e583c4
[clang-format/ObjC] Put ObjC method arguments into one line when they fit

Reapply D47195:
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@336521 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Format/ContinuationIndenter.cpp
unittests/Format/FormatTestObjC.cpp