Add a diagnostic for an OpenCL kernel with a pointer pointer argument.
Also refactor the surrounding code a little.