================
@@ -2647,6 +2647,10 @@ ExprResult Sema::BuildCXXNew(SourceRange Range, bool 
UseGlobal,
         CCE->getConstructor()->getParent());
   }
 
+  if (OperatorDelete && !OperatorDelete->isReservedGlobalPlacementOperator() &&
+      Initializer && canThrow(Initializer))
----------------
efriedma-quic wrote:

I'm a little worried that Sema's language-level notion of canThrow doesn't 
precisely match things which CodeGen to an "invoke" instruction.  I don't have 
a counterexample, though.

canThrow is potentially a bit expensive because it needs to walk all the 
children.

Can you briefly explain why the canThrow() check is necessary?

https://github.com/llvm/llvm-project/pull/175817
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to