Fix off-by-one error.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50815 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp
index 69dca5a..cad6065 100644
--- a/lib/AST/Expr.cpp
+++ b/lib/AST/Expr.cpp
@@ -1369,7 +1369,7 @@
return reinterpret_cast<Stmt**>(&InitExprs[0]);
}
Stmt::child_iterator InitListExpr::child_end() {
- return reinterpret_cast<Stmt**>(&InitExprs[getNumInits()]);
+ return reinterpret_cast<Stmt**>(&InitExprs[getNumInits()-1]);
}
// ObjCStringLiteral