mitchell-stellar added inline comments.
================ Comment at: clang/lib/Format/TokenAnnotator.cpp:847 case tok::kw_while: - assert(!Line.startsWith(tok::hash)); - if (Tok->is(tok::kw_if) && CurrentToken && - CurrentToken->isOneOf(tok::kw_constexpr, tok::identifier)) - next(); - if (CurrentToken && CurrentToken->is(tok::l_paren)) { - next(); - if (!parseParens(/*LookForDecls=*/true)) - return false; + if (!Line.startsWith(tok::hash)) { + if (Tok->is(tok::kw_if) && CurrentToken && ---------------- It's not clear to me whether or not the token should be consumed. The previous assertion leads me to think no, and in that case, I think this should be ``` if (Line.startsWith(tok::hash)) return false; ``` A comment on this would also be helpful. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68707/new/ https://reviews.llvm.org/D68707 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits