[PATCH] D104505: [HIP] Defer operator overloading errors

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 23 11:21:59 PDT 2021


yaxunl added inline comments.


================
Comment at: clang/test/SemaCUDA/deferred-oeverload.cu:55
  callee3(); // dev-error {{no matching function for call to 'callee3'}}
  callee4(); // com-error {{no matching function for call to 'callee4'}}
+ S s;
----------------
tra wrote:
> If we're allowing to postpone an invalid call of a host function, shouldn't we also allow postponing other errors? 
> E.g. should we postpone the error on an attempt to call `callee4()` ?
> Similarly, if we were to call a `undeclared_func()` here, should the error also be postponed?
> 
> TBH, I don't quite understand now how to tell what is and isn't supposed to be deferred with `-fgpu-defer-diags`.
> Is there a clear criteria what should and should not be deferred?
> 
We discussed about what diagnostics to be deferred before. We do not want to defer all diagnostics since nvcc apparently only ignores host/device related diagnostics. Our previous conclusion is to defer overloading resolution related diagnostics when the full candidates set include host device functions or wrong-sided candidates. This roughly matches nvcc's behavior.


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

https://reviews.llvm.org/D104505



More information about the cfe-commits mailing list