[PATCH] D16261: [CUDA] Only allow __global__ on free functions and static member functions.

Artem Belevich via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 19 10:35:31 PST 2016


tra added inline comments.

================
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:6418
@@ +6417,3 @@
+def warn_nvcc_compat_kern_is_method : Warning<
+  "kernel function %0 is a member function; this may not be accepted by nvcc">,
+  InGroup<CudaCompat>;
----------------
There's an Extension<> tablegen class used to report various C and C++ extensions.
This looks like a good use case for it.

================
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:6421
@@ +6420,3 @@
+def warn_nvcc_compat_kern_is_inlined : Warning<
+  "kernel function %0 is inlined; this may not be accepted by nvcc">,
+  InGroup<CudaCompat>;
----------------
Perhaps we should use the same message as nvcc here:
'inline qualifier ignored for "global" function'


http://reviews.llvm.org/D16261





More information about the cfe-commits mailing list