forked from OSchip/llvm-project
clang-format: [ObjC] Fix spacing in block variable parameters.
Before: { void (^block)(Object * x); } After: { void (^block)(Object *x); } llvm-svn: 220270
This commit is contained in:
parent
38efc13191
commit
f1f267b447
|
@ -127,6 +127,9 @@ private:
|
|||
// The first argument to a foreach macro is a declaration.
|
||||
Contexts.back().IsForEachMacro = true;
|
||||
Contexts.back().IsExpression = false;
|
||||
} else if (Left->Previous && Left->Previous->MatchingParen &&
|
||||
Left->Previous->MatchingParen->Type == TT_ObjCBlockLParen) {
|
||||
Contexts.back().IsExpression = false;
|
||||
}
|
||||
|
||||
if (StartsObjCMethodExpr) {
|
||||
|
|
|
@ -9162,6 +9162,7 @@ TEST_F(FormatTest, FormatsBlocks) {
|
|||
|
||||
verifyFormat("foo(^{ bar(); });");
|
||||
verifyFormat("foo(a, ^{ bar(); });");
|
||||
verifyFormat("{ void (^block)(Object *x); }");
|
||||
|
||||
verifyFormat("[operation setCompletionBlock:^{ [self onOperationDone]; }];");
|
||||
verifyFormat("int i = {[operation setCompletionBlock:^{ [self "
|
||||
|
|
Loading…
Reference in New Issue