Commit bbd44150 authored by Ng Zhi An's avatar Ng Zhi An Committed by V8 LUCI CQ

[cleanup] Fix -Wshadow warnings in ast.cc

Bug: v8:12244,v8:12245
Change-Id: I81cf283f4b38930c74c1e4508711af0d4702128d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3187273Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77130}
parent 043fb91b
......@@ -529,9 +529,10 @@ int ArrayLiteral::InitDepthAndFlags() {
int array_index = 0;
for (; array_index < constants_length; array_index++) {
Expression* element = values()->at(array_index);
MaterializedLiteral* literal = element->AsMaterializedLiteral();
if (literal != nullptr) {
int subliteral_depth = literal->InitDepthAndFlags() + 1;
MaterializedLiteral* materialized_literal =
element->AsMaterializedLiteral();
if (materialized_literal != nullptr) {
int subliteral_depth = materialized_literal->InitDepthAndFlags() + 1;
if (subliteral_depth > depth_acc) depth_acc = subliteral_depth;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment