<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/81016>81016</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
attribute `[[noreturn]]` Diagnoses 'should not return' on a void function
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang:diagnostics
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
erichkeane
</td>
</tr>
</table>
<pre>
See https://godbolt.org/z/h5nsj8qEK
```
[[noreturn]]
void foo() {
}
```
```
<source>:3:1: warning: function declared 'noreturn' should not return [-Winvalid-noreturn]
3 | }
| ^
```
We should probably suppress this diagnostic when the function is void .
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsUk9zoz4M_TTioknG2Jg_Bw5JUy6_4-_Qs8EC3HXtrG3S6X76HUja7HbDeAwSI-npvadiNJMjakEeQZ4ytaTZh5aCGeYfpBxlvdcf7f9EOKd0jiAOwDvg3eR1723a-zAB734B72bp4mv98_k_YCdgh9tdstu5huuUo_OB0hIcyNN6tj8XbzSO3gOvgTcI1fFWUZ0ed_oWiqfolzAQiGcQBwHikIM44LsKzrhp_RwXNyTjHWoarAqkEXj1BYVXGGe_WI3OJ7wmEeRx92LcRVmjd3-i3mYiIgqE6gm_QOL2bCn5_BDoC33OOQffq95-YFzO50AxYppNRG3U5HxMZsD3mRymme7QTcSNqP1fHG93pluhG9GojNq8YpXgtRB5Nreki7KRuiyaSoqxHpSQpSZNopFFPcoxMy1nvGCcVXkleZ7vS1n0xUhcyFyxnuVQMHpTxu6tvbytimcmxoXaOmd5mVnVk42bgTgfrNrYvm8RgfPVWaFdq3f9MkUomDUxxXu_ZJKlVqUUTL8kwpWuR1YpGZ6unSmu8v0j2aqjd6iuNH3yli3Btt_8a9K89PvBvwHvVhy31-4c_CsNCXi3LRmBd9uevwMAAP__Ryvy0w">