[clang] [llvm] [WinEH] Fix try scopes leaking to caller on inline (PR #167176)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 3 14:40:14 PST 2025


================
@@ -341,9 +341,11 @@ void llvm::calculateSEHStateForAsynchEH(const BasicBlock *BB, int State,
         // Retrive the new State from seh_try_begin
         State = EHInfo.InvokeStateMap[cast<InvokeInst>(TI)];
       else if (Fn && Fn->isIntrinsic() &&
-               Fn->getIntrinsicID() == Intrinsic::seh_try_end)
+               Fn->getIntrinsicID() == Intrinsic::seh_try_end) {
----------------
efriedma-quic wrote:

Terminating multiple scopes at once is fine, I guess, as an optimization.  But I'm a little concerned that indicates the frontend doesn't understand which scope it's leaving.

https://github.com/llvm/llvm-project/pull/167176


More information about the llvm-commits mailing list