[PATCH] D57626: Disallow trivial_abi on a class if all copy and move constructors are deleted

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 1 15:49:58 PST 2019


rjmccall added inline comments.


================
Comment at: lib/Sema/SemaDeclCXX.cpp:7886
+  if (!HasNonDeletedCopyOrMoveConstructor()) {
+    PrintDiagAndRemoveAttr();
+    return;
----------------
This is not a very useful diagnostic.  We have several different reasons why we reject the attribute, some of which are pretty subtle, and it's not reasonable to expect users to puzzle it out.  At the very least we can tell them the immediate cause for all of these rejections.


Repository:
  rC Clang

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

https://reviews.llvm.org/D57626





More information about the cfe-commits mailing list