================
@@ -341,4 +333,94 @@ void catch_by_value() {
 // LLVM-EH:         call void @__cxa_end_catch()
 // LLVM-EH:         call void @llvm.lifetime.end.p0(ptr %[[C]])
 
+// An enclosing catch requires an unwind edge and the marker must run before
+// entering the handler.
+void lifetime_in_try() {
+  try {
+    int x = 1;
+    may_throw();
+    use(x);
+  } catch (...) {
+  }
+}
+
----------------
andykaylor wrote:

Can you add CIR-EH checks for the new functions?

https://github.com/llvm/llvm-project/pull/224829
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to