LangRef: note that allockind("free") requires void return

Otherwise we have to work pretty hard to ensure a discarded alloc/free
pair doesn't remove a return value that's still useful.

Differential Revision: https://reviews.llvm.org/D130568
This commit is contained in:
Augie Fackler 2022-07-26 09:59:21 -04:00
parent a41ddf178e
commit 63b1582350

View file

@ -1593,6 +1593,7 @@ example:
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.