clang-format provides strange formatting for an expression that involves a member function call on an rvalue constructed with aggregate initialization. For example:
return MyStruct{
foo,
bar,
baz,
}
.some_method();
The indentation of the trailing method call compared to the initializers and the closing brace is surprising. Compare this with what you get with the parenthesized version, even if you force one line per constructor argument:
return MyStruct( //
foo, //
bar, //
baz)
.some_method();
On that analogy I would expect something more like this:
clang-format provides strange formatting for an expression that involves a member function call on an rvalue constructed with aggregate initialization. For example:
The indentation of the trailing method call compared to the initializers and the closing brace is surprising. Compare this with what you get with the parenthesized version, even if you force one line per constructor argument:
On that analogy I would expect something more like this: