Fix bug I just introduced in ForStmt::child_end() where we could iterate off into garbage values.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92115 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang/AST/Stmt.h b/include/clang/AST/Stmt.h
index 406684c..33edadc 100644
--- a/include/clang/AST/Stmt.h
+++ b/include/clang/AST/Stmt.h
@@ -879,9 +879,9 @@
   SourceLocation LParenLoc, RParenLoc;
 
 public:
-  ForStmt(Stmt *Init, Expr *Cond, VarDecl *CondVar, Expr *Inc, Stmt *Body, 
+  ForStmt(Stmt *Init, Expr *Cond, VarDecl *condVar, Expr *Inc, Stmt *Body, 
           SourceLocation FL, SourceLocation LP, SourceLocation RP)
-    : Stmt(ForStmtClass), CondVar(CondVar), ForLoc(FL), LParenLoc(LP), 
+    : Stmt(ForStmtClass), CondVar(condVar), ForLoc(FL), LParenLoc(LP), 
       RParenLoc(RP) 
   {
     SubExprs[INIT] = Init;
diff --git a/lib/AST/Stmt.cpp b/lib/AST/Stmt.cpp
index ad1db90..7c7aeb8 100644
--- a/lib/AST/Stmt.cpp
+++ b/lib/AST/Stmt.cpp
@@ -519,7 +519,7 @@
   return child_iterator(CondVar, &SubExprs[0]);
 }
 Stmt::child_iterator ForStmt::child_end() {
-  return child_iterator(CondVar, &SubExprs[0]+END_EXPR);
+  return child_iterator(0, &SubExprs[0]+END_EXPR);
 }
 
 // ObjCForCollectionStmt