Clang format: force parameters to one-line-each even if the statement does NOT overflow


Is there any options of clang format enforcing one parameter per line even if the statement does NOT overflow? For example,

int add(int a,
        int b,
        int c)
    return a + b + c;

I have tried every related option on Clang-Format Style Options — Clang 16.0.0git documentation

Emphasis: The key point is “parameter ALWAYS one per line”, even if they are short enough to be fit in one line!

1 Like

As for as I known, Clion has this option “Wrap always” in Function declaration parameters. This is exactly what I need!

I’ve run into this exact issue and added a feature request at:

Hopefully someone will address this soon.

1 Like