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

    <tr>
        <th>Summary</th>
        <td>
            [clang-format] Additional space inserted before periods in attributes
        </td>
    </tr>

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

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

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

<pre>
    Microsoft's [static analyzer](https://learn.microsoft.com/en-us/cpp/code-quality/using-the-cpp-core-guidelines-checkers?view=msvc-170) implements the [rule suppression attribute syntax proposed by the C++ Core Guidelines](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#inforce-enforcement). This allows e.g. local variables to be marked as explicitly uninitialized:
```c++
[[gsl::suppress(type.5)]] int uninitialized_on_purpose;
```
However, clang-format (as of version 18.1.1) always inserts a space before a period in such an attribute. There doesn't seem to be any option to turn off this behavior:
```c++
[[gsl::suppress(type .5)]] int uninitialized_on_purpose;
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyklEGPpDYQhX-NuZRAYGAaDhymp9XJJbfcV4WpBmeN7bhM97K_PnJ3b3YmmlNWQlhYPFfV-_SMzHq2RINoj6I9ZbjFxYXBrmZW2eimffhDq-DYXaKQBwbRHjli1ArQotm_UxDtSchuidGzqF-FPAt5NoTBFusPZaHcKuSZbL6xkGflfXq7ifK_NzQ67kKeN9Z2zuNCufI-Vy5QPm96IqMtca4WUl8psKjPV003UZ9Wvqq8OpRC9qBXb2glGxniQqnHsBkC3rwPxKydBYwx6HGLBLzbiN_AB-cd0wTjfhe9CXkU8ghvLhD89m_lz6bT7JT3xazjso2FdkKe37xPwne6T_dqbS8uKMrpsaaehewL-HPRDGiMuzFQMRdgnEIDVwwaR0MM0cFIsGL4ShMgA33zRisdzQ6b1VZHjUZ_pyk1WZ5E-SpeysejHoM9dxPl48wm_Ve__nBIyC7unopWyD5N3J5A2_jx5C_OfvFbSKaJ-vifIo_P392NrhSEfANl0M75xYUVIwjZIYO7wJXCnUbVFVVRJXRobrgzaMsUIgMCe1QEI10SBwRPQbsJtAXe1AL4jmRyjQLB5IitkIcITLQ-nUK7g_MxFYsO4hYsuMsFYvJ5pAWv2oVf8gr-v1nZNNRTX_eY0VAdqqquqqaR2TKU41iPpVK9Quw69VIexpdG1dPYHfqm6vpMD7KUTVnLRpbVQcpCEbYdKTqg7Me-ItGUtKI2hTHXtXBhzjTzRkP30rRVZnAkw_eoS_mekJAyhT8MSZaP28yiKY3myD8Pijqa-zXxQdie4HWadDIazRPeA2aK1oPig2GC_BMeZ1sww8dcPQP1uCxS3eeS--D-IhXv0ePtHq77QP8EAAD__0X2jlo">