<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/54376>54376</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang-tidy: cppcoreguidelines-explicit-virtual-functions: wrong space in fix
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
FStefanni
</td>
</tr>
</table>
<pre>
Hi,
I am using clang-tidy 13.0.1.
The rule `cppcoreguidelines-explicit-virtual-functions` proposes to fix code as the followinf:
```c++
class ...
virtual int foo() override;
```
as:
```c++
class ...
int foo() override;
```
but in performing the fix, it leaves an extra initial space as in the reported example, i.e., to be clearer, it removes `virtual`, whilst it should remove `virtual ` (regex: `virtual *`).
Regards.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyVUsuOnDAQ_BpzscYCM8PjwCGb1Sq5JvkBgxvoyNjIj5nZv0_DEO0mt5Es7MbV1dXl7p1-774hk19Z_sryL4_vd64WngLaiQ9G2ekUUb_zohS5KMQD8msG7pMBzqp8WNfBeZgSajBoIZzgvhocMJ6u6GNS5jQmO0R0NhCcr96tLkDg0fER73xwGriikDhHZ4y7oR1ZeYihjMcamHzZ1v6XdIXAhTjkHHU42kgUjsmGyZa7K3hPolj58h_XI1ThuSpP0vcpUgZfwY_OL5ube4d4J7s5Rm5AXckFZTnco1eExYjURFjVsBtCyVuGh9X5CJpgalkN7OkCxLaThT3QK4Hy4A9eD4vbiEnI4csmie5uM5oQN0iYXTL6QH4CbkdO7dFrwp3M-edK7g3KVnyelR8wKa-DyHRX6rZsVRYxGug-BmejeWpECH_zjux6GEEukGdZ8qabY1z3N5NvtCaMc-rF4BYKjLn-3U40YL9hiBRiCAkCHS7nsq6yuZNal0075FV1aaRuK1WA6qFt6r6p5bkcM0OhCR270BRICze-U9CZXV4z7GQuZV4W56LKm7IWqlCqHkaZF0Ujy7pn5xwWhUZsOoTzU-a7XVKfpkCXBkMMH5c0XThZgL0c8asUZ-e7t58RRmUtZnvxbhf_BzOKJgc">