[PATCH] D16047: [OpenCL] Add Sema checks for OpenCL 2.0
Xiuli PAN via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 26 20:22:44 PST 2016
pxli168 marked 6 inline comments as done.
pxli168 added a comment.
I will separate this patch into small ones.
================
Comment at: lib/Sema/SemaDecl.cpp:5724
@@ +5723,3 @@
+ R->isPipeType()) {
+ Diag(D.getIdentifierLoc(),
+ diag::err_opencl_type_can_only_be_used_as_function_parameter)
----------------
Anastasia wrote:
> pxli168 wrote:
> > Anastasia wrote:
> > > Some of them have to be. For example for C types that we use differently in CL. But for CL only types do we need to check additionally that it's CL? Do we not know it already?
> > Yes, but it seems all old code write in that way. I just follow the style.
> Ok, I think an improvement to the old code is always welcome!
OK, I think we can try here to see if it will bring some errors.
================
Comment at: lib/Sema/SemaDecl.cpp:7279
@@ -7228,1 +7278,3 @@
+ if (PT->isReserveIDT())
+ return InvalidKernelParam;
----------------
Anastasia wrote:
> Is there a test for this?
I will add one.
http://reviews.llvm.org/D16047
More information about the cfe-commits
mailing list