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

Björn Schäpers via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 7 12:34:04 PDT 2024


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

I also think you can drop the `isCpp`.

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


More information about the cfe-commits mailing list