[PATCH] D158415: [Lex] Handle repl_input_end in Preprocessor::LexTokensUntilEOF()

Jonas Hahnfeld via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 15 05:33:56 PDT 2023


Hahnfeld updated this revision to Diff 556849.
Hahnfeld retitled this revision from "[Lex] Handle repl_input_end in Preprocessor::LexAll()" to "[Lex] Handle repl_input_end in Preprocessor::LexTokensUntilEOF()".
Hahnfeld added a comment.

Rebase on D158413 <https://reviews.llvm.org/D158413>


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158415/new/

https://reviews.llvm.org/D158415

Files:
  clang/lib/Lex/Preprocessor.cpp


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);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158415.556849.patch
Type: text/x-patch
Size: 475 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230915/90fbd3b4/attachment-0001.bin>


More information about the cfe-commits mailing list