================
@@ -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);
+  };
----------------
anutosh491 wrote:

Yeah, that's looks better.

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