diff --git a/explorer/interpreter/action.h b/explorer/interpreter/action.h index 23d037471b95..c5ebd13f8927 100644 --- a/explorer/interpreter/action.h +++ b/explorer/interpreter/action.h @@ -256,9 +256,9 @@ class DeclarationAction : public Action { }; // An Action which implements destroying all local allocations in a scope. -class CleanupAction : public Action { +class CleanUpAction : public Action { public: - explicit CleanupAction(RuntimeScope scope) + explicit CleanUpAction(RuntimeScope scope) : Action(Kind::CleanUpAction), allocations_count_(scope.allocations().size()) { StartScope(std::move(scope)); diff --git a/explorer/interpreter/action_stack.cpp b/explorer/interpreter/action_stack.cpp index 47a59d801635..de0597516ce7 100644 --- a/explorer/interpreter/action_stack.cpp +++ b/explorer/interpreter/action_stack.cpp @@ -238,7 +238,7 @@ auto ActionStack::UnwindToWithCaptureScopesToDestroy( auto& scope = item->scope(); if (scope && item->kind() != Action::Kind::CleanUpAction) { std::unique_ptr cleanup_action = - std::make_unique(std::move(*scope)); + std::make_unique(std::move(*scope)); scopes_to_destroy.push(std::move(cleanup_action)); } } @@ -332,7 +332,7 @@ void ActionStack::PushCleanUpActions( auto& act = actions.top(); if (act->scope()) { std::unique_ptr cleanup_action = - std::make_unique(std::move(*act->scope())); + std::make_unique(std::move(*act->scope())); todo_.Push(std::move(cleanup_action)); } actions.pop(); @@ -343,7 +343,7 @@ void ActionStack::PushCleanUpAction(std::unique_ptr act) { auto& scope = act->scope(); if (scope && act->kind() != Action::Kind::CleanUpAction) { std::unique_ptr cleanup_action = - std::make_unique(std::move(*scope)); + std::make_unique(std::move(*scope)); todo_.Push(std::move(cleanup_action)); } } diff --git a/explorer/interpreter/interpreter.cpp b/explorer/interpreter/interpreter.cpp index 37e497c2e051..def117cda62a 100644 --- a/explorer/interpreter/interpreter.cpp +++ b/explorer/interpreter/interpreter.cpp @@ -2150,7 +2150,7 @@ auto Interpreter::StepDestroy() -> ErrorOr { auto Interpreter::StepCleanUp() -> ErrorOr { Action& act = todo_.CurrentAction(); - CleanupAction& cleanup = cast(act); + CleanUpAction& cleanup = cast(act); if (act.pos() < cleanup.allocations_count()) { auto allocation = act.scope()->allocations()[cleanup.allocations_count() - act.pos() - 1];