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

    <tr>
        <th>Summary</th>
        <td>
            clang-format: QualifierAlignment doesn't work with all-caps namespace
        </td>
    </tr>

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

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

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

<pre>
    clang-format version 19.1.7

`_clang-format`:
```
BasedOnStyle: LLVM
QualifierAlignment: Right
```

`myfile.hpp`:
```
namespace CAPS {
        struct InCaps {};
}

namespace lowercase {
        struct InLowercase {};
}

void use(const CAPS::InCaps &, const lowercase::InLowercase &);
```

`QualifierAlignment: Right` = `east const` should change the declaration of `use` to:
```
void use(CAPS::InCaps const &, lowercase::InLowercase const &);
```
but clang-format mishandles the `CAPS` namespace (and any namespace that is all capital letters), and only modifies the second argument, producing:
```
void use(const CAPS::InCaps &, lowercase::InLowercase const &);
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJycVM2K4zwQfBr5IhJkyfHPwYdMQuCD-difgb0ustW2tStLRmpnyNsvcjIzyWbIYUEQou6u6qqWW4agewtQk80T2ewTOePgfD1KHFo3WwxZ0jh1qlsjbb_qnB8l0iP4oJ2labVO1wVh23hy9vM6ieSMiEvgctj2SQZQX-wLngwQsaXPzz_-J2z7bZZGdxr81ujejmAxBr_rfsC_AM5_x1OnDayHafqUxcoRwiRboLvt1xdKiqelsgro5xbpf3Ynp7BcF3silmCxP4N_lBr3Cr6VAT6pf76J3YEcnVZ0DkB42TobcGkjtim2b9w8J3xHz9F3preUK_iYV13g72x4ZFvOKBF7SnIGMuCZKV6Gwc1G0XaQtgeKA1AFrZFeYhyo62JFbD1nFN29tVfS7kSd1VykPRB1lfeJtGZGevPYRh0GaZWBsLRLcrYw54x-DIvwUlpFpT1dXeIgkepApTG0lZNGaagBRPAhMvMdjTXOmhMdnYpGnhkCtC6C-X5ePOU7Onmn5lbb_qEjj4f9b44kqhaqEpVMoE6LDStYVmYiGeqs6Kq8KRuVl0WadUIVpehyzmVVdJ2omkTXnPENy7lIy03GxHrTiaJUjBdpmrNGCJIxGKU2a2OO49r5PtEhzFCn2UaUZWJkAyYse4Hzmy-b87gpfB3rVs3cB5IxowOGDyTUaOBmacSnef9gqXIQLOEF0lfnf9NXjUMc2KqNzr3PMpm9qQfEKUTz-IHwQ69xmJt160bCD5H38rOavPsFLRJ-WOQEwg8XRcea_wkAAP__FGWDsA">