# clang-format: optional change behaviour of placing all function arguments/parameters into the next line

**URL:** <https://discourse.llvm.org/t/clang-format-optional-change-behaviour-of-placing-all-function-arguments-parameters-into-the-next-line/36678>\
**Category:** Clang Frontend\
**Created:** [May 19, 2015, 7:14am UTC](https://discourse.llvm.org/t/clang-format-optional-change-behaviour-of-placing-all-function-arguments-parameters-into-the-next-line/36678 "2015-05-19T07:14:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tilo\_Kuhn](https://avatars.discourse-cdn.com/v4/letter/t/df705f/32.png) [@Tilo\_Kuhn](https://discourse.llvm.org/u/Tilo_Kuhn)\
**Post date:** [May 19, 2015, 7:14am UTC](https://discourse.llvm.org/t/clang-format-optional-change-behaviour-of-placing-all-function-arguments-parameters-into-the-next-line/36678/1 "2015-05-19T07:14:03Z")

</div>

i would like to see an option to format arguments and parameters a bit different.  
at the moment if you have a function definition which doesn’t fit to the current line and all arguments fit to the next line clang-format prefers method (2):

e.g.  
col limit 140:

(1) void FunctionName01234567890(const Argument& a1, const Argument& a2, const Argument& a3, const Argument& a4, const Argument& a5);

(2) void FunctionName01234567890(const Argument& a1, const Argument& a2, const Argument& a3, const Argument& a4, const Argument& a5, const Argument& a6);

(3) void FunctionName01234567890(const Argument& a1, const Argument& a2, const Argument& a3, const Argument& a4, const Argument& a5, const Argument& a6, const Argument& a7);

results in:

(1) void FunctionName01234567890(const Argument& a1, const Argument& a2, const Argument& a3, const Argument& a4, const Argument& a5);

(2) void FunctionName01234567890(  
const Argument& a1, const Argument& a2, const Argument& a3, const Argument& a4, const Argument& a5, const Argument& a6);

(3) void FunctionName01234567890(const Argument& a1, const Argument& a2, const Argument& a3, const Argument& a4, const Argument& a5,  
const Argument& a6, const Argument& a7);

i prefer (1) and (3) and i will never see (2). I would love to get this result:

(2b) void FunctionName01234567890(const Argument& a1, const Argument& a2, const Argument& a3, const Argument& a4, const Argument& a5,  
const Argument& a6);

Q:

- is this just a matter of settings (penalties?)?
- if not, can somebody guide me to the place in the source where the decision is done if all parameters fit to one line? i would like to add an option for that behaviour.

Best regards  
Tilo

my .clang-format settings
