================ @@ -803,6 +803,51 @@ void ContinuationIndenter::addTokenOnCurrentLine(LineState &State, bool DryRun, return !Tok.Previous->isOneOf(TT_CastRParen, tok::kw_for, tok::kw_while, tok::kw_switch); }; + auto IsLambdaParameterList = [](const FormatToken *Tok) { + // adapted from TokenAnnotator.cpp:isLambdaParameterList() + // Skip <...> if present. + if (Tok->Previous && Tok->Previous->is(tok::greater) && + Tok->Previous->MatchingParen && + Tok->Previous->MatchingParen->is(TT_TemplateOpener)) { + Tok = Tok->Previous->MatchingParen; + } + + // Check for `[...]`. + return Tok->Previous && Tok->Previous->is(tok::r_square) && + Tok->Previous->MatchingParen && + Tok->Previous->MatchingParen->is(TT_LambdaLSquare); + }; ---------------- owenca wrote:
Delete. https://github.com/llvm/llvm-project/pull/93140 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits