curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land.
LGTM. ================ Comment at: clang/lib/Format/FormatTokenLexer.cpp:440-441 - if (First[2]->is(tok::less) || First[1]->isNot(tok::less) || - First[0]->isNot(tok::less) || FourthTokenIsLess) + if (Y->is(tok::less) || First[1]->isNot(tok::less) || + First[0]->isNot(tok::less) || (X && X->is(tok::less))) return false; ---------------- To go a bit further, could we move `First[1]->isNot(tok::less) || First[0]->isNot(tok::less)` into its own `if` around the top of the function? Sth like: ``` if (Tokens.size() < 3) return false; auto First = Tokens.end() - 3; if (First[0]->isNot(tok::less) || First[1]->isNot(tok::less)) return false; ``` ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117759/new/ https://reviews.llvm.org/D117759 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits