[PATCH] D78655: [HIP] Let lambda be host device by default

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 23 20:38:57 PDT 2020


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


================
Comment at: clang/lib/Sema/SemaCUDA.cpp:723
+    Method->addAttr(CUDADeviceAttr::CreateImplicit(Context));
+    Method->addAttr(CUDAHostAttr::CreateImplicit(Context));
+    return;
----------------
pfultz2 wrote:
> Shouldn't we add these attributes if there are no host and device attributes? This seems like it will treat `[]() __device__ {}` as host device.
There is check on line 716. We only reach here if there is no device and host attrs on the function.


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

https://reviews.llvm.org/D78655





More information about the cfe-commits mailing list