Commit 1a234ac6 authored by Toon Verwaest's avatar Toon Verwaest Committed by V8 LUCI CQ

[cleanup] Resolve -Wshadow warnings in prettyprinter.cc

Bug: v8:12244, v8:12245
Change-Id: Ic6250a62baadfde87bcd05cfd6c891c91af73f87
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3181104
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: 's avatarPatrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77033}
parent 0dd59191
......@@ -346,17 +346,12 @@ void CallPrinter::VisitAssignment(Assignment* node) {
Find(node->target());
if (node->target()->IsArrayLiteral()) {
// Special case the visit for destructuring array assignment.
bool was_found = false;
if (node->value()->position() == position_) {
is_iterator_error_ = true;
was_found = !found_;
found_ = true;
}
Find(node->value(), true);
if (was_found) {
done_ = true;
found_ = false;
}
} else {
Find(node->value());
}
......@@ -967,7 +962,7 @@ void AstPrinter::VisitWithStatement(WithStatement* node) {
void AstPrinter::VisitSwitchStatement(SwitchStatement* node) {
IndentedScope indent(this, "SWITCH", node->position());
IndentedScope switch_indent(this, "SWITCH", node->position());
PrintIndentedVisit("TAG", node->tag());
for (CaseClause* clause : *node->cases()) {
if (clause->is_default()) {
......@@ -1247,7 +1242,7 @@ void AstPrinter::PrintObjectProperties(
void AstPrinter::VisitArrayLiteral(ArrayLiteral* node) {
IndentedScope indent(this, "ARRAY LITERAL", node->position());
IndentedScope array_indent(this, "ARRAY LITERAL", node->position());
if (node->values()->length() > 0) {
IndentedScope indent(this, "VALUES", node->position());
for (int i = 0; i < node->values()->length(); i++) {
......
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