[PATCH] D17412: PR19957: [OpenCL] incorrectly accepts implicit address space conversion with ternary operator

Yaxun Liu via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 30 08:58:05 PDT 2016


yaxunl added inline comments.

================
Comment at: test/SemaOpenCL/address-spaces-conversions-cl2.0.cl:276
@@ +275,3 @@
+  constant char *arg_const_ch;
+  var_void_const = 0 ? var_cond : arg_const_ch;
+#ifndef CONSTANT
----------------
Anastasia wrote:
> btw, what happens if we assign into non void* var? Do we get another error?
No error, since void pointer can be casted to non-void pointer implicitly in C.


http://reviews.llvm.org/D17412





More information about the cfe-commits mailing list