tra added inline comments.
================ Comment at: test/SemaCUDA/call-host-fn-from-device.cu:88 __host__ __device__ void class_specific_delete(T *t, U *u) { - delete t; // ok, call sized device delete even though host has preferable non-sized version + delete t; // expected-error {{reference to __host__ function 'operator delete' in __host__ __device__ function}} delete u; // ok, call non-sized HD delete rather than sized D delete ---------------- The C++ magic is way above my paygrade, but as far as CUDA goes this is a regression, compared to what nvcc does. This code in NVCC produced a warning and clang should not error out at this point in time either as it's not an error to call a host function from HD unless we use HD in a host function, and we would not know how it's used until later. I think the error should be postponed until codegen. Repository: rC Clang https://reviews.llvm.org/D47757 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits