owenpan requested review of this revision. owenpan marked an inline comment as done. owenpan added inline comments.
================ 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; ---------------- curdeius wrote: > 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; > ``` > ? Good idea. 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