From e3b557809604d036af6e00c60f012c2025b59a5e Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 11 Feb 2023 13:38:04 +0100 Subject: Vendor import of llvm-project main llvmorg-16-init-18548-gb0daacf58f41, the last commit before the upstream release/17.x branch was created. --- clang/lib/Interpreter/IncrementalParser.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'clang/lib/Interpreter/IncrementalParser.cpp') diff --git a/clang/lib/Interpreter/IncrementalParser.cpp b/clang/lib/Interpreter/IncrementalParser.cpp index db854c4161b4..373e2844b4e4 100644 --- a/clang/lib/Interpreter/IncrementalParser.cpp +++ b/clang/lib/Interpreter/IncrementalParser.cpp @@ -59,18 +59,22 @@ public: CI.getFrontendOpts().ProgramAction); return Act; case frontend::ASTDump: - LLVM_FALLTHROUGH; + [[fallthrough]]; case frontend::ASTPrint: - LLVM_FALLTHROUGH; + [[fallthrough]]; case frontend::ParseSyntaxOnly: Act = CreateFrontendAction(CI); break; case frontend::PluginAction: - LLVM_FALLTHROUGH; + [[fallthrough]]; case frontend::EmitAssembly: - LLVM_FALLTHROUGH; + [[fallthrough]]; + case frontend::EmitBC: + [[fallthrough]]; case frontend::EmitObj: - LLVM_FALLTHROUGH; + [[fallthrough]]; + case frontend::PrintPreprocessedInput: + [[fallthrough]]; case frontend::EmitLLVMOnly: Act.reset(new EmitLLVMOnlyAction(&LLVMCtx)); break; @@ -97,7 +101,6 @@ public: CompletionConsumer = &CI.getCodeCompletionConsumer(); Preprocessor &PP = CI.getPreprocessor(); - PP.enableIncrementalProcessing(); PP.EnterMainSourceFile(); if (!CI.hasSema()) @@ -170,9 +173,6 @@ IncrementalParser::ParseOrWrapTopLevelDecl() { Sema::ModuleImportState ImportState; for (bool AtEOF = P->ParseFirstTopLevelDecl(ADecl, ImportState); !AtEOF; AtEOF = P->ParseTopLevelDecl(ADecl, ImportState)) { - // If we got a null return and something *was* parsed, ignore it. This - // is due to a top-level semicolon, an action override, or a parse error - // skipping something. if (ADecl && !Consumer->HandleTopLevelDecl(ADecl.get())) return llvm::make_error("Parsing failed. " "The consumer rejected a decl", -- cgit v1.2.3