[clang] [clang-format] fix incorrectly indents lambda trailing return (PR #94560)

Björn Schäpers via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 6 12:29:05 PDT 2024


================
@@ -1457,6 +1457,11 @@ unsigned ContinuationIndenter::getNewLineColumn(const LineState &State) {
       !Current.isOneOf(tok::colon, tok::comment)) {
     return ContinuationIndent;
   }
+  if (Style.isCpp() && Current.is(tok::arrow) &&
----------------
HazardyKnusperkeks wrote:

```suggestion
  if (Style.isCpp() && Current.is(TT_TrailingReturnArrow) &&
```
This is what you need, right?

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


More information about the cfe-commits mailing list