Before:
[self aaaaa:MACRO(a, b :, c :)];
After:
[self aaaaa:MACRO(a, b:, c:)];
llvm-svn: 220197
} else if (Contexts.size() == 1 &&
!Line.First->isOneOf(tok::kw_enum, tok::kw_case)) {
Tok->Type = TT_InheritanceColon;
+ } else if (Tok->Previous->is(tok::identifier) && Tok->Next &&
+ Tok->Next->isOneOf(tok::r_paren, tok::comma)) {
+ // This handles a special macro in ObjC code where selectors including
+ // the colon are passed as macro arguments.
+ Tok->Type = TT_ObjCMethodExpr;
} else if (Contexts.back().ContextKind == tok::l_paren) {
Tok->Type = TT_InlineASMColon;
}
verifyFormat("return in[42];");
verifyFormat("for (id foo in [self getStuffFor:bla]) {\n"
"}");
+ verifyFormat("[self aaaaa:MACRO(a, b:, c:)];");
verifyFormat("[self stuffWithInt:(4 + 2) float:4.5];");
verifyFormat("[self stuffWithInt:a ? b : c float:4.5];");