[PATCH] D50152: [CodeGen] Merge equivalent block copy/helper functions
John McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 6 13:23:23 PDT 2018
rjmccall added inline comments.
================
Comment at: lib/CodeGen/CGBlocks.cpp:1630
+ if (const CXXDestructorDecl *DD = RD->getDestructor())
+ if (const auto FPT = DD->getType()->getAs<FunctionProtoType>())
+ // Conservatively assume the destructor can throw if the exception
----------------
I'm pretty sure this step can't fail.
================
Comment at: lib/CodeGen/CGBlocks.cpp:1643
+ if (Ctx.getBlockVarCopyInits(VD))
+ return true;
+ return false;
----------------
Can you just ask Sema to check `canThrow` for the expression and pass it down?
Repository:
rC Clang
https://reviews.llvm.org/D50152
More information about the cfe-commits
mailing list