<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/116485>116485</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang doesn't warn for missing return value if function contains "if consteval"
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
geza-herman
</td>
</tr>
</table>
<pre>
Compile this little snippet, and notice that clang doesn't give a warning for missing `return` (if the `if consteval` is removed, then the warning is properly shown).
```c++
int foo() {
if consteval {
}
}
```
version: `Debian clang version 20.0.0 (++20241008102056+4d218caa7716-1~exp1`
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxcUs1urTgMfhqzsQ5KzP-CRduj8x4BfCCjkKAk0Oks5tmvQum97ZWsxLKdz_6cT4WgZ8vcQ_UK1T1Te1yc72f-T90W9quy2eCmj_7NrZs2jHHRAY2O0TAGq7eNI9AbKjuhdVGPqUJFHI2yM06OgwVqIs76YFT4rrzVdsan87jqEJIPtfAcd2-hFgjU6ifGhVNYP3F0NkQ-lElJHdDz6g6eUsu4sD0rv0B1wM27jb35wLC4dwvU5SDuIF6usxafNgK9Jjuj2kZ8OgfUAnUIzRVGRPw-wLcMNPcL8Lfzhfy93cE-aGeheElk7jxoZa_FXCkkkYv8ZP05EQkqpRCtFCSqGui1nEi2o1JNI-ub_J__3STUIpv6YuqKTmXcy6aQTdWKss2WfpjKpixZyGkqaRhrocTUFYo61cimUpTp_mwhZS1lVYo250nJduikVJOkZ9FCKXhV2uTGHGvu_JzpEHbupazLtsqMGtiEUyxEJxcgSrrxfXpwG_Y5QCmMDjH8gYg6Gu7_1kT6tx9K-JQBHsrsnHb_3O0Y05pGZ6PSNiAQ_RAFUbZ70y8xbgGKF6AH0GPWcdmHfHQr0CPNcF23zbt_eIxAj5NTAHpctI6efgUAAP__KWruWA">