[cfe-dev] [clang-format] BinPack and all arguments on next line.
Philippe Groarke via cfe-dev
cfe-dev at lists.llvm.org
Sat Sep 23 15:18:34 PDT 2017
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
More information about the cfe-dev
mailing list