Enabling the compression of CLK_NULL_QUEUE to variable of type queue_t.
Details
Diff Detail
Event Timeline
| lib/Sema/SemaExpr.cpp | ||
|---|---|---|
| 9624 | getLangOpts().OpenCL is redundant because getLangOpts().OpenCLVersion is only set for OpenCL. I would like us to minimize number of this checks in the future. | |
| test/CodeGenOpenCL/null_queue.cl | ||
| 8 | I think this doesn't handle initialization yet: queue_t q = 0; which should also be possible! | |
| 9 | could we just compare directly to 0 to make it simpler? | |
| 10 | Could we check for exactly two occurrences of icmp? | |
| lib/Sema/SemaOverload.cpp | ||
|---|---|---|
| 1784 | Is this covered with testing? I have a feeling we might need a test with overloading functions here? | |
| test/CodeGenOpenCL/null_queue.cl | ||
| 13 | I think it would make sense to have a negative test checking that all other integer literals are rejected. | |
| 14 | Could we also add a function with a queue_t parameter and check that 0 is accepted to be passed in? | |
| test/SemaOpenCL/queue_t_overload.cl | ||
|---|---|---|
| 11 | could we also add something non-convertible for queue i.e. foo(1, src3); | |
getLangOpts().OpenCL is redundant because getLangOpts().OpenCLVersion is only set for OpenCL.
I would like us to minimize number of this checks in the future.