tra added a comment.

In D104505#2833943 <https://reviews.llvm.org/D104505#2833943>, @yaxunl wrote:

> We don't defer such diags by default. We only defer them under option 
> -fgpu-defer-diags, which users have to specify explicitly.

Thank you for pointing this out.  I've missed that all the tests were run with 
the flag -- it was hidden in the diff.

While I can't say I'm happy about deferring unambiguous diags, that train is 
gone. Making -fgpu-defer-diags work more consistently is an improvement.

So, fine. Let's proceed discussing the changes in the patch.



================
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;
----------------
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?



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

https://reviews.llvm.org/D104505

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to