Defaulted destructor was treated inconsistently, compared to other compiler-generated functions.
When Sema::IdentifyCUDATarget() got called on just-created dtor which didn't have
implicit __host__ __device__ attributes applied yet, it would treat it as a host function.
That happened to (sometimes) hide the error when dtor referred to a host-only functions.
Even when we had identified defaulted dtor as a HD function, we still treated it inconsistently during
selection of usual deallocators, where we did not allow referring to wrong-side functions, while it
is allowed for other HD functions.
This change brings handling of defaulted dtors in line with other HD functions.
Is this safe? What happens if the destructor for the variable is a template, and instantiating that template results in a reference to a device function? Eg: