Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Unified Diff: src/ast/ast-numbering.cc

Issue 2457393003: Thread decls-list through Declaration (Closed)
Patch Set: rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ast/ast-expression-rewriter.cc ('k') | src/ast/ast-traversal-visitor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/ast-numbering.cc
diff --git a/src/ast/ast-numbering.cc b/src/ast/ast-numbering.cc
index 158df6eb74553b240567192a23aa6a01570c2b92..324a455c23fcfb6ff7ebabbec4ffba13f984551f 100644
--- a/src/ast/ast-numbering.cc
+++ b/src/ast/ast-numbering.cc
@@ -37,7 +37,7 @@ class AstNumberingVisitor final : public AstVisitor<AstNumberingVisitor> {
void VisitReference(Expression* expr);
void VisitStatements(ZoneList<Statement*>* statements);
- void VisitDeclarations(ZoneList<Declaration*>* declarations);
+ void VisitDeclarations(Declaration::List* declarations);
void VisitArguments(ZoneList<Expression*>* arguments);
void VisitLiteralProperty(LiteralProperty* property);
@@ -547,12 +547,8 @@ void AstNumberingVisitor::VisitStatements(ZoneList<Statement*>* statements) {
}
}
-
-void AstNumberingVisitor::VisitDeclarations(
- ZoneList<Declaration*>* declarations) {
- for (int i = 0; i < declarations->length(); i++) {
- Visit(declarations->at(i));
- }
+void AstNumberingVisitor::VisitDeclarations(Declaration::List* decls) {
+ for (Declaration* decl : *decls) Visit(decl);
}
« no previous file with comments | « src/ast/ast-expression-rewriter.cc ('k') | src/ast/ast-traversal-visitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698