[PATCH] D104505: [HIP] Defer operator overloading errors
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 22 10:43:12 PDT 2021
tra added a comment.
In D104505#2833271 <https://reviews.llvm.org/D104505#2833271>, @yaxunl wrote:
> Such host/device overloading resolution induced issue is not limited to device functions calling host functions.
It does not change the fact that the code in the test above is invalid, regardless of whether we compile it on the host or on the device.
> It could also happen to host device functions calling host functions, which is less controversial for deferring.
H/D functions are special, because their overloading is affected whether compilation is done on the host or on the device side and we often can not tell whether the diagnostic is appropriate until codegen.
I still think that deferring diags for unambiguously invalid code is not a good idea. The fact that NVCC can only diagnose such errors during device-side compilation is not a good enough reason, IMO, to make clang ignore real errors, even if we'd still end up eventually failing later, during device-side compilation.
@rsmith, @rjmccall -- any thoughts?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104505/new/
https://reviews.llvm.org/D104505
More information about the cfe-commits
mailing list