mirror of https://github.com/microsoft/clang.git
Use RAII object for cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150147 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4c5d8afd10
commit
f8823e7ae0
|
@ -1784,7 +1784,8 @@ namespace {
|
|||
}
|
||||
|
||||
void CodeGenFunction::EmitLambdaExpr(const LambdaExpr *E, AggValueSlot Slot) {
|
||||
EHScopeStack::stable_iterator CleanupDepth = EHStack.stable_begin();
|
||||
RunCleanupsScope Scope(*this);
|
||||
|
||||
CXXRecordDecl::field_iterator CurField = E->getLambdaClass()->field_begin();
|
||||
for (LambdaExpr::capture_init_iterator i = E->capture_init_begin(),
|
||||
e = E->capture_init_end();
|
||||
|
@ -1809,5 +1810,4 @@ void CodeGenFunction::EmitLambdaExpr(const LambdaExpr *E, AggValueSlot Slot) {
|
|||
RD->getDestructor(),
|
||||
Slot.getAddr());
|
||||
}
|
||||
PopCleanupBlocks(CleanupDepth);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue