[PATCH] D44747: Set calling convention for CUDA kernel

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 28 11:50:59 PDT 2018


rjmccall added a comment.

LGTM.

If `__global__` is supported in C++ structures, you might also need to make sure that member function constants (`&A::kernel_function`) drop the CC.  And it might be a good idea to make sure that `decltype(kernel_function)` doesn't have a problem with it, either, since that does do some special-case work.



================
Comment at: lib/Sema/SemaExpr.cpp:1669
+    }
+  }
+
----------------
You should use `getAs<FunctionType>` here (no `const` necessary).  It's possible to declare a function with a typedef of function type, you just can't define it that way.


https://reviews.llvm.org/D44747





More information about the cfe-commits mailing list