The ShouldShiftBeAdded lambda checks if extra space should be
added before the wrapped part of a braced list. If the first
element of the list is wrapped, no extra space should be added.
Fixes #55161.
Differential Revision: https://reviews.llvm.org/D124956
Changes[OuterScopeStart - 1].Tok->is(TT_LambdaLBrace))
return false;
}
+ if (Changes[ScopeStart].NewlinesBefore > 0)
+ return false;
return true;
}
"}",
Style);
+ verifyFormat("unsigned i = 0;\n"
+ "int a[] = {\n"
+ " 1234567890,\n"
+ " -1234567890};",
+ Style);
+
Style.ColumnLimit = 120;
// clang-format off