diff options
author | Kirill Bobyrev <kbobyrev@google.com> | 2020-06-15 12:14:15 +0200 |
---|---|---|
committer | Kirill Bobyrev <kbobyrev@google.com> | 2020-06-15 12:14:15 +0200 |
commit | 550c4562d18a6ab6ce60a062dceb163313da0ddd (patch) | |
tree | 3d85cdfe53992da3c838dcd89739b16465d8f278 /clang/lib/CodeGen/CGDecl.cpp | |
parent | ec4e68e667bf0369c36f0e4291618ef2a614bbf0 (diff) | |
download | llvm-550c4562d18a6ab6ce60a062dceb163313da0ddd.zip llvm-550c4562d18a6ab6ce60a062dceb163313da0ddd.tar.gz llvm-550c4562d18a6ab6ce60a062dceb163313da0ddd.tar.bz2 |
Revert "Prevent IR-gen from emitting consteval declarations"
This reverts commit 3bab88b7baa20b276faaee0aa7ca87f636c91877.
This patch causes test failures:
http://lab.llvm.org:8011/builders/clang-cmake-armv7-quick/builds/17260
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 |