[clang] [clang-format] Disable OuterScope lambda indentation behaviour for constructor initializers (PR #66755)

Owen Pan via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 19 15:49:45 PDT 2023


================
@@ -1955,7 +1955,8 @@ void ContinuationIndenter::moveStatePastScopeCloser(LineState &State) {
 
 void ContinuationIndenter::moveStateToNewBlock(LineState &State) {
   if (Style.LambdaBodyIndentation == FormatStyle::LBI_OuterScope &&
-      State.NextToken->is(TT_LambdaLBrace)) {
+      State.NextToken->is(TT_LambdaLBrace) && State.Line &&
----------------
owenca wrote:

```suggestion
      State.NextToken->is(TT_LambdaLBrace) &&
```

https://github.com/llvm/llvm-project/pull/66755


More information about the cfe-commits mailing list