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

    <tr>
        <th>Summary</th>
        <td>
            Modify -Wreturn-type and add -Wreturn-mismatch from GCC 14
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            enhancement,
            quality-of-implementation,
            clang:diagnostics
      </td>
    </tr>

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

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

<pre>
    GCC 14 modified the way `-Wreturn-type` behaves to split some of its functionality off into `-Wreturn-mismatch` and strengthened some of the diagnostics to be errors by default (with the intention of making them permaerrors in the future). Clang already considers many of these cases to be errors by default already, but we should pick up the new warning flag and try to split our diagnostics similarly for compatibility reasons.

>From https://discourse.llvm.org/t/gcc-14-adds-wreturn-mismatch/74868/1
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0U82OszgQfBpzaRFhQxI4cMhkxJ72vOcGN-Ad_7D-mYi3X5mJZjb76buAZLe7qquqMQS1WKKend_Y-b3AFFfn-xt6Z99Qa4O2GJ3c-z_ud-ANGCfVrEhCXAkeuAO7VOVfnmLytoz7RuxSwUgrflKA6CBsWkUIzhC4GVQMMCc7ReUsahV3cPMMykb30seoYDBOa-6FVkKInuwSV7Ikv3tlAlLhYl2IajrARgLy3vkA4w6SZkw6AhPtQ8X1qFc2ks3guYHBD2WXfG5gI2_w-VbZo3ZOMXliojvBXaNdALUnlDtMzgYlyQcwaPcnlUAwYaDf03i-ZuIOY4rwIAirS1rCpqYPSNuBaekBD_Q285o1Lsf00e8_SrrkX6YOyiiNXu8wOw-TMxtGNapDW08YnA0nVr2z6vb1HbwzsMa4BVbfmBiYGKQKk0s-0EnrT3NyfmFiiEwMyzSVvClRylA-_m-NGK5Ne2mZGHgh-1p2dYcF9fzSdW3bcM6LtW_rhkaS1cxRiOYqxvEiu4ZPdXOVom7bQvWiEjXnvOZNxc_8RB3vUF4rugqccaxYU5FBpb-pFSqERP1VcH4pNI6kwxFdIciuaCcyZCMTgok7E-KfdKSsdHOpzKaPS8z-f1dM2VpW3_6jab47vxe-z5jlmJbAmkqrEMMPi6iipv7PvAw7vOT_sAylhF_SDHPW_muPiuR1_2rDouKaxtPkDBNDBnr-ys27v2nKhhyzhyx9Hv_fAAAA__-heEVN">