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

    <tr>
        <th>Summary</th>
        <td>
            clang-format does not remove spaces in front of `::`
        </td>
    </tr>

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

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

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

<pre>
    ```
% cat format.cc 
void f() {
  A::    B    ::C d;
}
```

Actual:

```
% out/gn/bin/clang-format format.cc
void f() { A::B ::C d; }
```

Expected:

```
void f() { A::B::C d; }
```

(i.e. no space after `::B`)

I suppose clang-format isn't sure if `::C` is a qualified global symbol or a continuation of a qualified name (?) Is there ever a situation where a globally-qualified identifier follows an identifier? (That heuristic would get it wrong after templates, but it'd still be a progression.)
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyEU9GOqzgM_RrzYhWloRR44KGd2Urzvj8QgqFZhYRNnHbn71dpe2-nV3N1pcjg2D4-B2MVo5kdUQ_1Eer3QiU--9A7o30x-PGzh714HHEAWaNWjJMPi-JSawRxuHgz4gSyBdkhNEcQB8QDVPkgIh6zubtvOEKVE6B5z_YrtDgcNCdlc-bN_bWxTwzyNDuQp8Fkq61y8-bO5UnpG0Y_2BxfaOC3JP76byXNNH5L47fAf8YF2ZqSSnQe46o0oZqYAub4A2IvQHb35A-MaV19JHzRaKID2TDGFAjN9Cx-g71AE1Hhv0lZMxkacbZ-UBbj5zJ4iz6gQu0dG5cUG-_QTy_pTi2EWVl1yuI-IvKZAiFdKJdGw4-66-1aPfDt5-aJYUZynF8DTt5af42o3JdbqE65xd9nxXimFExko_Hqkx1xJkbDeA3ezY9vw7SsVjFFkG84pBwH2YwY2ViLQyaxBj8HitF4V4LsirGvxq7qVEH9tqmrfd2JrivO_UiV1Htq23a3b7ud1k0zdnXTdlXbiGnsCtNLIWvRyEZW1bbqSr3Vgx60anddtdtuK9gJWpSxpbWXpfRhLkyMifptLdq6LawayMbbEkn5dWggZV6r0Oe6zZDmCDthTeT4RGLDlvqXUY-eIjrPGGjxF7r_MxGNwyl4x3l6P6cPe1GkYPsz8xqzL095UQyf01Bqv4A85VaPx2YN_h_SeZduCiLI00PEpZf_BwAA__8XCzYr">