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
diff --git a/lib/AST/ParentMap.cpp b/lib/AST/ParentMap.cpp
index 87f8f36..eca351a 100644
--- a/lib/AST/ParentMap.cpp
+++ b/lib/AST/ParentMap.cpp
@@ -21,7 +21,7 @@
typedef llvm::DenseMap<Stmt*, Stmt*> MapTy;
static void BuildParentMap(MapTy& M, Stmt* S) {
- for (Stmt::child_iterator I=S->child_begin(), E=S->child_end(); I!=E; ++I)
+ for (Stmt::child_range I = S->children(); I; ++I)
if (*I) {
M[*I] = S;
BuildParentMap(M, *I);