Skip to content

Commit 9d9416a

Browse files
committed
Slight edit to error msg. Updated unit test.
1 parent b0513a8 commit 9d9416a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clang/lib/Interpreter/Interpreter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ llvm::Error Interpreter::Undo(unsigned N) {
758758
std::error_code());
759759
} else if (N > getEffectivePTUSize()) {
760760
return llvm::make_error<llvm::StringError>(
761-
llvm::formatv("Wanted to undo {0} inputs, only have {1}.",
761+
llvm::formatv("Operation failed. Wanted to undo {0} inputs, only have {1}.",
762762
N, getEffectivePTUSize()),
763763
std::error_code());
764764
}

clang/unittests/Interpreter/InterpreterTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ TEST_F(InterpreterTest, UndoCommand) {
163163
auto Err2 = Interp->Parse("int foo = 42;");
164164
EXPECT_TRUE(!!Err2);
165165
auto Err3 = Interp->Undo(2);
166-
EXPECT_EQ("Operation failed. No input left to undo",
166+
EXPECT_EQ("Operation failed. Wanted to undo 2 inputs but only have 1.",
167167
llvm::toString(std::move(Err3)));
168168

169169
// Succeed to undo.

0 commit comments

Comments
 (0)