yaxunl marked 2 inline comments as done.
yaxunl added inline comments.

================
Comment at: clang/test/SemaCUDA/function-overload.cu:616
+// HDs have type mismatch whereas H has type match.
+// In device compilation, H wins when -fgpu-defer-diag is off and two HD win
+// when -fgpu-defer-diags is on. In both cases the diagnostic should be
----------------
tra wrote:
> yaxunl wrote:
> > tra wrote:
> > > One thing that bothers me about this comment is that `-fgpu-defer-diag` 
> > > apparently changes the result of the overload resolution, not just 
> > > deferring diags.
> > without -fgpu-defer-diag we have to keep the old incorrect overloading 
> > resolution since otherwise it breaks existing code.
> > 
> > We can only have correct overloading resolution with -fgpu-defer-diag on.
> > 
> > If we want to have correct overloading resolution, not depending on whether 
> > -fgpu-defer-diag is on or off, we have to turn on -fgpu-defer-diag by 
> > default. In this case no existing code will be broken.
> > We can only have correct overloading resolution with -fgpu-defer-diag on.
> 
> `-fgpu-defer-diags` is a **prerequisite** for fixing overload resolution. I'm 
> fine with that.
> Making it serve the double duty of **affecting** the overload resolution is 
> what I was pointing at.
> 
> We should have a knob `fix-overload-resolution` which would then turn 
> `-fgpu-defer-diag` on, not the other way around.
That makes sense. Will add -ffix-overload-resolution.


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

https://reviews.llvm.org/D80450

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

Reply via email to