Before:
Constructor()
: Constructor([] { // comment
int i;
}) {}
After:
Constructor()
: Constructor([] { // comment
int i;
}) {}
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225625
91177308-0d34-0410-b5e6-
96231b3b80d8
// ^ line up here.
State.Stack.back().Indent =
State.Column + (Style.BreakConstructorInitializersBeforeComma ? 0 : 2);
+ State.Stack.back().NestedBlockIndent = State.Stack.back().Indent;
if (Style.ConstructorInitializerAllOnOneLineOrOnePerLine)
State.Stack.back().AvoidBinPacking = true;
State.Stack.back().BreakBeforeParameter = false;
verifyFormat("string abc = SomeFunction(aaaaaaaaaaaaa, aaaaa, []() {\n"
" SomeOtherFunctioooooooooooooooooooooooooon();\n"
"});");
+ verifyFormat("Constructor()\n"
+ " : Field([] { // comment\n"
+ " int i;\n"
+ " }) {}");
// Lambdas with return types.
verifyFormat("int c = []() -> int { return 2; }();\n");