Skip to content

Commit abb9eb2

Browse files
committed
[Lex] Handle repl_input_end in Preprocessor::LexTokensUntilEOF()
This fixes many unit tests when trying to enable IncrementalExtensions by default for testing purposes. Differential Revision: https://reviews.llvm.org/D158415
1 parent 6180964 commit abb9eb2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clang/lib/Lex/Preprocessor.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1002,7 +1002,8 @@ void Preprocessor::LexTokensUntilEOF(std::vector<Token> *Tokens) {
10021002
while (1) {
10031003
Token Tok;
10041004
Lex(Tok);
1005-
if (Tok.isOneOf(tok::unknown, tok::eof, tok::eod))
1005+
if (Tok.isOneOf(tok::unknown, tok::eof, tok::eod,
1006+
tok::annot_repl_input_end))
10061007
break;
10071008
if (Tokens != nullptr)
10081009
Tokens->push_back(Tok);

0 commit comments

Comments
 (0)