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

    <tr>
        <th>Summary</th>
        <td>
            Member `operator new` and `operator delete` should reject explicit object parameters
        </td>
    </tr>

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

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

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

<pre>
    These functions are members, but they are implicitly static members as in this [draft](https://eel.is/c++draft/class#free-3), which means they shouldn't be allowed to have explicit object parameters.

Snippet:

```C++
#include <new>
#include <memory>

struct S {
    void *operator new(this unsigned long);
 void operator delete(this void*);
    void operator delete(this S*, std::destroying_delete_t);
};
```

[GodBolt](https://godbolt.org/z/vG16GEzGM)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0U8tu4zAM_Br6QjSQ6Vd88CGPOqdetnsvZIuJVchWIMnJpl-_sJNsm0ULGLJAcsjRkJTe68PAXEG2hmwbyTF01lW_5PuJ2cVCRI1Vl-p3x55xPw5t0HbwKB1jz33DzgNtsBkDho4vs133R6NbHcwFfZBBt_dIlB71gKHTHiFbKyf3AbIt0LIL4eghWQHVQDWzWWgPVLdAa6BbINWtkd4DJXvH_JQAlVPpc6fbDnuWg79S8J0djRqAioANozTGnllhsNjJEyP_ubJD27xzG_Aonew5sPMLEFsQq-v5OujjkcPE6YsVcnH9NldmNyslemjNqBgh2Qx8huT5O0_PvXWXT-d8-uDGNuArQnFLh4h4sloh0Moe2clgHU5ZaTlLNw5zyxQaOxwmFZI7cEb9gyg2HPiOmnxAq4f4e6EfIK9z_AZ9UJMOyUqxD85e9HB4u0a-ha_5oNh-3u9KPciXrXdWra35tu0HqxprwsK6A1D9AVSfdnG-e_7YvQCVkaoSVSaljLiKC7FMsliIIuqqoixUXJBq9yLNi5xzkbYci0aUKs-yRka6IkGpoLiMkyxPi0UpYy44LvasmjxLc0gF91KbhTGnfiofae9HrpZEaRkZ2bDx834QDXzG2QlE07q4asI8NePBQyqM9sF_Zgk6GK5e5uFHyMVDM3OBclAP5pv6ubjNMDqeR_TnkY1GZ6r_VNShG5tFa3ugeqJy-z0dnZ3QQPX8gGm_5gf-DQAA__87fj-E">