diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-03-20 23:38:03 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-03-20 23:38:03 +0000 |
commit | 068636800594844c53fba0bc871c579745757d0e (patch) | |
tree | 9f5b19bfdbf22a26662e78c562e0683865aa7aa8 /lib/AST/Expr.cpp | |
parent | 5908a9293b88a3da57ae59b522275d05e1ab11e0 (diff) |
Destroy expressions properly when resizing an initializer list
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67417 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Expr.cpp')
-rw-r--r-- | lib/AST/Expr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp index 2f7e3630fd..fd1092f64c 100644 --- a/lib/AST/Expr.cpp +++ b/lib/AST/Expr.cpp @@ -341,7 +341,7 @@ InitListExpr::InitListExpr(SourceLocation lbraceloc, 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); } |