tra added a comment.
Drive-by review:
The patch could use a better description.
Something that describes *what* the patch does (E.g. enforce that attributes
X/Y/Z are only applied to __global__ functions.)
*why* the change is needed is relevant, too, but it's not very useful without
the *what* part.
================
Comment at: test/SemaCUDA/amdgpu-attrs.cu:66-69
+// expected-error@+2{{attribute 'reqd_work_group_size' can only be applied to
a kernel function}}
+__attribute__((reqd_work_group_size(32, 64, 64)))
+__global__ void reqd_work_group_size_32_64_64() {}
+
----------------
This is confusing. Isn't `kernel` == `__global__` function?
Considering that the error message is `diag::err_opencl_kernel_attr`, I think
the diagnostics should say `applied to a OpenCL kernel function`
https://reviews.llvm.org/D47958
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits