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

    <tr>
        <th>Summary</th>
        <td>
            Clang rejects valid program by not removing top-level cv-qualifier when overloading explicit object member function 
        </td>
    </tr>

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

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

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

<pre>
    The following [valid program]() is rejected by clang but accepted by other three compilers. [Demo](https://godbolt.org/z/MGWbYdr8n)

```
struct C {
    void j(this const C);
    void j() const ;             //#1: Clang:Nope while gcc and msvc:Ok 
};

```

As explained in [this thread](https://stackoverflow.com/questions/78758215/explicit-object-member-function-discrepancies-between-different-compilers) this is well-formed. Clang doesn't seem to remove the top-level const qualifier from the first overload.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsU02PmzAQ_TXmMiICG0I4cEg2oqe2l0pVj8YewLvGZm1Duv31lQP70WoRMmI0PN68N497rwaD2JDyQsprwpcwWtc4bjg31s5JZ-VL82NE6K3W9qbMAKS8rFwrCbOzg-MTKa-EngitQXlw-IgioITuBYTmZoBuCcCFwHmv2jCigzA6RBB2mpVG5w8R9YqT3cDGEGZP2JnQltB2sLKzOhysGwht_xDafv3ys_sl3ckQWpPsSrLzfh6z_b6_-uAWEeABSHXZKgAAq1USHgk9hVF5ENb4AA8RiH3WFOfaegi7wMdrI0coywk7w0MclrDzNzsj3EalEQYhgBsJk18FYefvT7CzrK5v__qU93aePeDvWXNlUIIyUaE74ygdl58J5QMXT3ZF12t7Owg7Edo-L-iDssYT2lanqjzRvCS0jchKqJDaLhqWTjh16NJ-MSJ2p1J54XDmRij0aYfhhhirfY8OTUjfnIv63GkpDzfUOu2tm1AeNkFAWvSG0CqAR5wgWHA42RUhjAjBzqnGFfWu8PPCteoVOuidne4tvXI-QJxJWy4PiWyYrFnNE2zyiuYnRikrkrEpGR7zush51XGs8_LYH3nR5-x4OmZFV7BENTSjRVbRIi8KVhYH7BhWR8bKrqhoXzNSZDhxpQ9ar1PctUR5v2CTZxmri0TzDrW_54TS-2YTSmNkXBM_SLtl8KTItPLBv0MEFTQ2mxRbNDz8E56YCGPDpkpM1wdN1vRdkNuI5k2G2PdqIGwGwmYgvBoIyeJ081-OVBiXbt-LSHF_pLOzEYPQ9j5yXJV96rWhfwMAAP__NLhSrw">