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

================
Comment at: clang/lib/Sema/SemaCUDA.cpp:757-759
+  // In host compilation, deferred diagnostics are only emitted for functions
+  // which are sure to be emitted on host side since there is no reliable
+  // way to check if a function is emitted on device side. Therefore in
----------------
tra wrote:
> I don't think this is completely correct. Postponed diags get emitted if we 
> know we're attempoting to codegen wrong things.
> E.g. during host compilation when HD function used by host code ends up 
> attempting to call a device function.
> It also works in the other direction -- it kicks in during device compilation 
> when HD function calls a host function.
> AFAICT it has nothing to do with what happens on the other side of the 
> compilation, but rather what we're attempting to codegen during *this* 
> compilation.
> 
> I don't think that we can reason that checks can be done on the host side 
> only, based only on the argument you're making above (at least based on the 
> way I understand it).
> 
> The point you're making below that a captured lambda created by device code 
> can't ever be used by the host code is probably a better argument why the 
> check may not be necessary.
> 
Revised the comments.


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

https://reviews.llvm.org/D78655



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

Reply via email to