[clang] Document that the lifetime of the caller-side `trivial_abi` parameter ends before the call. (PR #116100)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 13 12:10:32 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Richard Smith (zygoloid)
<details>
<summary>Changes</summary>
Fixes #<!-- -->116096.
---
Full diff: https://github.com/llvm/llvm-project/pull/116100.diff
1 Files Affected:
- (modified) clang/include/clang/Basic/AttrDocs.td (+2-1)
``````````diff
diff --git a/clang/include/clang/Basic/AttrDocs.td b/clang/include/clang/Basic/AttrDocs.td
index 21fcd183e8969c..8044eb80a44a72 100644
--- a/clang/include/clang/Basic/AttrDocs.td
+++ b/clang/include/clang/Basic/AttrDocs.td
@@ -4017,7 +4017,8 @@ purposes of calls. For example:
If a type is trivial for the purposes of calls, has a non-trivial destructor,
and is passed as an argument by value, the convention is that the callee will
-destroy the object before returning.
+destroy the object before returning. The lifetime of the copy of the parameter
+in the caller ends without a destructor call when the call begins.
If a type is trivial for the purpose of calls, it is assumed to be trivially
relocatable for the purpose of ``__is_trivially_relocatable``.
``````````
</details>
https://github.com/llvm/llvm-project/pull/116100
More information about the cfe-commits
mailing list