<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/59085>59085</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
-Wreturn-type false-negative for fully-covered switch over enum that does not cover all possible underlying types
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang:diagnostics
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
LebedevRI
</td>
</tr>
</table>
<pre>
As per @apinski-cavium @ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107763,
clang's `-Wreturn-type` should fire on the following:
```
enum a { b };
int foo(a a) {
switch(a) {
case b: return 42;
}
}
```
https://godbolt.org/z/j8ezrr5h3
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxlUsGO2yAQ_Rp8GdnCkDj2wYek0UqVeuqlxwrD2GZLjAU4UfbrO3bSbXeLMOYx8ObN03Te3NtjhBkDsB1Xs53iL5trdbXLZT2BMaU5Mnlk4oXmoHUxTEvhw0CoW4Y365yibRz97SfhQg-WyRdrmDyX_HCoJBNfGD8zftROTfTqEIFVPP8RMC1hytN9RsJABIsz0NuA4CdII0LvnfM3S48o_UbxXCv-nBvEiaQqYIcTdLSemTz9e9tOiZg8E7UCUtqsFx8RoBFvNulxDf4XWodWEaGj_PCQCzvxTr_G13SPXO-bj-I-2edN51162vdG32uNbyHsR5lhW1ZVTUOUPDOtNI1sVJZscth-cAt65SLmEw4q2etqU4B-ce6ea3_FgOZZFKwINnfSqBIYjxEmn2C7Bso5mH2MtnMIy2QwuDt5DWuKmC3BtZ-02zQuXaH9hYBz1z-_fA7-FXUiaGNcMNJm3_B6n41t1UkupcC6QsQOheZY67La7eqdxIPRmVMdutiy_YkJ8WgQeTRWDZOPyWriEmx_zmwruBBlWTaCEyEvatPrvqq57ITuG15Rp-JFWVesilZ7s9Bu4qglIwWdjSn-DSoqe5gQt8TEr5Y0-tB-I40Gr9-_Zlsl7VbGbyWE9Xc">