diff options
Diffstat (limited to 'clang/lib/AST/StmtPrinter.cpp')
-rw-r--r-- | clang/lib/AST/StmtPrinter.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/clang/lib/AST/StmtPrinter.cpp b/clang/lib/AST/StmtPrinter.cpp index 8870c67c746..df21d7bad63 100644 --- a/clang/lib/AST/StmtPrinter.cpp +++ b/clang/lib/AST/StmtPrinter.cpp @@ -2129,14 +2129,11 @@ void StmtPrinter::VisitObjCBoxedExpr(ObjCBoxedExpr *E) { void StmtPrinter::VisitObjCArrayLiteral(ObjCArrayLiteral *E) { OS << "@[ "; - StmtRange ch = E->children(); - if (ch.first != ch.second) { - while (1) { - Visit(*ch.first); - ++ch.first; - if (ch.first == ch.second) break; + ObjCArrayLiteral::child_range Ch = E->children(); + for (auto I = Ch.begin(), E = Ch.end(); I != E; ++I) { + if (I != Ch.begin()) OS << ", "; - } + Visit(*I); } OS << " ]"; } |