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

    <tr>
        <th>Summary</th>
        <td>
            Readability check to detect `return` from a `void` function
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang-tidy,
            check-request
      </td>
    </tr>

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

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

<pre>
    Hi!

We recently came across this type of code and realized that some tool should have caught it:

```cpp
void foo()
{}

void bar()
{
 return foo();
}
```

Turns out no warning in clang or clang-tidy catches this. Maybe we could have a clang-tidy `readability` check for it?


</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxcUkGPmzwQ_TXmMkpkDAlw4LD7Rei79FJV6tk2A7g1NrXHWWV_fQWkCloJwejp8Wbem5ExmtEhtuzyzi63TCaafGi1DNbHUdo7fi6Z8v2j_d8wkTN-Y_xtf_9ECKjRkX2AljOC1MHHCDSZCPRYEPwA2vcI0vUQUFrziT3QJAminxHIewtx8sn2MMk7gpZpnAgMseLt2Ild-f7oZdmRuzc9DN4zUTPRPFnVO6tux_82lpLhK2srICCl4A4qxfs_yu1L36PojxRcBJ8InIcPGZxxIxgH2ko3gg97cSLTr7GQnnCP5Azf5EMhfCDol2V5pLMrDyh7qYw19GBXDnpC_RsGH7ZQuuMcWd8WfVM0MsM2r7houLheqmxqC1WXpaqrOkeuZDnkvKmrvMSSN0IgYmZawUWRi7zORcEv5RlVVRbY1FfU1yFvFCs5ztLYs7X3-ezDmJkYE7bVparrzEqFNm4HI8RreiYEE_-t0DrzKeCfhJFW9HLLQrtKnVQaIyu5NZHiS5wMWWy_v5w_bZOHHgk17cGs21ozGYKfQa7Yut8NSU6T8S5LwbYT0RLXAxIdE91oaErqrP3MRLd2fH5OS_C_UBMT3eYtMtFt9v4GAAD__8YA8lk">