diff options
author | Jan Svoboda <jan_svoboda@apple.com> | 2025-05-22 12:51:28 -0700 |
---|---|---|
committer | Jan Svoboda <jan_svoboda@apple.com> | 2025-05-22 12:52:03 -0700 |
commit | 13e1a2cb2246dc5e9a4afcdacabed4d43154ec3f (patch) | |
tree | 44ef419d0d5533ac9464061a6801ed0db1c93a49 /clang/unittests/Lex/LexerTest.cpp | |
parent | 45f6036533bd30966f5e815568b792a7e293a0e8 (diff) | |
download | llvm-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/LexerTest.cpp')
-rw-r--r-- | clang/unittests/Lex/LexerTest.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/clang/unittests/Lex/LexerTest.cpp b/clang/unittests/Lex/LexerTest.cpp index 9806d4c..381755d 100644 --- a/clang/unittests/Lex/LexerTest.cpp +++ b/clang/unittests/Lex/LexerTest.cpp @@ -41,12 +41,9 @@ using testing::ElementsAre; class LexerTest : public ::testing::Test { protected: LexerTest() - : FileMgr(FileMgrOpts), - DiagID(new DiagnosticIDs()), - Diags(DiagID, new DiagnosticOptions, new IgnoringDiagConsumer()), - SourceMgr(Diags, FileMgr), - TargetOpts(new TargetOptions) - { + : FileMgr(FileMgrOpts), DiagID(new DiagnosticIDs()), + Diags(DiagID, DiagOpts, new IgnoringDiagConsumer()), + SourceMgr(Diags, FileMgr), TargetOpts(new TargetOptions) { TargetOpts->Triple = "x86_64-apple-darwin11.1.0"; Target = TargetInfo::CreateTargetInfo(Diags, *TargetOpts); } @@ -104,6 +101,7 @@ protected: FileSystemOptions FileMgrOpts; FileManager FileMgr; IntrusiveRefCntPtr<DiagnosticIDs> DiagID; + DiagnosticOptions DiagOpts; DiagnosticsEngine Diags; SourceManager SourceMgr; LangOptions LangOpts; |