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

via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 11 07:52:31 PST 2026


GkvJwa wrote:

@zmodem Hello, take a look at this change when you have time. I previously only wanted to check `/EHa` because SEH is only reliable when `/EHa` is enabled.

However, there are indeed cases where `/EHsc` is used, and we will also check them here (although there will be differences compared to when `/EHa` is enabled).

The following code will not be blocked under `/EHsc`, Afterwards, in improvement
```
void seh_unwinding() {
  __try {
  } __except (1) {
    HasCleanup x; // expected-error{{'__try' is not permitted in functions that require object unwinding}}
  }
}
```

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


More information about the cfe-commits mailing list