[clang] [CIR] Simplify try-catch handling (PR #180857)

Henrich Lauko via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 10 23:58:39 PST 2026


================
@@ -514,192 +383,13 @@ void CIRGenFunction::exitCXXTryStmt(const CXXTryStmt &s, bool isFnTryBlock) {
     //   reaches the end of a handler of the function-try-block of a
     //   constructor or destructor.
 
-    // It is important that we only do this on fallthrough and not on
-    // return.  Note that it's illegal to put a return in a
-    // constructor function-try-block's catch handler (p14), so this
-    // really only applies to destructors.
-    if (doImplicitRethrow) {
-      cgm.errorNYI("exitCXXTryStmt: doImplicitRethrow");
-      return;
-    }
+    // TODO(cir): Handle implicit rethrow?
----------------
xlauko wrote:

Shouldn't this be errorNYI?

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


More information about the cfe-commits mailing list