<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/92583>92583</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [C++23] "no return statement in constexpr function" no longer an error with P2448
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          MitalAshok
      </td>
    </tr>
</table>

<pre>
    These:

```c++
constexpr int f() {}
static_assert(__is_same(decltype([] constexpr -> int {}()), int));
consteval int g() {}
static_assert(__is_same(decltype([] consteval -> int {}()), int));
```

Should compile in C++23. It probably still should have a warning diagnostic (the `-Wreturn-type` "non-void {function|lambda} does not return a value" should be issued for `f`  and `g` at least), but it shouldn't be an error (<https://wg21.link/P2448R2#pnum_24>)

Currently, these issue the diagnostic `error: no return statement in constexpr/consteval function/lambda`

Also #63617 does not apply to C++23

See also: #77753

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysVEGL8zYQ_TXjy5DgjGzLOfiwm3yBHgqlLfQYZFux1VUkI42zzb8vcpLN5lIofCASSZ558-a9QSpGMzitGyjfodxnaubRh-ZXw8q-xdF_ZK3vr82fo44axBvke8gfv1V-Wx3Qe1rLbeddZP3PFNA4xhNQDbRFkO8g97eIyIpNd1Qx6sBA9fFo4jGqswaqe91Zvk5peyOET7wViB8L6B1sQV7WLl3fD-KFx0XZJWX4STwS3v_j8aXSd-n-GP1se-z8eTJWo3G4u2lIYo2_ME7Bt6q1V4xsrMV4Cx_VRaPCTxWccQP2Rg3ORzYdAtU8aoQqX_0VNM_BrRb2VY5A5LxbXbzpE-HT7Do23oHcWXVuewVyj73XEZ1nvOWiwouyswaiR-lWo4lx1j2efEh1TgkblevTYUgHxWi1inxXop0ZDd_zHZDkBKIc6hASBNUgdiPzFNNY0QHo8DnQZm2N-wA6_EZFUf9OQGJy8_lIBYgfCfmbiLs5BO3YXlM5TgN645j2L-JU-VITxBs6_-gxua_P2nFS_2vIgA5Po7-0osNdq1cX32z0CCQqUW3kU0Q1TfaK7J-evlivNSobfWIDJKSU5f171jei34qtynSzkZtyW1W1LLOxaTdClHlVt0XfKZKC6vqkenESqihOnaTMNJRTkZcbuZEky3LdnYpetTnlG9p2lZRQ5PqsjF1bezmvfRiyRalmS2UtMqtabePjBQhNClq18xChyK2JHJ9pbNgub8Wzt3J_m7H_FvabmJRcsN4NOjzn4dPwiIvp2Rxs8zoYg-FxbtedPycr7OXxt5qC_1t3DHRY-olAh6WlfwMAAP__cYF5dA">