[PATCH] D100141: [nofree] Restrict semantics to memory visible to caller

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 15 09:41:41 PDT 2021


jdoerfert added a comment.

Suggestion to make the text clearer.



================
Comment at: llvm/docs/LangRef.rst:1580-1594
     This function attribute indicates that the function does not, directly or
-    indirectly, call a memory-deallocation function (free, for example). As a
-    result, uncaptured pointers that are known to be dereferenceable prior to a
-    call to a function with the ``nofree`` attribute are still known to be
-    dereferenceable after the call (the capturing condition is necessary in
-    environments where the function might communicate the pointer to another thread
-    which then deallocates the memory).
+    indirectly, call a memory-deallocation function (free, for example) on
+    a memory allocation which existed before the call.
+
+    As a result, uncaptured pointers that are known to be dereferenceable
+    prior to a call to a function with the ``nofree`` attribute are still
+    known to be dereferenceable after the call (the capturing condition is
----------------



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100141/new/

https://reviews.llvm.org/D100141



More information about the llvm-commits mailing list