aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Lex/ModuleDeclStateTest.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/Lex/ModuleDeclStateTest.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/Lex/ModuleDeclStateTest.cpp')
-rw-r--r--clang/unittests/Lex/ModuleDeclStateTest.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/unittests/Lex/ModuleDeclStateTest.cpp b/clang/unittests/Lex/ModuleDeclStateTest.cpp
index 6fbc6bf..6ecba4d 100644
--- a/clang/unittests/Lex/ModuleDeclStateTest.cpp
+++ b/clang/unittests/Lex/ModuleDeclStateTest.cpp
@@ -55,7 +55,7 @@ class ModuleDeclStateTest : public ::testing::Test {
protected:
ModuleDeclStateTest()
: FileMgr(FileMgrOpts), DiagID(new DiagnosticIDs()),
- Diags(DiagID, new DiagnosticOptions, new IgnoringDiagConsumer()),
+ Diags(DiagID, DiagOpts, new IgnoringDiagConsumer()),
SourceMgr(Diags, FileMgr), TargetOpts(new TargetOptions) {
TargetOpts->Triple = "x86_64-unknown-linux-gnu";
Target = TargetInfo::CreateTargetInfo(Diags, *TargetOpts);
@@ -94,6 +94,7 @@ protected:
FileSystemOptions FileMgrOpts;
FileManager FileMgr;
IntrusiveRefCntPtr<DiagnosticIDs> DiagID;
+ DiagnosticOptions DiagOpts;
DiagnosticsEngine Diags;
SourceManager SourceMgr;
std::shared_ptr<TargetOptions> TargetOpts;