Skip to content

Commit c49fe19

Browse files
Merge pull request #5322 from swiftwasm/release/5.8
[pull] swiftwasm-release/5.8 from release/5.8
2 parents c1e8529 + b2f7b0a commit c49fe19

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

lib/ClangImporter/ClangImporter.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,11 +1048,11 @@ std::unique_ptr<clang::CompilerInvocation> ClangImporter::createClangInvocation(
10481048
// the diagnostic options here explicitly.
10491049
std::unique_ptr<clang::DiagnosticOptions> clangDiagOpts =
10501050
clang::CreateAndPopulateDiagOpts(invocationArgs);
1051-
ClangDiagnosticConsumer diagClient{importer->Impl, *clangDiagOpts,
1052-
importerOpts.DumpClangDiagnostics};
1051+
auto *diagClient = new ClangDiagnosticConsumer(
1052+
importer->Impl, *clangDiagOpts, importerOpts.DumpClangDiagnostics);
10531053
clangDiags = clang::CompilerInstance::createDiagnostics(
1054-
clangDiagOpts.release(), &diagClient,
1055-
/*owned*/ false);
1054+
clangDiagOpts.release(), diagClient,
1055+
/*owned*/ true);
10561056

10571057
// Finally, use the CC1 command-line and the diagnostic engine
10581058
// to instantiate our Invocation.
@@ -1072,11 +1072,11 @@ std::unique_ptr<clang::CompilerInvocation> ClangImporter::createClangInvocation(
10721072
llvm::IntrusiveRefCntPtr<clang::DiagnosticOptions> tempDiagOpts{
10731073
new clang::DiagnosticOptions};
10741074

1075-
ClangDiagnosticConsumer tempDiagClient{importer->Impl, *tempDiagOpts,
1076-
importerOpts.DumpClangDiagnostics};
1075+
auto *tempDiagClient = new ClangDiagnosticConsumer(
1076+
importer->Impl, *tempDiagOpts, importerOpts.DumpClangDiagnostics);
10771077
clangDiags = clang::CompilerInstance::createDiagnostics(tempDiagOpts.get(),
1078-
&tempDiagClient,
1079-
/*owned*/ false);
1078+
tempDiagClient,
1079+
/*owned*/ true);
10801080
CI = clang::createInvocationFromCommandLine(invocationArgs, clangDiags, VFS,
10811081
false, CC1Args);
10821082
}

0 commit comments

Comments
 (0)