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

    <tr>
        <th>Summary</th>
        <td>
            clang-tidy: google-readability-casting fails to add space between return statement and cast expression
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang-tidy
      </td>
    </tr>

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

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

<pre>
    clang-tidy check google-readability-casting (LLVM 18.1.2) needs to add a space when a return statement is directly followed by the cast expression.

The code fragment
```
int foo()
{
    return(int)42.0;
}
```
is refactored to 
```
int foo()
{
 returnstatic_cast<int>(42.0);
}
```
which fails to compile.

It should have been refactored to
```
int foo()
{
    return static_cast<int>(42.0);
}
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykU9Fu2zoM_Rr5hYghU3ZiP_ihvb3BvUD3Vux1oCXa0qZYgSQ3y98PTrJ1LYYN2wDDkkCKPOeIh1Jy08zci-ZeNA8FLdmG2D_ZcKD038I5aVsMwZx77WmeNtmZM2jL-hNMIUyeN5HJ0OC8y-eNppTdPIHA9vHx_Tuo2rIqUWAHM7NJkAOQMUCQjqQZTpZnIIiclzhDypT5wHMGl8C4yDr7M4zB-3BiA8MZsmVYWwB_PkZOyYW5FPJByLvr_2mNB8MwRprWSrfgVt6-y9HNGcYQBLYCu1vG7v66AYAbHIGtm7PArsZSCnX_NfHhxzUTRB5J5xDZrDR_v_O17SqC0x9WlkL9syJQ_wpsLyCw-yWOk3XawkjOX8TW4XB0nl-J9H-GZMPiDVh6ZhiY59fY_0I0-GP4hemV6VRHBffVruqaZoetLGxPlW4lGazVlgdqlOKt0qYdG0LZNrumcD1KrOUWW7mtWylLxUiGGqzHyuh6p0Qt-UDOl94_H8oQp8KltHDf7WSFhaeBfbqMP-LLjAvE1Q6xXy9thmVKopbepZxeymSXPX_nC6HufmaKb6-yWuBqgIHz6ar_GwfQbN5OerFE39ucj0moO4F7gfvJZbsMpQ4HgfsV1m3ZHGP4yDoL3F-oJoH7K9vnHr8EAAD__-UsMiw">