From f592c929bd1f083abcc8199b24bb825fdd28df1c Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Mon, 16 Feb 2009 22:42:44 +0000 Subject: [PATCH] Unbreak clang. Doug: please verify that it is expected that LastIdx can be less that NumInits. And perhaps add a comment so that Chris doesn't break your code. :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64688 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/AST/Expr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp index 8d10c1fa7f..200f7de6c6 100644 --- a/lib/AST/Expr.cpp +++ b/lib/AST/Expr.cpp @@ -246,7 +246,7 @@ InitListExpr::InitListExpr(SourceLocation lbraceloc, void InitListExpr::resizeInits(ASTContext &Context, unsigned NumInits) { for (unsigned Idx = NumInits, LastIdx = InitExprs.size(); - Idx != LastIdx; ++Idx) + Idx < LastIdx; ++Idx) delete InitExprs[Idx]; InitExprs.resize(NumInits, 0); }