Disallow trivial_abi on a class if all copy and move constructors are
authorAkira Hatanaka <ahatanaka@apple.com>
Tue, 9 Jun 2020 19:02:25 +0000 (12:02 -0700)
committerAkira Hatanaka <ahatanaka@apple.com>
Wed, 10 Jun 2020 21:12:13 +0000 (14:12 -0700)
commitf466f0beda59af1af182deb3cc8c006093d5a169
tree7a432dff9f24d601bb52a31049f3e1e0b3910508
parent661fcfcd8afa4fbf4284a1ea8c0fc948dcc8fcac
Disallow trivial_abi on a class if all copy and move constructors are
deleted

Instead of forcing the class to be passed in registers, which was what
r350920 did, issue a warning and inform the user that the attribute
cannot be used.

For more background, see this discussion:
http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20190128/259907.html

This fixes PR39683.

rdar://problem/47308221

Differential Revision: https://reviews.llvm.org/D57626
clang/include/clang/Basic/AttrDocs.td
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Sema/SemaDeclCXX.cpp
clang/test/SemaObjCXX/attr-trivial-abi.mm