I'm using clang-format 10.0 and I'm trying to get a designated initializer function macro to get formatted and I can't seem to get it working. My structures are formatted as intended, looking along the lines of
struct_type foo = {
.bar1 = x,
.bar2 = y,
}
Here comes the tricky part that doesn't work. To initialize some of these structures with default values, I'm using macros that look like this:
#define STRUCT_TYPE_FOO_DEFAULT() { \
.bar1 = x_default, \
.bar2 = y_default, \
}
For some reason, those macros are always getting formatted looking like this:
#define STRUCT_TYPE_FOO_DEFAULT() \
{ \
.bar1 = x_default, .bar2 = y_default, \
}
What options should I modify to get the desired result?