Skip to content

Commit 76643c4

Browse files
committed
[LangRef] State that a nocapture pointer cannot be returned
This is a small patch stating that a nocapture pointer cannot be returned. Discussed in D93189. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D94386
1 parent 0c8466c commit 76643c4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/docs/LangRef.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1193,7 +1193,8 @@ Currently, only the following parameter attributes are defined:
11931193

11941194
``nocapture``
11951195
This indicates that the callee does not make any copies of the
1196-
pointer that outlive the callee itself. This is not a valid
1196+
pointer that outlive the callee itself in any form such as a pointer stored
1197+
in the memory or as a return value. This is not a valid
11971198
attribute for return values. Addresses used in volatile operations
11981199
are considered to be captured.
11991200

0 commit comments

Comments
 (0)