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

    <tr>
        <th>Summary</th>
        <td>
            [clang-tidy] `--fix` applies fix-it wrongly
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    A reproducer is

```cpp
namespace a {
namespace b {}
} // namespace a
```

```
$ clang-tidy -checks=modernize-concat-nested-namespaces --fix main.cpp
$ cat main.cpp

$
```

But if I run the fix-it through clangd's code action, the code change looks good,

```cpp
namespace a::b {} // namespace a
```

godbolt link here: https://godbolt.org/z/nc34shM8W
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUUsFunDAU_JrH5YmVsVnIHjhsskLqoeeejf3AboyNbJNk8_XVkt2kWlVVKyEQ4_dmRuORKdnJE3Wwf4T9qZBrNiF2L5U3VTKrn-K5GII-d0eMtMSgV0URbQJ2Ana8vhv28ahl-UC8nCktUhFKhPbxHhw2sD1d19sTAu-B9_jb3h31H_Wuv7xG5aSfymz1GUtlSD0nEKc5aIrevlOpglcyl55SJl1-qiQsy9G-4Syt332a3_hkvkdvZ38x9rhmtCN-w7h6zIZwtG-lzZhNDOtkPlxq4G1CFTShVNkGD_xpG94gZaSfCF0IzwmnEDTwp3_OGsQRxPGW7v-FOgU9BJfRWf-MhiKBOKLJeUkX1o3pOrILcQLevwPvvRJ1Mt8ffhS6E_ogDrKgrmpa0R4Yq3lhOqEf9KjUAzuohlSjR6HqWuqKS9Uc5NAWtuOMC1ZV-0rUrOY7XlWaCdaMSu65qAhqRrO0bufcy3zRLmxKK3UNY_uqcHIgl7b2cu7pFbdD4PxS5thddsphnRLUzNmU0xdLttlttf_qDuxPCA3bSgENQ7kszlK6XeNrDH5y52KNrrtLxmazDjsVZuD9ReH6KZcYfpLKwPvNVwLeb75_BQAA___A1Ahb">