Run clang-tidy on the interpreter directory (#885)

`// NOLINT` is added on type aliases in stack.h and dictionary.h to allow lower_snake_case naming -- this didn't feel like a check worth disabling in spite of false positives.

Co-authored-by: Geoff Romer <gromer@google.com>
This commit is contained in:
Jon Meow
2021-10-15 08:54:53 -07:00
committed by GitHub
co-authored by Geoff Romer
parent 924259986a
commit 9007bfcb88
8 changed files with 33 additions and 22 deletions
@@ -877,7 +877,7 @@ auto Interpreter::StepStmt() -> Transition {
}
case Statement::Kind::Block: {
if (act->pos() == 0) {
const Block& block = cast<Block>(*stmt);
const auto& block = cast<Block>(*stmt);
if (block.Stmt()) {
frame->scopes.Push(arena->New<Scope>(CurrentEnv()));
return Spawn{arena->New<StatementAction>(*block.Stmt())};
@@ -977,7 +977,7 @@ auto Interpreter::StepStmt() -> Transition {
case Statement::Kind::Sequence: {
// { { (s1,s2) :: C, E, F} :: S, H}
// -> { { s1 :: s2 :: C, E, F} :: S, H}
const Sequence& seq = cast<Sequence>(*stmt);
const auto& seq = cast<Sequence>(*stmt);
if (act->pos() == 0) {
return Spawn{arena->New<StatementAction>(seq.Stmt())};
} else {
@@ -1056,7 +1056,7 @@ auto Interpreter::StepStmt() -> Transition {
class Interpreter::DoTransition {
public:
// Does not take ownership of interpreter.
DoTransition(Interpreter* interpreter) : interpreter(interpreter) {}
explicit DoTransition(Interpreter* interpreter) : interpreter(interpreter) {}
void operator()(const Done& done) {
Nonnull<Frame*> frame = interpreter->stack.Top();