Index: clang/lib/Lex/Preprocessor.cpp =================================================================== --- clang/lib/Lex/Preprocessor.cpp +++ clang/lib/Lex/Preprocessor.cpp @@ -999,7 +999,8 @@ while (1) { Token tok; Lex(tok); - if (tok.isOneOf(tok::unknown, tok::eof, tok::eod)) + if (tok.isOneOf(tok::unknown, tok::eof, tok::eod, + tok::annot_repl_input_end)) break; if (Tokens != nullptr) Tokens->push_back(tok);