<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/58959>58959</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[format] How to control struct init formatting?
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
MaJerle
</td>
</tr>
</table>
<pre>
I have a C code, that is currently formatted as follows:
```c
static const my_struct_type_t action_271 = {
.id = 271,
.type = "output_on",
.params =
{
.output =
{
.output = &outputs[3],
.lvl = 0,
.lvl_min = 0,
.lvl_max = 1,
},
},
};
```
I'd like to make it as follows:
```c
static const my_struct_type_t action_271 = {
.id = 271,
.type = "output_on",
.params = {
.output = {
.output = &outputs[3],
.lvl = 0,
.lvl_min = 0,
.lvl_max = 1,
},
},
};
```
That means:
- Opening bracket in the same line as "equal" sign
- Indent one more to the left
- Closing bracket in-line with opening keyword
Which clang-format option controls this option?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzVVMFu2zAM_Rr7IiSwpdpxDj6sLYp1wLDLgB0DWaZjrbKUSXSz_P0ou0GTZlu64wTBEqlH6kGPZuPaQ_3IevkMTLI7plwLCb9j2EtkOjA1eg8WzYF1zg8SEVomAxnGuH1IxIcku0-y47fM5qlmO6BErSinDciGwyagHxVu8LCDDTKpUDu74aucJeKeJavbOYrRWOp2ctIhsTnxx9gZzrkbcTfixlnan6N20sshRNyrM46zO45jOee5RP816jfRxKmcrZAUtyIp7s9YXUSaZzOFZVdhm0Hbd0Plzwma_xGarC6JnfriXty-kfRU58eEr1pm9BMwdGyQtGr8r8riUtMzHa-UyTuFviLwO4S9IuhbIf9JxK_xDx9A2rdyLdiXHVhtt6zxUj0B9QFL_QBYkAOQ6hai1PS48GOUhlYW9NYeYx9tS_2COUINzk8FEmMNdHiE3BkXztMvpqx7jT1zL3c_wWHvfHtK7FuvVc-UkXa7mLsRoWOxxFJC70ygq6hnzc5EPKRQ52VZCV4VlUjbWrRrsZYpajRQk3JzEpKPfXT7yPQlD5srkohRWb_0PeIUM47e1D3ibno0_kBzS6zHZqncQIYxz8dlsfPuOygkU4cwQqBNUa2LddrXzQ1fq1Ktiq4rFS-ga5SqJIcOVJ6LMk-NbMCEyJHYpbrmGec5HWWVKLlYZiJbdyCqrmsqLm4guclgkNos48VL57eprycOzbgNdGh0wPB6KENUDOCYX47YO19_lp_AG0gnuvXE9RdLD6y5">