[cfe-commits] r50815 - /cfe/trunk/lib/AST/Expr.cpp

Steve Naroff snaroff at apple.com
Wed May 7 09:50:15 PDT 2008


Author: snaroff
Date: Wed May  7 11:50:14 2008
New Revision: 50815

URL: http://llvm.org/viewvc/llvm-project?rev=50815&view=rev
Log:
Fix off-by-one error.

Modified:
    cfe/trunk/lib/AST/Expr.cpp

Modified: cfe/trunk/lib/AST/Expr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Expr.cpp?rev=50815&r1=50814&r2=50815&view=diff

==============================================================================
--- cfe/trunk/lib/AST/Expr.cpp (original)
+++ cfe/trunk/lib/AST/Expr.cpp Wed May  7 11:50:14 2008
@@ -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





More information about the cfe-commits mailing list