[PATCH] D94386: [LangRef] State that a nocapture pointer cannot be returned

Juneyoung Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 10 21:44:09 PST 2021


aqjune created this revision.
aqjune added a reviewer: jdoerfert.
aqjune requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This is a small patch stating that a nocapture pointer cannot be returned.

Discussed in D93189 <https://reviews.llvm.org/D93189>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D94386

Files:
  llvm/docs/LangRef.rst


Index: llvm/docs/LangRef.rst
===================================================================
--- llvm/docs/LangRef.rst
+++ llvm/docs/LangRef.rst
@@ -1193,7 +1193,8 @@
 
 ``nocapture``
     This indicates that the callee does not make any copies of the
-    pointer that outlive the callee itself. This is not a valid
+    pointer that outlive the callee itself in any form such as a pointer stored
+    in the memory or as a return value. This is not a valid
     attribute for return values.  Addresses used in volatile operations
     are considered to be captured.
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94386.315701.patch
Type: text/x-patch
Size: 574 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210111/ce821c5c/attachment.bin>


More information about the llvm-commits mailing list