From e2a885537f11f8d9ced1c80c2c90069ab5adeb1d Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Thu, 22 May 2025 12:44:20 -0700 Subject: Revert "[clang] Remove intrusive reference count from `DiagnosticOptions` (#139584)" This reverts commit 9e306ad4600c4d3392c194a8be88919ee758425c. Multiple builtbot failures have been reported: https://github.com/llvm/llvm-project/pull/139584 --- clang/unittests/Lex/LexerTest.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'clang/unittests/Lex/LexerTest.cpp') diff --git a/clang/unittests/Lex/LexerTest.cpp b/clang/unittests/Lex/LexerTest.cpp index 381755d..9806d4c 100644 --- a/clang/unittests/Lex/LexerTest.cpp +++ b/clang/unittests/Lex/LexerTest.cpp @@ -41,9 +41,12 @@ using testing::ElementsAre; class LexerTest : public ::testing::Test { protected: LexerTest() - : FileMgr(FileMgrOpts), DiagID(new DiagnosticIDs()), - Diags(DiagID, DiagOpts, new IgnoringDiagConsumer()), - SourceMgr(Diags, FileMgr), TargetOpts(new TargetOptions) { + : FileMgr(FileMgrOpts), + DiagID(new DiagnosticIDs()), + Diags(DiagID, new DiagnosticOptions, new IgnoringDiagConsumer()), + SourceMgr(Diags, FileMgr), + TargetOpts(new TargetOptions) + { TargetOpts->Triple = "x86_64-apple-darwin11.1.0"; Target = TargetInfo::CreateTargetInfo(Diags, *TargetOpts); } @@ -101,7 +104,6 @@ protected: FileSystemOptions FileMgrOpts; FileManager FileMgr; IntrusiveRefCntPtr DiagID; - DiagnosticOptions DiagOpts; DiagnosticsEngine Diags; SourceManager SourceMgr; LangOptions LangOpts; -- cgit v1.1