From: Augie Fackler Date: Tue, 26 Jul 2022 13:59:21 +0000 (-0400) Subject: LangRef: note that `allockind("free")` requires void return X-Git-Tag: upstream/15.0.7~402 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=63b15823505aed9870e797ab8562bbee1a701172;p=platform%2Fupstream%2Fllvm.git 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 --- diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst index 53df75b..bc1f63f 100644 --- a/llvm/docs/LangRef.rst +++ b/llvm/docs/LangRef.rst @@ -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.