[PATCH] D114902: [Attrs] Elaborate on the trivial_abi documentation

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 1 17:03:11 PST 2021


rjmccall added inline comments.


================
Comment at: clang/include/clang/Basic/AttrDocs.td:3217
+are balanced, and that this attribute can safely be applied to
+reference-counting smart pointers.
+
----------------
I would change the first sentence here to:

> Arguments of ``trivial_abi`` type are destroyed in the callee, not the caller.

The rest of this paragraph seems to be restating the first sentence in ways that I would expect users to find more confusing than helpful.

You might add something like: "On some platforms, arguments are normally not destroyed until the end of the full expression containing the call; ``trivial_abi`` arguments will therefore be destroyed earlier than usual, immediately before the called function returns."


================
Comment at: clang/include/clang/Basic/AttrDocs.td:3267
 and is passed as an argument by value, the convention is that the callee will
 destroy the object before returning.
 
----------------
This paragraph is redundant with the new paragraph above.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D114902/new/

https://reviews.llvm.org/D114902



More information about the cfe-commits mailing list