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

    <tr>
        <th>Summary</th>
        <td>
            clang-format QualifierAlignment=Right breaks qualifiers with MOCK_METHOD
        </td>
    </tr>

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

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

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

<pre>
    Say I want to mock MyClass::myMethod using Google Mock:

```
class MyClass {
public:
  virtual ReturnType myMethod(int) const = 0;
};

```
I'd use:
```
MOCK_METHOD(ReturnType, myMethod, (int), (const override))
```
but clang-format with QualifierAlignment=Right turns that into:
```
MOCK_METHOD(ReturnType, myMethod, (int), (override const))
```
an error.

See documentation for Google Mock here:
https://google.github.io/googletest/reference/mocking.html
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJysk01vozwUhX-N2VwVObb5WrBIkzfvVKOomrb7kYELuDF2xjap8u9HBNKm1WhWI1kC_HGf43Mu0nvVGcSSJPck2UZyDL11ZSXNq81EVNnmXD7LMzzAmzQBgoXB1gfYnzdaek_4mvD1cN5j6G0Do1emg_-t7TTC3taHaZ1eRkqXQdf1dPJaAUh2T-j6OFZa1fN2gJNyYZQanjCMzrycjwhXBmG5MoGwAmprfADCt0AJn2qQbLu8fOY9EJZN2nBRc7O0f9x8_7n_7-Xb45aw_ANH2OaGuIF36vIxs-0JnVMNXuaLL6WrMUCtpenuWusGGeBNhR5-jFKrVqFba9WZAU0gfPukuj7AxPYQehlAmWD_ndirzNmxP4qVBtA56-LZvWdEaGw9TvpkUNZAa91trtCjW-zsQzhe-oDtCNt1lz1xp0I_VrGy71MBJ_TOYYsOTY2E7aZGUqaL-zDoqCl5U_BCRliusiTJV4zmRdSXQvCMNaloi5ZTmjaciTRtqopTLgXHKlIloyyhOVuxFReiiDFvizbJRZvSrMAsI4LiIJWOtT4NsXVdpLwfsVwlIhdppGWF2l_an7HbwAhj0w_hyuncXTV2ngiqlQ_-o1JQQWP5Kea_JFw5lAcPv647_NwTN7lGo9PlF0dnK2s7ELabwMvj7ujsK9aTqZf7eMJ2y5VOJfsdAAD__-r6MhA">