<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/54220>54220</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang-format feature request: Ability to break declaration parameters based on number of parameters
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
robertankeney
</td>
</tr>
</table>
<pre>
I would like to have the option in clang-format to always show one parameter per line for a function declaration. At present, when BinPackParameters is false and the function declaration exceeds the current ColumnLimit, this occurs. For example, for:
void myFunction(int param1, int param2, int param3, int param4, int param5, int param6, int param7)
If ColumnLimit is 80, clang-format will convert it to:
void myFunction(int param1,
int param2,
int param3,
int param4,
int param5,
int param6,
int param7)
Having the option to make this happen when you have more than X parameters (regardless of line length) would be a great step forward.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyVU8FuozAQ_Rq4jIoohJAcOKStoq20hx73OuABvDE2a5vQ_P2OSbsp0mq1QRA8mec3b_Cb2ohL9QqzmZQAJU8E3kCPZ373BGb00miQGhqFuntojR3QBwiqGS8OXG9mMJpgRIsDebIw8qMk_8VgQGgn3SwkgpjDYlgncPAwWnKkfZQ9w9yThiep37A5vX0SOZAOWlSOALVY5PyNC-i9IRJuATSTtcwJz0ZNg_4uB7nw-56pTMNZl8CRZdE7DqOikGOVUX6I0pcoPZyNFDBcjh9lomwnmWxp7TFg_0TZKspX0WYVFatou4rKKNtfC19_X9uvwkP7uzRsWH37WSoFjdFnsgwJZ_G_8q8g-Me16u8OeH4ffHMfvLgPvr0PfjuEb3iWuvvqe_b5gGEkgn96HEe26eLVi5muQzIYG9Ko4cdtBBzwp7fUoRWKHDuvvQ6EIt35nut9jFvNzobOEp-q8zQGK868J7nKiUWVi32-x9hLr6hauaDlTROXtvRrIufZAnCopZL-EkTXzHlaDckXbTU6EjyzoKeh5llldbdsPFlV9d6PLrgqO_LdSd9PddKYgQOlzp-vh9Gan9TwgB2lc6yCF8Umy9K4r7Z7bB9xW7ZFmRb1tskofRSbvBT5RhTNLosV1qRcFRVPUZZpmmGh4HVUvMSyylLmydMi5atIk33Z1Pt9UZYF5mJXptEmpQGlSoKOxNguttUiqZ46x0klnXe3JDonO020lGN-nHxvbGUNt-9Rn0jTJV4EVEsDvwEAd5hZ">