diff options
author | John McCall <rjmccall@apple.com> | 2011-02-13 04:07:26 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-02-13 04:07:26 +0000 |
commit | 7502c1d3ce8bb97bcc4f7bebef507040bd93b26f (patch) | |
tree | a8483d8d96d4c459027291b90fad493b985313cb /lib/AST/StmtDumper.cpp | |
parent | 0d70d71ccbc4f7f59cadb759f61b7172a149676c (diff) |
Give some convenient idiomatic accessors to Stmt::child_range and
Stmt::const_child_range, then make a bunch of places use them instead
of the individual iterator accessors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125450 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/StmtDumper.cpp')
-rw-r--r-- | lib/AST/StmtDumper.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/AST/StmtDumper.cpp b/lib/AST/StmtDumper.cpp index 5def7d9a0b..e5e759d9ef 100644 --- a/lib/AST/StmtDumper.cpp +++ b/lib/AST/StmtDumper.cpp @@ -59,9 +59,9 @@ namespace { Visit(S); // Print out children. - Stmt::child_iterator CI = S->child_begin(), CE = S->child_end(); - if (CI != CE) { - while (CI != CE) { + Stmt::child_range CI = S->children(); + if (CI) { + while (CI) { OS << '\n'; DumpSubTree(*CI++); } |