rsmith added inline comments.

================
Comment at: lib/AST/DeclCXX.cpp:1476
+
+  data().HasNonDeletedCopyOrMoveConstructor = !CopyOrMoveDeleted;
 }
----------------
This is wrong. "Has a non-deleted copy or move constructor" is not the same 
thing as "does not have a deleted copy or move constructor". And you will also 
need to check for the case where the class notionally has such a constructor, 
but where we have lazily not yet declared it -- in that case, you may need to 
do arbitrary work (including template instantiation etc) to figure out whether 
the constructor should be deleted.

Please move this check into `Sema` and pass a bool to `completeDefinition` with 
the result of the check. That way you will have the tools available to compute 
the correct value in the case where you need to trigger the declaration of a 
constructor to determine the right answer.


https://reviews.llvm.org/D35056



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to