[clang] [clang-format] Fix a bug in annotating TrailingReturnArrow (PR #69249)

Björn Schäpers via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 17 14:40:35 PDT 2023


================
@@ -3497,6 +3497,15 @@ void TokenAnnotator::calculateFormattingInformation(AnnotatedLine &Line) const {
           Tok->setType(TT_TrailingReturnArrow);
           break;
         }
+        if (Tok->isNot(TT_TrailingAnnotation))
----------------
HazardyKnusperkeks wrote:

But why? If there is no `Next` or it isn't a `l_paren` we also `continue`, shouldn't all that match to `TT_TrailingAnnotation`?

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


More information about the cfe-commits mailing list