[clang] [WinEH] Also check object unwinding for enabling CXXExceptions(/ehs*) (PR #180959)

Hans Wennborg via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 12 05:42:33 PST 2026


================
@@ -2228,8 +2228,10 @@ void CodeGenFunction::EmitAutoVarCleanups(const AutoVarEmission &emission) {
 
   // Check the type for a cleanup.
   if (QualType::DestructionKind dtorKind = D.needsDestruction(getContext())) {
-    // Check if we're in a SEH block with EHa, prevent it
-    if (getLangOpts().EHAsynch && currentFunctionUsesSEHTry())
+    // Check if we're in a SEH block with /EH, prevent it
+    // TODO: /EHs* differs from /EHa, the former may not be executed to this
+    // point.
----------------
zmodem wrote:

I don't understand the comment.

What does "the former may not be executed to this point" mean, and what do we need "to do" here?

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


More information about the cfe-commits mailing list