Re: [clang-format] BinPack and all arguments on next line.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Re: [clang-format] BinPack and all arguments on next line.

Robinson, Paul via cfe-dev
On 16-Nov-17 22:37, Philippe Groarke via cfe-dev wrote:

> Hello, I will be working on a patch to add a feature I need in my code formatting. Before putting in the
> time, I'd like to make sure the idea is welcomed and/or someone isn't already working on the same.
> Maybe the feature already exists and I haven't found how to turn it on.
> With BinPackArguments true, when a multiline call is parsed, a break will be added after the left paren if
> clang-format can fit everything in a single line. I wish to add an option to stop this behaviour.
> Ex :
>    do_something(loooooooooooooooooooooooooooooooooooooooooooooooooooong, message);
> current results :
>    do_something(
>                 loooooooooooooooooooooooooooooooooooooooooooooooooooong, message);
> desired results :
>     do_something(loooooooooooooooooooooooooooooooooooooooooooooooooooong,
>                  message);
> I am not sure if that is what AllowAllParametersOfDeclarationOnNextLine: false is supposed to do for
> declarations (it doesn't work here). If it is, then I'd like to fix that option and add a new
> AllowAllArgumentsOnNextLine option. If it isn't (broken), then I'll figure some other name and also add
> an equivalent option to parameters.
> Good day

Hi Philippe,

as a new clang-format user, I've been searching for this exact thing for some time now. So, _personally_, I'd welcome it very much!

Did you already start anything?


Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0,
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
cfe-dev mailing list
[hidden email]