Before:
someFunction(new Runnable() { public void run() { System.out.println(42);
}
});
After:
someFunction(new Runnable() {
public void run() {
System.out.println(42);
}
});
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225142
91177308-0d34-0410-b5e6-
96231b3b80d8
switch (FormatTok->Tok.getKind()) {
case tok::l_paren:
parseParens();
+ if (Style.Language == FormatStyle::LK_Java && FormatTok->is(tok::l_brace))
+ parseChildBlock();
break;
case tok::r_paren:
nextToken();
case tok::l_square:
tryToParseLambda();
break;
- case tok::l_brace: {
+ case tok::l_brace:
if (!tryToParseBracedList()) {
parseChildBlock();
}
break;
- }
case tok::at:
nextToken();
if (FormatTok->Tok.is(tok::l_brace))
" System.out.println(42);\n"
" }\n"
"}, someOtherParameter);");
+ verifyFormat("someFunction(new Runnable() {\n"
+ " public void run() {\n"
+ " System.out.println(42);\n"
+ " }\n"
+ "});");
verifyFormat("someObject.someFunction(\n"
" new Runnable() {\n"
" @Override\n"