aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Interpreter/InterpreterTest.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2025-05-22 12:44:20 -0700
committerKazu Hirata <kazu@google.com>2025-05-22 12:44:20 -0700
commite2a885537f11f8d9ced1c80c2c90069ab5adeb1d (patch)
treed838fa124762f02c1b2ce921f667beb29acfee7b /clang/unittests/Interpreter/InterpreterTest.cpp
parente23a6921b47d2cfb4d27289149079e9d77aa0560 (diff)
downloadllvm-e2a885537f11f8d9ced1c80c2c90069ab5adeb1d.zip
llvm-e2a885537f11f8d9ced1c80c2c90069ab5adeb1d.tar.gz
llvm-e2a885537f11f8d9ced1c80c2c90069ab5adeb1d.tar.bz2
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
Diffstat (limited to 'clang/unittests/Interpreter/InterpreterTest.cpp')
-rw-r--r--clang/unittests/Interpreter/InterpreterTest.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/clang/unittests/Interpreter/InterpreterTest.cpp b/clang/unittests/Interpreter/InterpreterTest.cpp
index b97f5ae..03b9c33 100644
--- a/clang/unittests/Interpreter/InterpreterTest.cpp
+++ b/clang/unittests/Interpreter/InterpreterTest.cpp
@@ -95,9 +95,8 @@ TEST_F(InterpreterTest, Errors) {
// Create the diagnostic engine with unowned consumer.
std::string DiagnosticOutput;
llvm::raw_string_ostream DiagnosticsOS(DiagnosticOutput);
- DiagnosticOptions DiagOpts;
- auto DiagPrinter =
- std::make_unique<TextDiagnosticPrinter>(DiagnosticsOS, DiagOpts);
+ auto DiagPrinter = std::make_unique<TextDiagnosticPrinter>(
+ DiagnosticsOS, new DiagnosticOptions());
auto Interp = createInterpreter(ExtraArgs, DiagPrinter.get());
auto Err = Interp->Parse("intentional_error v1 = 42; ").takeError();
@@ -127,9 +126,8 @@ TEST_F(InterpreterTest, DeclsAndStatements) {
// Create the diagnostic engine with unowned consumer.
std::string DiagnosticOutput;
llvm::raw_string_ostream DiagnosticsOS(DiagnosticOutput);
- DiagnosticOptions DiagOpts;
- auto DiagPrinter =
- std::make_unique<TextDiagnosticPrinter>(DiagnosticsOS, DiagOpts);
+ auto DiagPrinter = std::make_unique<TextDiagnosticPrinter>(
+ DiagnosticsOS, new DiagnosticOptions());
auto Interp = createInterpreter(ExtraArgs, DiagPrinter.get());
auto R1 = Interp->Parse(
@@ -150,9 +148,8 @@ TEST_F(InterpreterTest, UndoCommand) {
// Create the diagnostic engine with unowned consumer.
std::string DiagnosticOutput;
llvm::raw_string_ostream DiagnosticsOS(DiagnosticOutput);
- DiagnosticOptions DiagOpts;
- auto DiagPrinter =
- std::make_unique<TextDiagnosticPrinter>(DiagnosticsOS, DiagOpts);
+ auto DiagPrinter = std::make_unique<TextDiagnosticPrinter>(
+ DiagnosticsOS, new DiagnosticOptions());
auto Interp = createInterpreter(ExtraArgs, DiagPrinter.get());