Skip to content

Commit d6ec2a5

Browse files
Merge pull request #10901 from AnthonyLatsis/stable/20250601
[stable/20250601] Cherry-pick #9212
2 parents 28375ee + 8a7219b commit d6ec2a5

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

clang/lib/Parse/Parser.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,8 @@ bool Parser::ParseTopLevelDecl(DeclGroupPtrTy &Result,
722722

723723
// Late template parsing can begin.
724724
Actions.SetLateTemplateParser(LateTemplateParserCallback, nullptr, this);
725-
Actions.ActOnEndOfTranslationUnit();
725+
if (!PP.isIncrementalProcessingEnabled())
726+
Actions.ActOnEndOfTranslationUnit();
726727
//else don't tell Sema that we ended parsing: more input might come.
727728
return true;
728729

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,6 @@ ClangModulesDeclVendor::Create(Target &target) {
662662
arch.GetTriple().str(),
663663
"-fmodules-validate-system-headers",
664664
"-Werror=non-modular-include-in-framework-module",
665-
"-Xclang=-fincremental-extensions",
666665
"-Rmodule-build"};
667666

668667
target.GetPlatform()->AddClangModuleCompilationOptions(
@@ -756,6 +755,8 @@ ClangModulesDeclVendor::Create(Target &target) {
756755
instance->getFrontendOpts().Inputs[0]))
757756
return nullptr;
758757

758+
instance->getPreprocessor().enableIncrementalProcessing();
759+
759760
instance->createASTReader();
760761

761762
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: use of undeclared identifier 'syntax_error_for_lldb_to_find'",
24+
"module.h:4:1: error: unknown type name '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)