From e2a885537f11f8d9ced1c80c2c90069ab5adeb1d Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Thu, 22 May 2025 12:44:20 -0700 Subject: Revert "[clang] Remove intrusive reference count from `DiagnosticOptions` (#139584)" This reverts commit 9e306ad4600c4d3392c194a8be88919ee758425c. Multiple builtbot failures have been reported: https://github.com/llvm/llvm-project/pull/139584 --- clang/unittests/Serialization/ModuleCacheTest.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'clang/unittests/Serialization/ModuleCacheTest.cpp') diff --git a/clang/unittests/Serialization/ModuleCacheTest.cpp b/clang/unittests/Serialization/ModuleCacheTest.cpp index de6e13a..38003e9 100644 --- a/clang/unittests/Serialization/ModuleCacheTest.cpp +++ b/clang/unittests/Serialization/ModuleCacheTest.cpp @@ -108,9 +108,8 @@ TEST_F(ModuleCacheTest, CachedModuleNewPath) { MCPArg.append(ModuleCachePath); CreateInvocationOptions CIOpts; CIOpts.VFS = llvm::vfs::createPhysicalFileSystem(); - DiagnosticOptions DiagOpts; IntrusiveRefCntPtr Diags = - CompilerInstance::createDiagnostics(*CIOpts.VFS, DiagOpts); + CompilerInstance::createDiagnostics(*CIOpts.VFS, new DiagnosticOptions()); CIOpts.Diags = Diags; // First run should pass with no errors @@ -158,9 +157,8 @@ TEST_F(ModuleCacheTest, CachedModuleNewPathAllowErrors) { MCPArg.append(ModuleCachePath); CreateInvocationOptions CIOpts; CIOpts.VFS = llvm::vfs::createPhysicalFileSystem(); - DiagnosticOptions DiagOpts; IntrusiveRefCntPtr Diags = - CompilerInstance::createDiagnostics(*CIOpts.VFS, DiagOpts); + CompilerInstance::createDiagnostics(*CIOpts.VFS, new DiagnosticOptions()); CIOpts.Diags = Diags; // First run should pass with no errors -- cgit v1.1