diff options
Diffstat (limited to 'clang/lib/CodeGen/CGDecl.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGDecl.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp index f254976..52ed90d 100644 --- a/clang/lib/CodeGen/CGDecl.cpp +++ b/clang/lib/CodeGen/CGDecl.cpp @@ -762,8 +762,9 @@ void CodeGenFunction::EmitScalarInit(const Expr *init, const ValueDecl *D, // If we're emitting a value with lifetime, we have to do the // initialization *before* we leave the cleanup scopes. - if (const ExprWithCleanups *EWC = dyn_cast<ExprWithCleanups>(init)) - init = EWC->getSubExpr(); + if (const FullExpr *fe = dyn_cast<FullExpr>(init)) + init = fe->getSubExpr(); + CodeGenFunction::RunCleanupsScope Scope(*this); // We have to maintain the illusion that the variable is |