Skip to content

Commit adfa6b7

Browse files
authored
Document that the lifetime of the caller-side trivial_abi parameter ends before the call. (#116100)
Fixes #116096.
1 parent fa0cf3d commit adfa6b7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clang/include/clang/Basic/AttrDocs.td

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4017,7 +4017,8 @@ purposes of calls. For example:
40174017

40184018
If a type is trivial for the purposes of calls, has a non-trivial destructor,
40194019
and is passed as an argument by value, the convention is that the callee will
4020-
destroy the object before returning.
4020+
destroy the object before returning. The lifetime of the copy of the parameter
4021+
in the caller ends without a destructor call when the call begins.
40214022

40224023
If a type is trivial for the purpose of calls, it is assumed to be trivially
40234024
relocatable for the purpose of ``__is_trivially_relocatable``.

0 commit comments

Comments
 (0)