aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Frontend/CompilerInvocationTest.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/Frontend/CompilerInvocationTest.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/Frontend/CompilerInvocationTest.cpp')
-rw-r--r--clang/unittests/Frontend/CompilerInvocationTest.cpp3
1 files changed, 2 insertions, 1 deletions
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<DiagnosticsEngine> Diags;
SmallVector<const char *, 32> 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) {}
};