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

    <tr>
        <th>Summary</th>
        <td>
            automatically add `lifetimebound` attribute to `move` and `forward` builtins
        </td>
    </tr>

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

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

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

<pre>
    We have a family of builtin functions in namespace `std` that Clang recognizes: `move`, `forward`, `move_if_noexcept`, `addressof`, `as_const`.

Under #59900, libc++ added `[[clang::lifetimebound]]` to these, but that does nothing for libstdc++. (Also, it missed `as_const` and `addressof`.) We should add this attribute automatically to functions that we recognize as being these builtins.

We should also extend Clang's builtin recognition to handle the new function `std::forward_like`, which has the same behavior as the others.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxcU82OszoMfZqwsT4UAqXtgkU7o77B1SyrkBiSe0NSxaGdztNfhf7OJyEQie1zjo8tiezoETu22rPVZyHnZELsfq5jcMHqog_62n0hGHlGkDDIyborhAH62bpkPQyzV8kGT2A9eDkhnaRCYC2npFnLIRmZ4MNJP0JEFUZvf5BYvcshUzgjazkTH_lvCPEio34d5OujHY4-4LfCU3rdSK0jEoXh7YiOKnjKQSXjn4zvbu9_vMYITNSr7ZYvwc72iok9E3uQWqPO2Yv8vco0Wb1j9c7ZAZOdsA-z12z1mZ-sJkAySJjr9HO6qdMBCXxIxvoRhhAzAiV9BymBic3OUcg5NsFkiW6gb5RBev23sJKJLXwhkAmz05krJGMJZErR9nNCkHMKk0xWSeeumdvLjYXYBV89B0nQY2a4CHgYSL-a9YbmKAB-J_T65h4Ta3q6fq-aoTKskV47zIXB4-XJ4jEFS0Pv7h6d_e_h-cVYZcBIWjJJTgg9Gnm2IcL9MCSDkcpCd7Xe1ltZYFe167ptm6baFqYTVdNiJXDgVbse1k212YiVHJRSqlGV6gvbCS5qXlUNF0272pZ8pXm7EXzoka-rWrCG4yStK507T2WIY2GJZuxazgUvnOzR0bIdQmRtyyUTIi9L7HLOn34eiTXcWUr0qpJsctj9dihbyFr-e7ay-U9HU3jbi8dQvBbj6VoxR9eZlE55lZg4MHEYbTJzX6owMXHINO6fP6cY_kWVmDgs5ImJwyLu_wAAAP__qBlMMQ">