[PATCH] D38857: [OpenCL] Improve printing and semantic check related to implicit addr space

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 13 08:50:54 PDT 2017


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

LGTM! Thanks!

Can we close https://bugs.llvm.org/show_bug.cgi?id=33418 after this commit?



================
Comment at: test/SemaOpenCL/null_literal.cl:38
 
-#ifdef CL20
-// Accept explicitly pointer to generic address space in OpenCL v2.0.
-global int* ptr5 = (generic void*)0;
-#endif
-
-global int* ptr6 = (local void*)0; // expected-error{{initializing '__global int *' with an expression of type '__local void *' changes address space of pointer}}
+  global int *g7 = (global void*)(generic void *)0;
+  constant int *c7 = (constant void*)(generic void *)0; //expected-error{{casting '__generic void *' to type '__constant void *' changes address space of pointer}}
----------------
Does this extra cast test anything we already miss to test?


https://reviews.llvm.org/D38857





More information about the cfe-commits mailing list