pxli168 added a comment. The pointer type seems to be not that important, we can just cast it to any type we want.
================ Comment at: test/SemaOpenCL/to_addr_builtin.cl:24 @@ +23,3 @@ + + glob = to_global(con); +#if __OPENCL_C_VERSION__ < CL_VERSION_2_0 ---------------- should this return a NULL or a build error? ================ Comment at: test/SemaOpenCL/to_addr_builtin.cl:35 @@ +34,3 @@ +#else + // expected-error@-4{{assigning '__global int *' to '__local int *' changes address space of pointer}} +#endif ---------------- I think this will be handled by pointer bitcast if we used some void* as well, the address space is the important thing of these built-ins. http://reviews.llvm.org/D19932 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits