Skip to content

Commit 771c93e

Browse files
Merge pull request #10924 from AnthonyLatsis/stable/20250601
[stable/20250601] Revert "[clang] Remove dead incremental Parser code (llvm#102450)"
2 parents 428bc15 + 7f15022 commit 771c93e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

clang/lib/Parse/Parser.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,11 @@ bool Parser::ParseTopLevelDecl(DeclGroupPtrTy &Result,
629629
Sema::ModuleImportState &ImportState) {
630630
DestroyTemplateIdAnnotationsRAIIObj CleanupRAII(*this);
631631

632+
// Skip over the EOF token, flagging end of previous input for incremental
633+
// processing
634+
if (PP.isIncrementalProcessingEnabled() && Tok.is(tok::eof))
635+
ConsumeToken();
636+
632637
Result = nullptr;
633638
switch (Tok.getKind()) {
634639
case tok::annot_pragma_unused:

0 commit comments

Comments
 (0)