llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang Author: Jonas Hahnfeld (hahnjo) <details> <summary>Changes</summary> 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. --- Full diff: https://github.com/llvm/llvm-project/pull/102450.diff 1 Files Affected: - (modified) clang/lib/Parse/Parser.cpp (-5) ``````````diff 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: `````````` </details> https://github.com/llvm/llvm-project/pull/102450 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits