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

Jonas Hahnfeld via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 5 03:09:48 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rGabb9eb2778dc: [Lex] Handle repl_input_end in Preprocessor::LexTokensUntilEOF() (authored by Hahnfeld).

Changed prior to commit:
  https://reviews.llvm.org/D158415?vs=556849&id=557607#toc

Repository:
  rG LLVM Github Monorepo

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
@@ -1002,7 +1002,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.557607.patch
Type: text/x-patch
Size: 477 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20231005/2a0e3de0/attachment.bin>


More information about the cfe-commits mailing list