[PATCH] D16682: 19957 - OpenCL incorrectly accepts implicit address space conversion with ternary operator
Anastasia Stulova via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 5 10:37:56 PST 2016
Anastasia added inline comments.
================
Comment at: test/SemaOpenCL/ternary-implicit-casts.cl:6
@@ +5,3 @@
+ // will not compile, ptr is not generic but local
+ local int *ptr = cond ? gint : lint; // expected-warning {{pointer type mismatch ('__global int *' and '__local int *')}} expected-error {{initializing '__local int *' with an expression of type 'void *' changes address space of pointer}}
+}
----------------
Again, I am not quite clear about the purpose of this change.
We have similar testing in test/SemaOpenCL/address-spaces-conversions-cl2.0.cl.
However, the diagnostics, that Clang currently gives, seem wrong to me. We might need to investigate that.
http://reviews.llvm.org/D16682
More information about the cfe-commits
mailing list