Skip to content

Commit 67cb040

Browse files
authored
[clang] Remove dead incremental Parser code (#102450)
When incremental processing is enabled, the Parser will never report tok::eof but tok::annot_repl_input_end. However, that case is already taken care of in IncrementalParser::ParseOrWrapTopLevelDecl() so this check was never executing.
1 parent 8410bab commit 67cb040

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

clang/lib/Parse/Parser.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -629,11 +629,6 @@ 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-
637632
Result = nullptr;
638633
switch (Tok.getKind()) {
639634
case tok::annot_pragma_unused:

0 commit comments

Comments
 (0)