[clang] [CIR] Implement ctor-try-body rethrow (PR #229436)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 6 14:48:44 PDT 2026
================
@@ -736,8 +741,13 @@ CIRGenFunction::emitCXXTryStmt(const CXXTryStmt &s,
// The currently handled exception is rethrown if control
// reaches the end of a handler of the function-try-block of a
// constructor or destructor.
-
- // TODO(cir): Handle implicit rethrow?
+ //
+ // 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
----------------
erichkeane wrote:
This comment is copy/pasted from classic codegen :) See CGException.cpp:1301.
https://github.com/llvm/llvm-project/pull/229436
More information about the cfe-commits
mailing list