[clang] [WinEH] Fix object delete crash (PR #180144)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 26 18:10:26 PDT 2026


================
@@ -853,10 +859,10 @@ void CodeGenFunction::PopCleanupBlock(bool FallthroughIsBranchThrough,
 
       // intercept normal cleanup to mark SEH scope end
       if (IsEHa && getInvokeDest()) {
-        if (Personality.isMSVCXXPersonality())
-          EmitSehCppScopeEnd();
-        else
+        if (Scope.isSEHFinallyCleanup())
           EmitSehTryScopeEnd();
+        else if (Personality.isMSVCPersonality())
----------------
efriedma-quic wrote:

Isn't isMSVCPersonality() always true here?  I don't think we support EHAsynch for non-MS personalities.

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


More information about the cfe-commits mailing list