Skip to content

Commit

Permalink
[Lex] Handle repl_input_end in Preprocessor::LexTokensUntilEOF()
Browse files Browse the repository at this point in the history
This fixes many unit tests when trying to enable IncrementalExtensions
by default for testing purposes.

Differential Revision: https://reviews.llvm.org/D158415
  • Loading branch information
hahnjo committed Oct 5, 2023
1 parent 6180964 commit abb9eb2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion clang/lib/Lex/Preprocessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,8 @@ void Preprocessor::LexTokensUntilEOF(std::vector<Token> *Tokens) {
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);
Expand Down

0 comments on commit abb9eb2

Please sign in to comment.