[clang] [Clang] Allow musttail in noexcept functions when callee is nounwind (PR #190945)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 8 10:24:35 PDT 2026
================
@@ -0,0 +1,20 @@
+// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -emit-llvm %s -triple x86_64-unknown-linux-gnu -o /dev/null -verify
+
+// Musttail in noexcept functions should work when the callee is also noexcept.
+// The EHTerminateScope pushed by noexcept is safe to skip because the callee
+// won't throw.
----------------
efriedma-quic wrote:
For the "negative" case, checking for the error message is sufficient.
For the "positive" case, I'd like to see something like `CHECK: musttail call @NoexceptCallee() noexcept`.
https://github.com/llvm/llvm-project/pull/190945
More information about the cfe-commits
mailing list