Fix a bunch of variable shadowing issues from LGTM

This commit is contained in:
Tim Wojtulewicz 2022-11-02 15:54:51 -07:00
parent f8eb2d9241
commit e8dbfc1cb0
10 changed files with 28 additions and 27 deletions

View file

@ -480,13 +480,13 @@ const ZAMStmt ZAMCompiler::ValueSwitch(const SwitchStmt* sw, const NameExpr* v,
std::vector<InstLabel> case_start;
PushFallThroughs();
for ( auto c : *cases )
for ( auto sw_case : *cases )
{
auto start = GoToTargetBeyond(body_end);
ResolveFallThroughs(start);
case_start.push_back(start);
PushFallThroughs();
body_end = CompileStmt(c->Body());
body_end = CompileStmt(sw_case->Body());
}
auto sw_end = GoToTargetBeyond(body_end);