[go: up one dir, main page]

Skip to content

Missing indentation for C++ struct designated initializers (when multiline)

Hello, I am interesting in updating from version 3.1 to the latest (currently 3.6.4). I am encountering a few problematic differences in behavior; this issue is about one of them. Thanks in advance!

Input file test.cpp:

myStruct_t var =
{
.field = (1 +
2)
};

Output of astyle --style=allman --indent=tab=4 test.cpp in version 3.1:

myStruct_t var =
{
	.field = (1 +
	          2)
};

Output of astyle --style=allman --indent=tab=4 test.cpp in version 3.6.4:

myStruct_t var =
{
	.field = (1 +
	2)
};