Author: Jonas Hahnfeld Date: 2024-08-09T09:00:23+02:00 New Revision: 67cb04035fe831a3b5df98dabc44b53ba5ff7126
URL: https://github.com/llvm/llvm-project/commit/67cb04035fe831a3b5df98dabc44b53ba5ff7126 DIFF: https://github.com/llvm/llvm-project/commit/67cb04035fe831a3b5df98dabc44b53ba5ff7126.diff LOG: [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. Added: Modified: clang/lib/Parse/Parser.cpp Removed: ################################################################################ diff --git a/clang/lib/Parse/Parser.cpp b/clang/lib/Parse/Parser.cpp index 5ebe71e496a2e8..04c2f1d380bc48 100644 --- a/clang/lib/Parse/Parser.cpp +++ b/clang/lib/Parse/Parser.cpp @@ -629,11 +629,6 @@ bool Parser::ParseTopLevelDecl(DeclGroupPtrTy &Result, Sema::ModuleImportState &ImportState) { DestroyTemplateIdAnnotationsRAIIObj CleanupRAII(*this); - // Skip over the EOF token, flagging end of previous input for incremental - // processing - if (PP.isIncrementalProcessingEnabled() && Tok.is(tok::eof)) - ConsumeToken(); - Result = nullptr; switch (Tok.getKind()) { case tok::annot_pragma_unused: _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits