This patch will allow the cast of 0 to event_t type.
Is above use have been hint by some test cases?
Please do not use DOS format.
OpenCL v2.0 s6.13.10 - ....
(Self.getLangOpts().OpenCL) -> Self.getLangOpts().OpenCL
Sema has a context.
There is a CK_ZeroToOCLEvent, why not use that?
Please name this variable properly: http://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly
Don't have an else after return. http://llvm.org/docs/CodingStandards.html#don-t-use-else-after-a-return
A similar patch has been submitted and rejected several times:
These were all before OpenCL 2.0. The 1.2 spec does not allow this, so I think this should be guarded by an OpenCL version check.
OpenCL WG has clarified that explicit or implicit cast of 0 to event_t is allowed. It does not make sense to only allow implicit cast but not allow explicit cast. So I think we should move on with this patch.