Anastasia added inline comments.
================
Comment at: lib/Sema/SemaOverload.cpp:1784
FromType = ToType;
+ } else if (ToType->isQueueT() &&
+ From->isIntegerConstantExpr(S.getASTContext()) &&
----------------
Is this covered with testing? I have a feeling we might need a test with
overloading functions here?
================
Comment at: test/CodeGenOpenCL/null_queue.cl:12
+void init() {
+ queue_t q = 0;
+ // CHECK: store %opencl.queue_t* null, %opencl.queue_t** %q
----------------
I think it would make sense to have a negative test checking that all other
integer literals are rejected.
================
Comment at: test/CodeGenOpenCL/null_queue.cl:13
+ queue_t q = 0;
+ // CHECK: store %opencl.queue_t* null, %opencl.queue_t** %q
+}
----------------
Could we also add a function with a queue_t parameter and check that 0 is
accepted to be passed in?
https://reviews.llvm.org/D27569
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits