Before:
string abc =
SomeFunction(
aaaaaaaaaaaaa, aaaaa,
[]() { SomeOtherFunctioooooooooooooooooooooooooon(); });
After:
string abc = SomeFunction(
aaaaaaaaaaaaa, aaaaa, []() {
SomeOtherFunctioooooooooooooooooooooooooon();
});
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215197
91177308-0d34-0410-b5e6-
96231b3b80d8
return 100;
if (Left.is(tok::equal) && InFunctionDecl)
return 110;
+ if (Right.is(tok::r_brace))
+ return 1;
if (Left.opensScope())
return Left.ParameterCount > 1 ? Style.PenaltyBreakBeforeFirstCallParameter
: 19;
"}");
verifyFormat("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(\n"
" [](const aaaaaaaaaa &a) { return a; });");
+ verifyFormat("string abc = SomeFunction(aaaaaaaaaaaaa, aaaaa, []() {\n"
+ " SomeOtherFunctioooooooooooooooooooooooooon();\n"
+ "});");
// Lambdas with return types.
verifyFormat("int c = []() -> int { return 2; }();\n");