Anastasia accepted this revision.
Anastasia added a comment.
This revision is now accepted and ready to land.

LGTM! Thanks!

The testing can be improved before committing!



================
Comment at: clang/lib/Sema/SemaDecl.cpp:8638
     // array, this recursive call only happens once.
     return getOpenCLKernelParameterType(S, QualType(UnderlyingTy, 0));
   }
----------------
svenvh wrote:
> Anastasia wrote:
> > Btw I am surprised that we recurse to check the underlying type of an array 
> > but not the pointer. I guess this spec wording implies that pointed types 
> > should be checked too?
> > 
> > > The   size   in   bytes   of   these   types   areimplementation-defined  
> > > and  in  addition  can  also  be  different  for  the  OpenCL  device  
> > > and  the host processor making it difficult to allocate buffer objects to 
> > > be passed as arguments to a kernel declared as pointer to these types.
> > 
> > 
> > Also I can't find anything specific to the arrays...
> > 
> > Do you think we need to chase this with the spec?
> I have raised https://github.com/KhronosGroup/OpenCL-Docs/issues/504
Great! Thanks!


================
Comment at: clang/test/SemaOpenCL/invalid-kernel-parameters.cl:13
 kernel void no_ptrptr(global int * global *i) { }
+kernel void no_ptrptrptr(global int * global * global *i) { }
 
----------------
Btw this was missing in the original testing, could we add a line with 
`__constant ` and `__local`? Or perhaps just replace the first two `global` in 
this line.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92091

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to