aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Interpreter/InterpreterTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests/Interpreter/InterpreterTest.cpp')
-rw-r--r--clang/unittests/Interpreter/InterpreterTest.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/clang/unittests/Interpreter/InterpreterTest.cpp b/clang/unittests/Interpreter/InterpreterTest.cpp
index 03b9c33..b97f5ae 100644
--- a/clang/unittests/Interpreter/InterpreterTest.cpp
+++ b/clang/unittests/Interpreter/InterpreterTest.cpp
@@ -95,8 +95,9 @@ TEST_F(InterpreterTest, Errors) {
// Create the diagnostic engine with unowned consumer.
std::string DiagnosticOutput;
llvm::raw_string_ostream DiagnosticsOS(DiagnosticOutput);
- auto DiagPrinter = std::make_unique<TextDiagnosticPrinter>(
- DiagnosticsOS, new DiagnosticOptions());
+ DiagnosticOptions DiagOpts;
+ auto DiagPrinter =
+ std::make_unique<TextDiagnosticPrinter>(DiagnosticsOS, DiagOpts);
auto Interp = createInterpreter(ExtraArgs, DiagPrinter.get());
auto Err = Interp->Parse("intentional_error v1 = 42; ").takeError();
@@ -126,8 +127,9 @@ TEST_F(InterpreterTest, DeclsAndStatements) {
// Create the diagnostic engine with unowned consumer.
std::string DiagnosticOutput;
llvm::raw_string_ostream DiagnosticsOS(DiagnosticOutput);
- auto DiagPrinter = std::make_unique<TextDiagnosticPrinter>(
- DiagnosticsOS, new DiagnosticOptions());
+ DiagnosticOptions DiagOpts;
+ auto DiagPrinter =
+ std::make_unique<TextDiagnosticPrinter>(DiagnosticsOS, DiagOpts);
auto Interp = createInterpreter(ExtraArgs, DiagPrinter.get());
auto R1 = Interp->Parse(
@@ -148,8 +150,9 @@ TEST_F(InterpreterTest, UndoCommand) {
// Create the diagnostic engine with unowned consumer.
std::string DiagnosticOutput;
llvm::raw_string_ostream DiagnosticsOS(DiagnosticOutput);
- auto DiagPrinter = std::make_unique<TextDiagnosticPrinter>(
- DiagnosticsOS, new DiagnosticOptions());
+ DiagnosticOptions DiagOpts;
+ auto DiagPrinter =
+ std::make_unique<TextDiagnosticPrinter>(DiagnosticsOS, DiagOpts);
auto Interp = createInterpreter(ExtraArgs, DiagPrinter.get());