From 13e1a2cb2246dc5e9a4afcdacabed4d43154ec3f Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Thu, 22 May 2025 12:51:28 -0700 Subject: 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. --- clang/unittests/Frontend/CompilerInvocationTest.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/unittests/Frontend/CompilerInvocationTest.cpp') diff --git a/clang/unittests/Frontend/CompilerInvocationTest.cpp b/clang/unittests/Frontend/CompilerInvocationTest.cpp index 94ab9fe..75390aa 100644 --- a/clang/unittests/Frontend/CompilerInvocationTest.cpp +++ b/clang/unittests/Frontend/CompilerInvocationTest.cpp @@ -29,6 +29,7 @@ using ::testing::StartsWith; namespace { class CommandLineTest : public ::testing::Test { public: + DiagnosticOptions DiagOpts; IntrusiveRefCntPtr Diags; SmallVector GeneratedArgs; BumpPtrAllocator Alloc; @@ -41,7 +42,7 @@ public: CommandLineTest() : Diags(CompilerInstance::createDiagnostics( - *llvm::vfs::getRealFileSystem(), new DiagnosticOptions(), + *llvm::vfs::getRealFileSystem(), DiagOpts, new TextDiagnosticBuffer())), StringPool(Alloc) {} }; -- cgit v1.1