================ @@ -3497,6 +3497,15 @@ void TokenAnnotator::calculateFormattingInformation(AnnotatedLine &Line) const { Tok->setType(TT_TrailingReturnArrow); break; } + if (Tok->isNot(TT_TrailingAnnotation)) ---------------- owenca wrote:
Before: look for _any_ arrow after the `r_paren` of the function declaration. Now: look for any arrow _except_ when inside the parentheses after a `TT_TrailingAnnotation`. The case where `Next` is `nullptr` is handled by the condition of the `for` loop whereas any tokens (including non-`l_parens`) before a `TT_TrailingAnnotation` should be skipped as before. https://github.com/llvm/llvm-project/pull/69249 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits