mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-01 08:24:59 +01:00
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:
committed by
GitHub
co-authored by
Geoff Romer
parent
924259986a
commit
9007bfcb88
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user