aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Interpreter/IncrementalParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Interpreter/IncrementalParser.cpp')
-rw-r--r--clang/lib/Interpreter/IncrementalParser.cpp18
1 files changed, 9 insertions, 9 deletions
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<llvm::StringError>("Parsing failed. "
"The consumer rejected a decl",