[cfe-commits] r67417 - /cfe/trunk/lib/AST/Expr.cpp
Douglas Gregor
dgregor at apple.com
Fri Mar 20 16:38:03 PDT 2009
Author: dgregor
Date: Fri Mar 20 18:38:03 2009
New Revision: 67417
URL: http://llvm.org/viewvc/llvm-project?rev=67417&view=rev
Log:
Destroy expressions properly when resizing an initializer list
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=67417&r1=67416&r2=67417&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Expr.cpp (original)
+++ cfe/trunk/lib/AST/Expr.cpp Fri Mar 20 18:38:03 2009
@@ -341,7 +341,7 @@
void InitListExpr::resizeInits(ASTContext &Context, unsigned NumInits) {
for (unsigned Idx = NumInits, LastIdx = InitExprs.size();
Idx < LastIdx; ++Idx)
- delete InitExprs[Idx];
+ InitExprs[Idx]->Destroy(Context);
InitExprs.resize(NumInits, 0);
}
More information about the cfe-commits
mailing list