[clang] adfa6b7 - Document that the lifetime of the caller-side `trivial_abi` parameter ends before the call. (#116100)

via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 13 15:38:48 PST 2024


Author: Richard Smith
Date: 2024-11-13T15:38:44-08:00
New Revision: adfa6b762dc53bc53377785d824264a3311e829d

URL: https://github.com/llvm/llvm-project/commit/adfa6b762dc53bc53377785d824264a3311e829d
DIFF: https://github.com/llvm/llvm-project/commit/adfa6b762dc53bc53377785d824264a3311e829d.diff

LOG: Document that the lifetime of the caller-side `trivial_abi` parameter ends before the call. (#116100)

Fixes #116096.

Added: 
    

Modified: 
    clang/include/clang/Basic/AttrDocs.td

Removed: 
    


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


        


More information about the cfe-commits mailing list