nvcc does not diagnose overloading resolution diagnostics
if it happens in functions not emitted, e.g., if a device
function calls a host function, it is not diagnosed in
host compilation. clang implemented a similar feature
under option -fgpu-defer-diags.
Although clang is able to defer overloading resolution
diagnostics for common functions. It does not defer
overloading resolution caused diagnostics for overloaded
operators. For example, the diagnostics of this test
https://godbolt.org/z/P5eGrrnEd is deferred by nvcc
but not by clang.
This patch extends the existing deferred
diagnostic mechanism and defers a diagnostic caused
by overloaded operator.