<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/65665>65665</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Clang incorrectly rejects consteval destructors in C++20
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang,
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
groundswellaudio
</td>
</tr>
</table>
<pre>
MRE :
```cpp
struct A {
consteval ~A() {}
};
```
Produces the error `destructor cannot be declared consteval`
Relevant part of the standard (11.4.7, destructors) :
> Each [decl-specifier](https://eel.is/c++draft/dcl.spec.general#nt:decl-specifier) of the [decl-specifier-seq](https://eel.is/c++draft/dcl.spec.general#nt:decl-specifier-seq) of a prospective destructor declaration (if any) shall be friend, inline, virtual, constexpr, or consteval[.](https://eel.is/c++draft/class.dtor#1.sentence-3)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysk8uO2zoMhp-G3ggxbMqW44UXuUx2BziYN1AkOlahkVxJznQ2ffZCTtpJ01WBAoYvlPV_5E9RxmgujmiAdg_tsZBLmnwYLsEvTsd3slYu2vji7PXH8N_rCwO-Y1Adodrd76K6XWqeb5GYwqIS2zHo9rcIU97FRFdp2fcd4BawXxe7412jOwLfP-k9Qv4PXi-KIksTMQrBBwai0nRD-cCUdM4ndiamSVkZSH8yn7ReydJVusRmGRLz46oZk3RaBs0At3VdNmUHeGCfgLim_Fw6f2EvUk0M2n3GbuJMyoyGArRHwO2U0hyB7wBPgCciW5oIeFKAe8C9DnJMgCetbJk3lhdyFKQF5C4B3z0pYv8z1z9om0hf_z1xVb1RJZuDzwvJXOnBlbvZMhnvsnNmZNJ95E1xktbmdozBkNPZTOOscZTfriakJWMP9yZ9m0P-yH381bR2X_5NTcrKGEudfADkdRnJJXKKNhywL_TAdc97WdBQi76pa1HXXTENqhsFl33dKCHbrm9EuxV8rPpmpA6bBgszYIW86quu7pstF2W_bVFgL7qxGhvNK2gqepPGltZe30ofLoWJcaFBtEK0hZVnsnEdLURlpbsAIuABEB29s_XXHGmPRRiywua8XCI0lTUxxU_NZJKl4ZAFmHHKh0Aq2Q8W6AupFB_G6-HEMuPY4WYSVqxYgh1-t_Ji0rScS-XfAE-ZdX9s5uCzLuBpzTC7vdbzIwAA__-XAEv9">