aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Serialization/ModuleCacheTest.cpp
diff options
context:
space:
mode:
authorJan Svoboda <jan_svoboda@apple.com>2025-05-22 12:51:28 -0700
committerJan Svoboda <jan_svoboda@apple.com>2025-05-22 12:52:03 -0700
commit13e1a2cb2246dc5e9a4afcdacabed4d43154ec3f (patch)
tree44ef419d0d5533ac9464061a6801ed0db1c93a49 /clang/unittests/Serialization/ModuleCacheTest.cpp
parent45f6036533bd30966f5e815568b792a7e293a0e8 (diff)
downloadllvm-13e1a2cb2246dc5e9a4afcdacabed4d43154ec3f.zip
llvm-13e1a2cb2246dc5e9a4afcdacabed4d43154ec3f.tar.gz
llvm-13e1a2cb2246dc5e9a4afcdacabed4d43154ec3f.tar.bz2
Reapply "[clang] Remove intrusive reference count from `DiagnosticOptions` (#139584)"
This reverts commit e2a885537f11f8d9ced1c80c2c90069ab5adeb1d. Build failures were fixed right away and reverting the original commit without the fixes breaks the build again.
Diffstat (limited to 'clang/unittests/Serialization/ModuleCacheTest.cpp')
-rw-r--r--clang/unittests/Serialization/ModuleCacheTest.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/unittests/Serialization/ModuleCacheTest.cpp b/clang/unittests/Serialization/ModuleCacheTest.cpp
index 38003e9..de6e13a 100644
--- a/clang/unittests/Serialization/ModuleCacheTest.cpp
+++ b/clang/unittests/Serialization/ModuleCacheTest.cpp
@@ -108,8 +108,9 @@ TEST_F(ModuleCacheTest, CachedModuleNewPath) {
MCPArg.append(ModuleCachePath);
CreateInvocationOptions CIOpts;
CIOpts.VFS = llvm::vfs::createPhysicalFileSystem();
+ DiagnosticOptions DiagOpts;
IntrusiveRefCntPtr<DiagnosticsEngine> Diags =
- CompilerInstance::createDiagnostics(*CIOpts.VFS, new DiagnosticOptions());
+ CompilerInstance::createDiagnostics(*CIOpts.VFS, DiagOpts);
CIOpts.Diags = Diags;
// First run should pass with no errors
@@ -157,8 +158,9 @@ TEST_F(ModuleCacheTest, CachedModuleNewPathAllowErrors) {
MCPArg.append(ModuleCachePath);
CreateInvocationOptions CIOpts;
CIOpts.VFS = llvm::vfs::createPhysicalFileSystem();
+ DiagnosticOptions DiagOpts;
IntrusiveRefCntPtr<DiagnosticsEngine> Diags =
- CompilerInstance::createDiagnostics(*CIOpts.VFS, new DiagnosticOptions());
+ CompilerInstance::createDiagnostics(*CIOpts.VFS, DiagOpts);
CIOpts.Diags = Diags;
// First run should pass with no errors