[clang-format] Allow custom BraceWrapping to be based on existing BreakBeforeBraces style

My current .clang-format uses BreakBeforeBraces: Allman but it doesn’t break before the lambda body. In clang-format-11 there’s a BraceWrapping.BeforeLambdaBody option for that. However, it requires BreakBeforeBraces: Custom and now I need to specify 17 parameters to get Allman + break before lambda behavior. Possible solutions to this:

  1. Fix Allman style to break before the lambda body.
  2. Don’t require BreakBeforeBraces: Custom and allow BraceWrappingFlags to override selected BreakBeforeBracesStyle.
  3. Keep BreakBeforeBraces: Custom requirement but introduce BraceWrappingFlags.BasedOnStyle option. It will work just as the 2nd option but in a non-breaking-change way, e.g. in existing configs with both non-Custom BreakBeforeBraces and BraceWrapping options the latter will be ignored.

If this is not the right place for a feature request please point me in the right direction.

Hi,

please take a look at https://reviews.llvm.org/D94906 if that's what you need. If possible please provide a link to a definition of Allman for Lambdas. A quick search did not result in anything.

Kind regards,
Björn.