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

Michael Liao via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Apr 25 09:32:56 PDT 2020


hliao added inline comments.


================
Comment at: clang/test/CodeGenCUDA/lambda.cu:83
+void test_resolve(void) {
+  test_resolve_helper([&](){ overloaded<int>();});
+}
----------------
We are allowing regular lambda to be used in the device functions. That should be explicitly marked by making that lambda `__device__` or `__host__ __device__`. Even though we may not have static checks for capture so far, that should be easily extended with those attributes.


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

https://reviews.llvm.org/D78655





More information about the cfe-commits mailing list