[PATCH] D130568: LangRef: note that `allockind("free")` requires void return
Augie Fackler via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 26 07:00:25 PDT 2022
durin42 created this revision.
Herald added a subscriber: jdoerfert.
Herald added a project: All.
durin42 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Otherwise we have to work pretty hard to ensure a discarded alloc/free
pair doesn't remove a return value that's still useful.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D130568
Files:
llvm/docs/LangRef.rst
Index: llvm/docs/LangRef.rst
===================================================================
--- llvm/docs/LangRef.rst
+++ llvm/docs/LangRef.rst
@@ -1593,6 +1593,7 @@
will match that of the ``allocptr`` argument and the ``allocptr``
argument is invalidated, even if the function returns the same address.
* "free": the function frees the block of memory specified by ``allocptr``.
+ Functions marked as "free" ``allockind`` must return void.
* "uninitialized": Any newly-allocated memory (either a new block from
a "alloc" function or the enlarged capacity from a "realloc" function)
will be uninitialized.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130568.447673.patch
Type: text/x-patch
Size: 654 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220726/d57e7c25/attachment.bin>
More information about the llvm-commits
mailing list