================
@@ -1334,12 +1334,15 @@ unsigned ContinuationIndenter::getNewLineColumn(const 
LineState &State) {
            Style.IndentWidth;
   }
 
-  if (Style.BraceWrapping.BeforeLambdaBody &&
-      Style.BraceWrapping.IndentBraces && Current.is(TT_LambdaLBrace)) {
+  if (Style.BraceWrapping.BeforeLambdaBody && Current.is(TT_LambdaLBrace)) {
+    const auto Nested = Current.NestingLevel != 0;
     const auto From = Style.LambdaBodyIndentation == FormatStyle::LBI_Signature
                           ? CurrentState.Indent
                           : State.FirstIndent;
-    return From + Style.IndentWidth;
+    const auto Indent =
+        (Style.BraceWrapping.IndentBracesLambdaNested && Nested) ||
+        (Style.BraceWrapping.IndentBracesLambdaUnnested && !Nested);
+    return From + (Indent * Style.IndentWidth);
----------------
rmarker wrote:

I don't think so. The indentation consideration has been moved from 
`IndentBraces` to `IndentBracesLambdaNested` and `IndentBracesLambdaUnnested`.
Also, either way, if it were to continue, it would just return in the next 
condition below.
When I looked into it, it appeared that the result would be the same. I.e. 
returning either `State.FirstIndent` or `CurrentState.Indent`, just without the 
possibility of indenting.
I figure that just having it all handled here makes things simpler.

https://github.com/llvm/llvm-project/pull/143249
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to