Skip to content

Commit b1500eb

Browse files
authored
Merge pull request #10550 from AnthonyLatsis/revert-undead-code
Revert "[clang] Remove dead incremental Parser code (llvm#102450)"
2 parents db6d46c + d1b97cb commit b1500eb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

clang/lib/Parse/Parser.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,11 @@ bool Parser::ParseTopLevelDecl(DeclGroupPtrTy &Result,
635635
Sema::ModuleImportState &ImportState) {
636636
DestroyTemplateIdAnnotationsRAIIObj CleanupRAII(*this);
637637

638+
// Skip over the EOF token, flagging end of previous input for incremental
639+
// processing
640+
if (PP.isIncrementalProcessingEnabled() && Tok.is(tok::eof))
641+
ConsumeToken();
642+
638643
Result = nullptr;
639644
switch (Tok.getKind()) {
640645
case tok::annot_pragma_unused:

0 commit comments

Comments
 (0)