rsmith added a comment. In https://reviews.llvm.org/D44536#1051232, @rjmccall wrote:
> Right. Again, I'd like Richard to weigh in here, but my suspicion would be > that, somehow, the fact that e is an incomplete type when we type-check that > call is combining poorly with the fact that it's declared by the time that we > generate IR for it. We probably do not record the existence of a pre-emptive > use of the destructor. There is no other way to get into this situation > because every other thing that cares about the existence of a destructor > requires a complete type. Yes, that's exactly the situation. In all other cases, we can mark the destructor itself as used, and trigger synthesis / instantiation at that point, but if the class is incomplete, we don't have a destructor declaration to mark, and we can't even generate one. (That's not the only problem, though: there is state we store on the `CXXDeleteExpr`, such as the `OperatorDelete` and the sized delete flag, that we also need a complete class type in order to correctly generate.) Repository: rC Clang https://reviews.llvm.org/D44536 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits