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

Unified Diff: src/ast/ast-traversal-visitor.h

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-numbering.cc ('k') | src/ast/prettyprinter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/ast-traversal-visitor.h
diff --git a/src/ast/ast-traversal-visitor.h b/src/ast/ast-traversal-visitor.h
index 38788769073a139d770cb619093ce901f3438e07..d93e02ffe0b2b634fb6ada9cc845f92285dbb24d 100644
--- a/src/ast/ast-traversal-visitor.h
+++ b/src/ast/ast-traversal-visitor.h
@@ -40,7 +40,7 @@ class AstTraversalVisitor : public AstVisitor<Subclass> {
bool VisitExpression(Expression* node) { return true; }
// Iteration left-to-right.
- void VisitDeclarations(ZoneList<Declaration*>* declarations);
+ void VisitDeclarations(Declaration::List* declarations);
void VisitStatements(ZoneList<Statement*>* statements);
// Individual nodes
@@ -104,9 +104,8 @@ AstTraversalVisitor<Subclass>::AstTraversalVisitor(uintptr_t stack_limit,
template <class Subclass>
void AstTraversalVisitor<Subclass>::VisitDeclarations(
- ZoneList<Declaration*>* decls) {
- for (int i = 0; i < decls->length(); ++i) {
- Declaration* decl = decls->at(i);
+ Declaration::List* decls) {
+ for (Declaration* decl : *decls) {
RECURSE(Visit(decl));
}
}
« no previous file with comments | « src/ast/ast-numbering.cc ('k') | src/ast/prettyprinter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698