Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion clang/include/clang/Basic/AttrDocs.td
Original file line number Diff line number Diff line change
Expand Up @@ -4431,7 +4431,14 @@ 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``.
relocatable for the purpose of ``__is_trivially_relocatable`` and
``__builtin_is_cpp_trivially_relocatable``.
When a type marked with ``[[trivial_abi]]`` is used as a function argument,
the compiler may omit the call to the copy constructor.
Thus, side effects of the copy constructor are potentially not performed.
For example, objects that contain pointers to themselves or otherwise depend
on their address (or the address or their subobjects) should not be declared
``[[trivial_abi]]``.

Attribute ``trivial_abi`` has no effect in the following cases:

Expand Down
Loading