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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to