summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/Expr.cpp
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2008-05-07 16:50:14 +0000
committerSteve Naroff <snaroff@apple.com>2008-05-07 16:50:14 +0000
commit6eda39c345f98db4b50d085b9ce7994a96971bf5 (patch)
treeeb132b85f696d85444e3472332805872906c6b62 /clang/lib/AST/Expr.cpp
parent5fcecbffca14d5317723842bd201f09fa81a9b22 (diff)
downloadbcm5719-llvm-6eda39c345f98db4b50d085b9ce7994a96971bf5.tar.gz
bcm5719-llvm-6eda39c345f98db4b50d085b9ce7994a96971bf5.zip
Fix off-by-one error.
llvm-svn: 50815
Diffstat (limited to 'clang/lib/AST/Expr.cpp')
-rw-r--r--clang/lib/AST/Expr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp
index 69dca5af558..cad6065e2e5 100644
--- a/clang/lib/AST/Expr.cpp
+++ b/clang/lib/AST/Expr.cpp
@@ -1369,7 +1369,7 @@ Stmt::child_iterator InitListExpr::child_begin() {
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
OpenPOWER on IntegriCloud