https://github.com/zygoloid created 
https://github.com/llvm/llvm-project/pull/116100

Fixes #116096.

>From 885c95fcf03f9ab89b7d445ee758c69c77333567 Mon Sep 17 00:00:00 2001
From: Richard Smith <rich...@metafoo.co.uk>
Date: Wed, 13 Nov 2024 12:09:01 -0800
Subject: [PATCH] Document that the lifetime of the caller-side `trivial_abi`
 parameter ends before the call.

Fixes #116096.
---
 clang/include/clang/Basic/AttrDocs.td | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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``.

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to