I work on a GNU-style code base that uses C++. My test config uses BreakBeforeBraces: GNU because it seems impossible to replicate real GNU-style behavior with BreakBeforeBraces: Custom (in particular conditionally applying IndentBraces).
I think this setting should cause a line break before the { of a lambda.
Test code:
int f(int y) {
auto x = [&]() {
for (int i = 0; i < y; ++i)
return 97;
};
return x();
}
clang-format config:
Actual output:
int f(int y)
{
auto x = [&]() {
for (int i = 0; i < y; ++i)
return 97;
};
return x();
}
Expected output:
int f(int y)
{
auto x = [&]()
{
for (int i = 0; i < y; ++i)
return 97;
};
return x();
}