[PATCH] D92361: [trivial-abi] Support types without a copy or move constructor.

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 30 21:02:04 PST 2020


rjmccall added inline comments.


================
Comment at: clang/include/clang/Basic/AttrDocs.td:2986
 purpose of calls.
-A class annotated with ``trivial_abi`` can have non-trivial destructors or
-copy/move constructors without automatically becoming non-trivial for the
-purposes of calls. For example:
+A class annotated with trivial_abi can have non-trivial destructors or copy/move
+constructors or deleted move and copy constructors without automatically
----------------
zoecarver wrote:
> rjmccall wrote:
> > zoecarver wrote:
> > > I need to add back the back-ticks. 
> > This also needs to be turned into a comma-separated list now that it has three clauses.
> The way I read this is as two clauses, so maybe the first "or" should become an "and." Because non-trivial destructors and non-trivial copy/move constructors sort of go together, and the deleted copy //and// move constructors are the second clause. But then again, maybe not because the "non-trivial destructor" part of it can apply to both. What do you think of:
> 
> > A class annotated with ``trivial_abi`` can have non-trivial copy/move constructors or deleted copy and move constructors, and a non-trivial destructor without automatically becoming non-trivial for the purposes of calls.
> 
> And then the example clarifies that the attribute may be applied to a type with non-trivial copy/move constructors and a non-trivial destructor. 
How about "can have non-trivial (or completely deleted) copy/move constructors or a non-trivial destructor without..."?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92361



More information about the cfe-commits mailing list