diff options
author | Jacek Olesiak <jolesiak@google.com> | 2018-02-07 10:35:08 +0000 |
---|---|---|
committer | Jacek Olesiak <jolesiak@google.com> | 2018-02-07 10:35:08 +0000 |
commit | fb7f5c08b91246935c1e226dab13bb4259e11743 (patch) | |
tree | abfc38b514ea9cf5b9af5c4a89bcc19a1d77e1de /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | 7244159b821c271fb426aeac9c79910ee9c1820d (diff) | |
download | llvm-fb7f5c08b91246935c1e226dab13bb4259e11743.zip llvm-fb7f5c08b91246935c1e226dab13bb4259e11743.tar.gz llvm-fb7f5c08b91246935c1e226dab13bb4259e11743.tar.bz2 |
[clang-format] Fix ObjC message arguments formatting.
Summary:
Fixes formatting of ObjC message arguments when inline block is a first
argument.
Having inline block as a first argument when method has multiple parameters is
discouraged by Apple:
"It’s best practice to use only one block argument to a method. If the
method also needs other non-block arguments, the block should come last"
(https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithBlocks/WorkingwithBlocks.html#//apple_ref/doc/uid/TP40011210-CH8-SW7),
it should be correctly formatted nevertheless.
Current formatting:
```
[object blockArgument:^{
a = 42;
}
anotherArg:42];
```
Fixed (colon alignment):
```
[object
blockArgument:^{
a = 42;
}
anotherArg:42];
```
Test Plan: make -j12 FormatTests && tools/clang/unittests/Format/FormatTests
Reviewers: krasimir, benhamilton
Reviewed By: krasimir, benhamilton
Subscribers: benhamilton, klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D42493
llvm-svn: 324469
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions