[PATCH] D27569: [OpenCL] Enabling the usage of CLK_NULL_QUEUE as compare operand.
Anastasia Stulova via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 15 10:38:09 PST 2016
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
More information about the cfe-commits
mailing list