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

    <tr>
        <th>Summary</th>
        <td>
            Clang fails to warn about deprecated volatile-qualified return type
        </td>
    </tr>

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

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

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

<pre>
    Code :
volatile struct amber jurassic();  // Should warn (deprecated) — Clang misses this
void trex(volatile short left_arm, volatile short right_arm);  // Clang warns (correct)
void fly(volatile struct pterosaur* pteranodon);  // OK (no warning expected)

Expected Behavior:
Clang should emit a deprecation warning (-Wvolatile or similar) for the volatile return type in jurassic(), just as GCC does ([Godbolt link](https://godbolt.org/z/ajs7n8P7h)).

Actual Behavior:
Clang only warns about volatile parameters (e.g., trex) but silently accepts the deprecated volatile return type.

https://godbolt.org/z/ajs7n8P7h

</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyMk72SmzAQx59GNDv2yMLYUFDYvuOKFMlMipSZBdYgRyAirZxznj7DR845zxWpPEbw__itFr3XTU-Ui-QokqcIA7fW5V7fcCNlVNr6lp9sTSDig5CHqzXI2hB4dqFiwK4kB5fgRp1KqFSoTMRHAKEKoQr42tpgaviFrgeh0poGRxUy1UJlIJ6VSKXItnAy2DfQae_JA7faT1a6Bnb0KlR6t22tYzB05u_oOqFO8HDkdNMuZ--CzA5jDj8GqaxzVPH40uJ0Nrd3RnO_gclZj8EJdZj-YG9r2z-If_40avZ20td9A_Q6UDW3FHLk9rw8gCO1eNXWzTjnVH6GRJ1mQPjLSNv-TU-odPXtLZt14HWnDbqR4tk64JbuIBxxcD3wbSDQ_eNw1AkuwTOgh5fTCWpLExCRHF9sXVrDYHT_QyRPQqUt8-DHpFPNZj5fW9cIVfwWqsCL3_fpl307CWfrueuh4oDmw6a2N7dlCFjawPfQAzrsiMlNaWjdrMek8_gzKAOD14Z6NjfAqqKB_VT6fqE-7L8k-v8e8hDVeVxncYYR5Zv9Nt5st0myi9q8iikhibFUu2SXVOVmv0llSRXtk3MqkzTSuZIqkbFK5W6bbXbreoeYxgoTme0Q95nYSupQm7Ux1260j7T3gfJNHMepjAyWZPy0iEpVIy-h1LiTLh8_WJWh8WIrjfbs7xKs2VA-4z2jNh54vocL4Q8IrX4GNPqsqf6XVRScyR9IaW5Dua5sJ1QxOi4_q8HZy7Q-xdTAC1UsJa65-hMAAP__BydqbQ">