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

    <tr>
        <th>Summary</th>
        <td>
            Taking the address of a consteval lambda triggers assert 'consteval function should never be emitted'
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang:codegen,
            consteval
      </td>
    </tr>

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

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

<pre>
    ```c++
void test() {
    constexpr auto my_lambda = []() consteval {
        return 3;
    };
    constexpr int (*f)(void) = my_lambda;
}
```

https://godbolt.org/z/h94db9Wqf

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxdUtuO3CAM_Rrygjoi5ELywMNso_2CSn2suDgJuwSmQEadfn1JMrOzW2TAxsY-xyC9vnHUkkMUoi-bkAGR89UbjRPEhGiHaI8RuztwHsq7mODPJWCxJo-X2y8rFqkFRtWAUfOCmuF-7Yi8Cvs1wTYCpDU4XKHqkwOx4Yv9rGRcwnvS85gTZ21DuCPLNT8QfFzeEh3Kg97d3Nc5pUtE1RnR1yyT19LbdPJhytbfPOe-1rL_-Xs8wgvgZdvSvmQ16QvNK91XvSiSSRb4D_Fu3ITTDFhoHSBG7EcsPlG_NycFM00QIhYxQtjYsGfMuDqVjHc4zn61Gju4QsASMCwmJchMWbEGy_9DbtK8ypPySzasvT62b5fg30Dlx3s1Ma4Qs9KwtqPFzGXZiUp3sm6JqEmtFGupBjGqphlBMFlYIcFGvr0jpcoKN-V6ymuYwOUTRL_jzfGAvh01Q2E4JZSSvixLVhHSnfqeipHVVOuu7ZQQqCawCGNPG8Ct10XgO1a5TjE7rYkpPp25SWZyAPz4T0X-abMPPPjbm1BeRu-KnRrfef0DjHbX2A">