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

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 14 10:46:56 PST 2026


================
@@ -1211,6 +1215,10 @@ void CodeGenFunction::popCatchScope() {
 }
 
 void CodeGenFunction::ExitCXXTryStmt(const CXXTryStmt &S, bool IsFnTryBlock) {
+  // For EHa we might have a cleanup block for the try end
+  if (EHStack.begin()->getKind() == EHScope::Cleanup)
----------------
rnk wrote:

```suggestion
  // For EHa we have a cleanup block for the try end.
  if (getLangOpts().EHAsynch)
```

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


More information about the cfe-commits mailing list