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

    <tr>
        <th>Summary</th>
        <td>
            [clang-format]: no space before trailing comment
        </td>
    </tr>

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

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

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

<pre>
    # to reproduce

`.clang-format`
```yaml
---
AlignAfterOpenBracket: BlockIndent
AlignArrayOfStructures: Right
BinPackArguments: 'false'
ColumnLimit: '120'
ContinuationIndentWidth: '1'
IndentWidth: '1'
Language: Cpp
SpacesBeforeTrailingComments: '1'
SpacesInLineCommentPrefix:
  Minimum: 1
  Maximum: -1
Standard: Latest
TabWidth: '1'
UseCRLF: 'false'
UseTab: ForContinuationAndIndentation

...
```

`main.cpp`:
```cpp
type tree( //
        2,
        { // comment
                tree(3, {78, 89, 96}),
                tree(4, {32, 64, 128}),
                tree(42, {98, 99, 100})
        }
);
```

# expected result

formatting is not changed

# actual result

```cpp
type tree( //
        2,
        {// comment
                tree(3, {78, 89, 96}),
                tree(4, {32, 64, 128}),
                tree(42, {98, 99, 100})}
);
```
The space before `// comment` is removed

# version

```console
$ clang-format --version
Debian clang-format version 15.0.0-++20220513071846+693758b28295-1~exp1~20220513071937.249
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzVVU2PmzAQ_TXkYoGMCQkcOISkkVZKtavuVj0bGIi7xkS22W7-fcdAPrtaVeqpEgJ73pvx8JgZiq46Zh6LiO2IhoPuqr4Ej248upruCxqUkqvGrzvdcov7MzBeR97K0eT7_rhYSdGoVW1BPx5A5ZqXr2C9aEVy2ZWvD6oCZa-ZWvPjY_1sdV_aXoNx1G-i2U-kXKgnDLHSTd-i5wB7bFlzaQCfI2ndyb5VO9EKO-Eho1eoskL13IpOjef_EJXdn5hn3mfYDlXoeQMOWB8Oo_H5wEswOaA68KK5kEI16669zvMSYSQ_YJYKJtKThlq8I3NkEPJVKNH2rfMNzzb-frL5k_HZclVxXTnbjlswk1YvvPg4--8G1t922w-1Qwz9HLTt9LVUK1WNigy767oIguCuDu6qpuVCBSXKhEi0uuOWJ_ns8QDEasBcEsxr664pTso8tj5vvGU-4aQclbtANJ0iROhBkLlM3CJJ3T1deMuNx9KbYGeP-eQRucPIYtiGLPnUhU0-6XBKOpwSUjr5XBLeTGs0RvlnYmH7wfsBSgsVNqHppb2Gx77DT9IQYYjqLCn3WIlQ3cfg2DxcfhDh32T_L1T_C7Ff9kCMa0BSDN1KHHL7bgvqJNbQdm9_yvsG2tw1wUXYTplOngYnm5PrkUl8_8Z3A4Xg6pYyEUgYBzSgvsdQ9pxRxmgcRnQZJvMFGhZptIyTgiUsjXEQLL9g2bjHFREZAZund_nNqiyq0ijlMyushMyL85uhHm9c86vuViA7zbOTPrNey2xv7cFNtlG6Rth9XwRIwI2Ub6eHj7-Sn1jRuBXG9DjS2TaO58lyts_SqgZehXOANCpoMa_SmtZVlIRJEnJczCQvQBqXpMeYgl9kCIFrzHMmsultYxQljOKAJUkEcYqGhC441N6cAg4fGbg8gk43M50NKRV9YxCUwlhzAbkx-AuCQRMXn_d23-lMNLwRZjacnA2Z_wYuSPiD">