<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/71848>71848</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang-tidy] `readability-implicit-bool-conversion` suggests invalid fix
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-tidy
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
felix642
</td>
</tr>
</table>
<pre>
When running and applying the suggestions of readability-implicit-bool-conversion on the following code:
```
int main()
{
bool foo;
return( foo );
}
```
We get the following result:
```
int main()
{
bool foo;
returnstatic_cast<int>(( foo ));
}
```
godbolt: https://godbolt.org/z/bzbbbevsE
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycUl1vozAQ_DXLi0VkbD4feGgv5S_08WTjBfbk2BE2uaa__mSaKKfqTqoqIWB3PbMz1qgQaHaIPVTPUB0ztcXFr_2Elt7qUmTam2v_uqBj6-YcuZkpZ5g6n-01FXFBFrZ5xhDJu8D8xFZURmmyFK85nc6WRoq59t7mo3cXXAN5x7zboZO31v9ORKM3CPIJ-BH4E9T89uwluchOihyIFkR3O9I8f_wwxlhiZ5P3IO_NFeO2JkBqs4S6j6A5_nPJx_sV2Yzxk7YVw2bjQ93_4d9WGqKKNP4cVYggf5CLIF92koeBL3uYvdF-18uWGM8hCRcDiOE2OPh1BjG8gxj0u9YaL-ElM700nexUhn1Rd11VNbxss6UvSuSqQjk12AhRG1VJU6qm1aqtR1WWGfWCC1kUvCu6gsvmoLRuxqKSojECcZJQcjwpsgdrL6e0O6MQNuyboi3bzCqNNuzpE2K0ys15JHMFIVIa1z6Bcr3NAUpuKcTwoIkU7Z7bv2DVkUHNvxJBqPk9uYGRuyhLhk30lm2r7T_dG8Vl04fRn0AMaf3tk59X_wvHCGLYLQUQw-7qTwAAAP__dIcB6Q">