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

    <tr>
        <th>Summary</th>
        <td>
            [feature request] clang::noescape attribute for functions
        </td>
    </tr>

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

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

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

<pre>
    Currently the noescape attribute can be used to annotate individual pointer(like) arguments - this however quickly becomes useless in generic context, for example it does not work when pointers are passed within structs (e.g. thin wrappers like handles or smart pointers) - one way to solve this would be to enable the noescape attribute to be used on the function itself declaring that none of the pointers passed into the function (be it directly or as nested members of the argument objects) will escape/be saved by the function 'somewhere'.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx1UtuOmzAQ_Rp4GQUlJgnwwEO71f7HGA_gxtisL2Hz9x2zm61atQgJjz0-t0E69ehfkvdko3lAnAmsozDgSoAxei1TJBjQgiRIgRREB2iti8j72ip91yqhgdVpG8kXojX6RoXoAP2UFoYNcGBcHWB2G93Jw1vSw43JJA1uoZBhDYXAaDCRJa8HGByDvcdCvMDoPNA7LqthvgiK1bHECJvzN9hmsk_qwIwEK4asctNMaSFEnwZWwLKomirYNzeP65r7s1KY0SqmB6YJC_r4BZc9HMBZgg0f2XZw5k4fVjaXjMqR8DZZlIb-Fx03PJNzdm8akx2i5kJHNj6CosGg13biU4yMwYxu3Fu_nH264sr9icHG5Ecu2tOQR8g-kBOiEPnCQovM9z_xniMBJ39y925x08bAh-xCvDJYwDvflI-_iZrA0-LAPfc1VUn96XptT9fm2opS9bXq6g7LqKOhvrh8Hwlj4nl4ekuspbj8ALZpp6L-xu8_gspzfrKFMnnTzzGuIfeLV34nnmiSFf8yXBhzf34Oq3fZDJc6BObixaXt6ks59-djo5prjaO4DGdVH0U3jNgJObbj2J4HWRqUZELWWwhhaYMdgtest9S9OApx2p_L-SyqWjbd8YRjo06jkF1bnI-0oDZV1lE5P5W-3yXJNAU-NDrE8PuQZ6gnS3s8GR9TnJ3v16BnLHfifhf-CypoP9Y">