owenpan added inline comments.
================ Comment at: clang/lib/Format/UnwrappedLineParser.cpp:1057 + nextToken(); + do { + if (FormatTok->is(tok::colon)) { ---------------- A `while (!eof())` or `while (FormatTok->isNot(tok::eof)` would be safer here just in case the last line is `import` followed by eof. ================ Comment at: clang/lib/Format/UnwrappedLineParser.cpp:1064-1065 + nextToken(); + while (FormatTok && FormatTok->isNot(tok::semi) && + FormatTok->isNot(tok::greater)) { + // Mark tokens up to the trailing line comments as implicit string ---------------- Possible infinite loop here as well. Maybe change it to `while (!FormatTok->isOneOf(tok::greater, tok::semi, tok::eof) {`? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114151/new/ https://reviews.llvm.org/D114151 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits