rsmith added a comment.
Herald added a subscriber: herhut.

This doesn't look quite right to me. I don't think we should treat the `delete 
this;` for a destructor as being emitted-for-device in any translation unit in 
which the vtable is marked used. (For example, if in your testcase 
`MSEmitDeletingDtor::CFileStream::CFileStream()` were a `__host__` function, I 
think you'd still diagnose, but presumably shouldn't do so, because the vtable 
-- and therefore `CFileStream::operator delete` -- is never referenced / 
emitted for the device.) Instead, I think we should treat the `delete this;` as 
being emitted in any translation unit in which the vtable itself is 
emitted-for-device. Presumably, this means you will need to model / track usage 
of the vtable itself in your "call graph".


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

https://reviews.llvm.org/D70172



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

Reply via email to