Skip to content
2 changes: 1 addition & 1 deletion clang/lib/Interpreter/Interpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ llvm::Error Interpreter::Undo(unsigned N) {

if (N > getEffectivePTUSize())
return llvm::make_error<llvm::StringError>("Operation failed. "
"Too many undos",
"No input left to undo",
std::error_code());
for (unsigned I = 0; I < N; I++) {
if (IncrExecutor) {
Expand Down
4 changes: 2 additions & 2 deletions clang/unittests/Interpreter/InterpreterTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,12 @@ TEST_F(InterpreterTest, UndoCommand) {

// Fail to undo.
auto Err1 = Interp->Undo();
EXPECT_EQ("Operation failed. Too many undos",
EXPECT_EQ("Operation failed. No input left to undo",
llvm::toString(std::move(Err1)));
auto Err2 = Interp->Parse("int foo = 42;");
EXPECT_TRUE(!!Err2);
auto Err3 = Interp->Undo(2);
EXPECT_EQ("Operation failed. Too many undos",
EXPECT_EQ("Operation failed. No input left to undo",
llvm::toString(std::move(Err3)));

// Succeed to undo.
Expand Down
Loading