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

    <tr>
        <th>Summary</th>
        <td>
            `clang-format` and `clang-format --dry-run -Werror` disagree regarding inline namespace
        </td>
    </tr>

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

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

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

<pre>
    with the following snippet (`sample.cpp`)
```cpp
namespace name::inline name {
struct {
} a;
}
```

running `clang-format -i sample.cpp` will produce
```cpp
namespace name::inline name {
struct {
} a;
} // namespace name::inline name
```
However, running `clang-format sample.cpp | clang-format --dry-run -Werror` will produce an error saying
![image](https://github.com/llvm/llvm-project/assets/8091245/8fda7007-5397-434c-9e18-b76a668b0386)

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0k8FunDwQx59muFiszJgFfOCQZLX63uA7z8IAroxBtslq374ySbvJNlXVQyUEM4Nl_3_-z1AIZnTMLRyf4XjKaIvT4tvtNlF2WfpbezVxEnFiMSzWLlfjRhGcWVeOArCBSgaaV8uHbl2hkoAa5AnkU4r3J9X3iqOZw0odixSBegL1ZJw17q0goH5-Wxii37p4z6E-CQJ1zx5OeE_3t9-cSxLTwZbcmA-LnymK3IhPOsXVWCtWv_Rbx_9esQA8A57FH3b8Euy_5cqv7AFfxO_o7mgC6hfxmTzv_S33mxP5_-z94h_pBTmx_xCBbsaN7yKwgOOzmWlkOJ4AmynGNSTFO8lo4rRdDt0yA56tff3xyVe_fOMuAp4pBI4B8NxIXWB5TNHQUy1lnR-VrvNSlV2uuWjyS11RVTUXqZrqZwdlfat6rTRl3Ba1bFTZaFVmUztgpVFKRdwwk6pkKetKSpINa4mDzkyLEkuJhS4UYoGHatB10dWKi7LrBsVQSp7J2EOSfFj8mJkQNm4bxLLKLF3Yhn0gED_eJSCmEfHtTnrZxgCltCbEcN8ommi5fTAoXTm5_teu_Mqb3gQaPbPwPJLvk98fWmTvnmzztv1rQ3bG3ZCE-T0AAP__CqE1SA">