BracketAlignmentStyle: Break before closing parenthesis

Viewed 1397

Combining the AlignAfterOpenBracket (BracketAlignmentStyle) option with BinPackArguments and BinPackParameters set to false, it's possible to get the following formatting:

someShortFunction(argument);
someVeryVeryVeryLongFunction(
    argument1,
    argument2,
    argument3,
    argument4);

However, similar to BreakBeforeBraces, I'd like to break before the closing parenthesis:

someShortFunction(argument);
someVeryVeryVeryLongFunction(
    argument1,
    argument2,
    argument3,
    argument4
);

Is this possible with the existing options?

1 Answers

It's not possible with the current clang options. However, there is a patch proposed that adds this change. It was stale for a long time, so it probably wouldn't get added any time soon. You still can use the patched version for your purposes. Here is a clang fork with the patch applied.

Related