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

    <tr>
        <th>Summary</th>
        <td>
            Unsafe buffer usage: calls to [[clang::unsafe_buffer_usage]] constructors are not warned on
        </td>
    </tr>

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

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

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

<pre>
    `[[clang::unsafe_buffer_usage]]` should be applied to any function which can cause OOB when given invalid inputs. However if a constructor is marked unsafe, calls to it do not cause a warning to be generated.

This prevents us from requiring annotations on dangerous constructor calls, such as those types like `span`.

https://godbolt.org/z/debqW3ahx
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMkkFv3CAQhX8NvoyyYsHrrg8-bBpZveXSqsdoDGObhAWHgd2mv76yN1KaniohOAzw3sz7kNlNgagTh3txeKiw5DmmzmLAl-dqiPatE43civfGY5iEPgl9KoFxpKehjCOlp8I4kTg8rKuRwHMs3sJAgMviHVnIETC8wViCyS4GuM7OzGAwgMHCBI-P93CdKcDkLhTAhQt6Z8GFpWTewbd4pQslcCMgmBg4p2JyTOAYzpheyMLNkFBfwaD3vCq6DDZCiPldBOGKKbgwrcWBYKJACTPZnZAPQp5u-_fZMSyJLhQyQ2EYUzxDotfi0voWQ4gZ1y4YYgCLYaIUC3_ytXlYzXAxMyBDniMT5LeFGLx7IRCN5AWDaOQn9TnnhdcRq16ofop2iD7vYpqE6n8L1VsaXn9qnH9VttO21S1W1O2_yKaVet_W1dzhUR9QatSHlgYzGKy1GVEbo1rdjnpfuU5JVUsl1b6tG13vDlQfG6NJ416O7dCKWtIZnd95fzmv2pVjLtQdZX1UlceBPG-4KHUjQqmVnNSt9--GMrGopXec-eOH7LKn7scWEtyogRs1-vSR2P9j9ve0GTDRlvOaL1mIoSrJd__M0uW5DDsTz0L1q6_3425J8ZlMFqrf2mSh-q3TPwEAAP__UFgIlA">