<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/79132>79132</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [feature request] [clang-format] Put brace on new line in constructor after multi-line member initializer list
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang-format
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          flyx
      </td>
    </tr>
</table>

<pre>
    To separate a constructor's member initializer list from its body, I'd like to use this style:

```c++
// short, all in one line, currently possible.
MyClass::MyClass(int val): val{val} {
    // body
}

// member initializers don't fit on one line.
// separate initializers from body by putting
// brace on new line, currently not possible.
MyClass::MyClass(int someValue, int anotherValue):
 some_value{some_value}, another_value{another_value}
{
    // body
}

// multi-line arguments, but inline initializers.
// currently possible.
MyClass::MyClass(
    int argumentWithVeryDetailedName
): val{argumentWithVeryDetailedName} {
 // body
}

// both multi-line arguments and multi-line initializers.
// as before, the brace on a new line is not possible.
MyClass::MyCLass(
    int argumentWithVeryDetailedName
):
 fieldWithVeryDetailedName{argumentWithVeryDetailedName}
{
    // body
}
```

So, the `{` should be on a new line if and only the member initializers are not inline. Currently, clang-format always puts it at the end of the line of the last initializer.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykVVGP4zQQ_jXOy2ir1EnX7UMerldVQgKEBDoe0SSZNAbHLvZ4j_Drkd12N2X34BakKrXHnvlmPn_2YAj6ZIkasdmLzaHAyKPzzWDmP4rW9XPzk4NAZ_TIBAids4F97Nh5IVWAiaaWPGirWaPRf5IHowPD4N0EmgOkGEJ-hG-EVD0Y_RsBO4iBgEcdIPBsSFQfRHkQ5e37WF5-nZD79LtY5VHII4TReU4B0RjQFpwlMNpSMnXRe7JsZji7EHRraHXx_W7-aDCEhFM9T-RWW4YnNELuRPUhj9Q-fw8g1BUWAOAKnUu55KIOdwlf1l9zEaB3VkjFMGgG95Lt6r6mG793rpnChAntDOfIrO3pzq312FGKaunzGxxYx-_gIbiJPqGJOUgyoHU8kr_ads9nlHf-8pTNar-cHPKxXNyeN_xtfuPtv9AbDeuHVCegP8WJLIeE2EYGbbN9yd89xe-Vxkt2mYsr3s-ax0_k5wMxakP99zjRDWahoX_cfieuryy9dTy-WT-g7ZcLXyYAA7Q0OJ_Pl0d6UQ8-6wd0-BrVfPt_KLp6DZpM_zY__0bf-xR0e0uWrP7obiSkBbUXj2V6V6LpoX1FyZA5dtbM2eOtS46eMm8XFa7g401s-UIatKeHwfkJGdB8xjmk2xxAMyDnmJQAhjzMmLcxBl4CrYq-qfpdtcOCmrUqH8v15nG7LcamVKoe2nKnaNcPnaplJdVatai6dVf3kgrdyFLW5VpW62pd19tVu93ippObSkmFaleLuqQJtVkZ8zStnD8VOoRIjdqtK1kYbMmE3CKkXBYkpExNwzfJ7aGNpyDqMjWA8BKINZvcXgZCjp7A0--RAovNAcRmfxduc4AfIr9-2dJLv2g9gAOTXwr_C32oiN40I_M5qzer5KR5jO2qc5OQx5Tk9e_h7N2v1LGQx1x6EPKYq_8rAAD__25eRSo">