Skip to content

Commit 0ffb403

Browse files
committed
update
1 parent 61a2c9a commit 0ffb403

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

clang-tools-extra/clangd/ModulesBuilder.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ bool IsModuleFileUpToDate(PathRef ModuleFilePath,
138138

139139
clang::clangd::IgnoreDiagnostics IgnoreDiags;
140140
IntrusiveRefCntPtr<DiagnosticsEngine> Diags =
141-
CompilerInstance::createDiagnostics(new DiagnosticOptions, &D, /*ShouldOwnClient=*/false);
141+
CompilerInstance::createDiagnostics(new DiagnosticOptions, &IgnoreDiags, /*ShouldOwnClient=*/false);
142142

143143
LangOptions LangOpts;
144144
LangOpts.SkipODRCheckInGMF = true;
@@ -159,7 +159,8 @@ bool IsModuleFileUpToDate(PathRef ModuleFilePath,
159159
ASTReader Reader(PP, *ModuleCache, /*ASTContext=*/nullptr,
160160
PCHOperations.getRawReader(), {});
161161

162-
Reader.setListener(std::make_unique<PPIntializer>(PP));
162+
// We don't need any listener here. By default it will use a validator listener.
163+
Reader.setListener(nullptr);
163164

164165
if (Reader.ReadAST(ModuleFilePath, serialization::MK_MainFile,
165166
SourceLocation(),

0 commit comments

Comments
 (0)