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

    <tr>
        <th>Summary</th>
        <td>
            Add a new option to clang-format for newline before function parameters
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

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

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

<pre>
    The clang-format options available do not allow one to configure a consistent look for function definitions and declarations.

Functions with few parameters tend to have no newlines inserted, while functions with either long names or many parameters have line breaks inserted.

The current state:

```
int
one_liner_function(int arg1, int arg2);

int
super_long_function_name_that_has_line_breaks(
 const custom_type_with_obnoxiously_long_name &first_parameter,
    int second_parameter);
```

The ideal possible:

```
int
one_liner_function(
    int arg1,
 int arg2);

int
super_long_function_name_that_has_line_breaks(
 const custom_type_with_obnoxiously_long_name &first_parameter,
    int second_parameter);
```

Please add an option `AlwaysBreakBeforeFunctionParameters` that is a boolean.

There is a phabricator patch existing for this: https://reviews.llvm.org/D125171
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzclD2PqzoQhn-NaUYbgSFsUlAkZ5X6FLdHAx7AZ42N7CHZ_PsrE_J129sdKQqDP55558UeDEH3lqgS26PYfiU48-B89cePzmibNE5dq38Ggtag7T8650dkcBNrZwPgGbXBxhAoB9YxoDHuAs4SsIPW2U73syfAGAcdmCyDce4bOuehm20bOaCo01avSKtAUWvQ4zKwEemXSA-3_9O6I8BF8wAdXWBCjyMx-QBMVsW8A54JrANLF6MtBdA2kGdSQv6Cy6ANPVKvINI8kAfjbA8WRwrgPIxor6_4BRuB0HjC7yf2TeLi1ex9rDQwMon88DovynT9La_a8i1wluoI9_Vdm5A7bRnQ91kUvsZSyL3Ij6_IByPME_k6VvGA1LGcmgfkesCwZKhv8oXc3XYt34ahnQO7sebrRHU0pXaNdT_azcFcb8yIAiHLTvvA9cMZIX-tIIBFZaDWWfW64EXxe_lPz7QiNDC5EHRj_pdp72JW-9bBv9jE34YwEKBSgHa9oSDK9GAueA3HKPdInfN0v0S_H0dblCnE6kAHQGicM4T2v6fa0216GrDxukV2HibkdgD60YG17ZdLzYMOIj_AwDzFQMiTkCdPZ02XsDHmPG6c74U8fWVym31miapytc_3mFCVlbssT8tM7pKhwm2nik9smhzzNi9KlWGKZfdZ5PumU22b6EqmMk-LTGa53BW7TbYtykzl1KQtbrOyE0VKI2rzyJroEGaqSpnuZWKwIRPubc9XcdFHM_dBFKnRgZ9iE9ZsqDpEZ2NTuZsbW9xrV4zlrz0HmsXqZ4t79pFk9qZ6d6fXPMzNpnWjkKeYdX18TN79oZaFPC3Kg5CnRfy_AQAA__8Oz-O-">