[clang] [clang-format] Wrap and indent lambda braces in GNU style (PR #135479)
Owen Pan via cfe-commits
cfe-commits at lists.llvm.org
Sat Apr 12 03:55:53 PDT 2025
================
@@ -1334,6 +1334,11 @@ unsigned ContinuationIndenter::getNewLineColumn(const LineState &State) {
Style.IndentWidth;
}
+ if (Style.BraceWrapping.BeforeLambdaBody &&
+ Style.BraceWrapping.IndentBraces && Current.is(TT_LambdaLBrace)) {
+ return CurrentState.Indent + Style.IndentWidth;
+ }
----------------
owenca wrote:
> It might also be worth extracting the handling for `TT_LambdaLBrace` from the `if` just below and putting it here to keep it all together?
Not sure if it'd be worthwhile, but that can be done in another NFC patch.
https://github.com/llvm/llvm-project/pull/135479
More information about the cfe-commits
mailing list