Implemented 90% functionality of new child_iterator for Stmt objects
that will (soon) allow iteration over the initializers in
declarations. This new iterator mechanism is implemented by the
classes StmtIterator and ConstStmtIterator.
Patched a few files to use "operator++" instead of "operator+" on
child_iterators.
Friendship added in VarDecl to StmtIterator to allow returning a
reference to the initializer within the VarDecl. We may not wish this
as a permanent solution.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43105 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/AST/ExprCXX.cpp b/AST/ExprCXX.cpp
index 093c37e..74d471e 100644
--- a/AST/ExprCXX.cpp
+++ b/AST/ExprCXX.cpp
@@ -25,7 +25,7 @@
}
Stmt::child_iterator CXXCastExpr::child_end() {
- return child_begin()+1;
+ return ++child_begin();
}
// CXXBoolLiteralExpr