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

    <tr>
        <th>Summary</th>
        <td>
            -Wmissing-prototypes regression from llvm19
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            bug,
            clang,
            regression:19
      </td>
    </tr>

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

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

<pre>
    With this reproducer

```
#include<cstdlib>

#pragma clang diagnostic error "-Wmissing-prototypes"

void operator delete( void* ptr, std::size_t size ) noexcept { /* Diagnostic expected */
    (void) ptr; /* avoid unused warning */
    (void) size;
}

int main(){

    int* p = new int;
 *p = 13;
    delete p;

    return 0;
}
```
In llvm18.1.8 you get the error
```
reproducer.cpp:6:6: error: no previous prototype for function 'operator delete' [-Werror,-Wmissing-prototypes]
    6 | void operator delete( void* ptr, std::size_t size ) noexcept { /* Diagnostic expected */
 |      ^
reproducer.cpp:6:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
    6 | void operator delete( void* ptr, std::size_t size ) noexcept { /* Diagnostic expected */
      | ^
      | static 
1 error generated.
```
However from llvm19.1.0, this is no longer caught.
This bug also happens if you define `void operator delete(void*)` without the sized version
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzEVM-PqzYQ_mvMZbQI7ADhwIEkL2oP7anSHiuDB3BFbGSPs2_711cGlGxfd699EZHFML--b76x9F6PBrFhxYkVl0QGmqxrxu43SfR70ln13rxqmoAm7cHh4qwKPTqWtfEps_3JWsaFNv0cFDJx7j2pWXdMfNsduVicHG8S-lmaEZSWo7GedA_onHXAOH95vWnvtRlfFmfJ0vuCnnG-JbhbrcAu6CRZBwpnJGT8CNHOeAsLOcbP4Ekx0TLRev03_kkQD2C8BmPxe48LAatOwPg1xlw-NPF9wZ5QAeNt_Jq1AACMH7f89ZpfPCLl2k4wwaOCN-mMNuOXobEHJk4RR3XZ0GhDcJPaMH5kvGbVaTPHQG1oxQNMXMDg22pYo2OBzZyL3QKwUwHLXmEzOqTgDGT_KvthVr8amOf7LT-meXqEdxtgRAKacJvGD97Pqaf9sjDRlvt_9xYtGAuLw7u2wcNjejBYB0MwPWlrgPHqP_OrgBWnl9ctDT9_qoDisoMqgVVn-P-FEKuuP1Z8-4qNfCOBMJ4K-1m6WK7yJEn3EageVn4fdGgf_eN00ShUQBY6hFVQNpDXCsEO29aRk8bPcg0LRtNP5mPjojrvfDzfN7DAsjbft3pEExtDlf4gqV_sG97RweDsbZNineZpFjtdIa_swGzNiA56GcaJYoo_4rcujCBnb2GSy4LGR2qjhBUO2iCwMvuCk52SuHFlBm-aJhs21Uc2FNzReW1NohqhalHLBJu8OoisOuSlSKamznndCVVhp-p6KPoSkXd1mXeFyHqBKtENz3iRCV7leV5mIuUDr4ZDVXZDXmHGO3bI8Cb1nEbIqXVjor0P2ORCcFEks-xw9utVzHkXxnj78TPjfL00H28OR4c-thqVV0d7cUlcE5O-dGH07JDN2pN_liFNMzaf7Rc8s32cRhLc3ExEi4-yibK4jpqm0KW9vTF-jV77EZP9hT0xfl3ReMavO6B7w_8JAAD__xzd-wY">