[PATCH] D91281: [CUDA][HIP] Diagnose reference of host variable

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 8 14:26:33 PST 2020


tra added a comment.

It appears that we need to add special handling for texture/surface references. Nominally they are host-side objects, but they are accessed/used from device functions as far as Sema is concerned.

E.g. https://godbolt.org/z/z1YnE3 
NVCC and older clang compile it, but the recent one fails because this patch does not let the change through.
I think `isCUDADeviceBuiltinTextureType` has problem handling texture refs within templates.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91281



More information about the cfe-commits mailing list