================
@@ -2823,7 +2823,13 @@ void PragmaSupportHandler<StartTok, EndTok, 
UnexpectedDiag>::HandlePragma(
   Tok.setKind(StartTok);
   Tok.setLocation(Introducer.Loc);
 
-  while (Tok.isNot(tok::eod) && Tok.isNot(tok::eof)) {
+  auto IsAtInputEnd = [&PP](const Token &T) {
+    if (PP.getLangOpts().IncrementalExtensions)
+      return T.is(tok::annot_repl_input_end);
+    return T.is(tok::eof);
+  };
----------------
vgvassilev wrote:

Sure, but then the new routine you added in the parser does not depend on the 
parser state. It can be either static or be put in a shared place.

https://github.com/llvm/llvm-project/pull/127569
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to