Skip to content

Commit 74250da

Browse files
authored
Merge pull request #7461 from bnbarham/always-end-translation-unit
[Parse] Always end translation unit
2 parents 12c418a + f247725 commit 74250da

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

clang/lib/Parse/Parser.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -719,8 +719,7 @@ bool Parser::ParseTopLevelDecl(DeclGroupPtrTy &Result,
719719

720720
// Late template parsing can begin.
721721
Actions.SetLateTemplateParser(LateTemplateParserCallback, nullptr, this);
722-
if (!PP.isIncrementalProcessingEnabled())
723-
Actions.ActOnEndOfTranslationUnit();
722+
Actions.ActOnEndOfTranslationUnit();
724723
//else don't tell Sema that we ended parsing: more input might come.
725724
return true;
726725

lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,7 @@ ClangModulesDeclVendor::Create(Target &target) {
670670
arch.GetTriple().str(),
671671
"-fmodules-validate-system-headers",
672672
"-Werror=non-modular-include-in-framework-module",
673+
"-Xclang=-fincremental-extensions",
673674
"-Rmodule-build"};
674675

675676
target.GetPlatform()->AddClangModuleCompilationOptions(
@@ -764,8 +765,6 @@ ClangModulesDeclVendor::Create(Target &target) {
764765
instance->getFrontendOpts().Inputs[0]))
765766
return nullptr;
766767

767-
instance->getPreprocessor().enableIncrementalProcessing();
768-
769768
instance->createASTReader();
770769

771770
instance->createSema(action->getTranslationUnitKind(), nullptr);

lldb/test/API/lang/objc/modules-compile-error/TestModulesCompileError.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def test(self):
2121
"expr @import LLDBTestModule",
2222
error=True,
2323
substrs=[
24-
"module.h:4:1: error: unknown type name 'syntax_error_for_lldb_to_find'",
24+
"module.h:4:1: error: use of undeclared identifier 'syntax_error_for_lldb_to_find'",
2525
"syntax_error_for_lldb_to_find // comment that tests source printing",
2626
"could not build module 'LLDBTestModule'",
2727
],

0 commit comments

Comments
 (0)