[clang] [clang] Lifetime of locals must end before musttail call (PR #109255)
Oliver Stannard via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 20 02:19:43 PDT 2024
================
@@ -637,6 +637,11 @@ return value must be trivially destructible. The calling convention of the
caller and callee must match, and they must not be variadic functions or have
old style K&R C function declarations.
+The lifetimes of all local variables and function parameters end immediately
+before the call to the function. This means that it is undefined behaviour to
+pass a pointer or reference to a local variable to the called function, which
+is not the case without the attribute.
----------------
ostannard wrote:
Done.
https://github.com/llvm/llvm-project/pull/109255
More information about the cfe-commits
mailing list