[PATCH] D17578: [OpenCL]Allowing explicit conversion of "0" to event_t type

Tom Stellard via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 26 13:02:57 PST 2016

tstellarAMD added a comment.

Comment at: lib/Sema/SemaCast.cpp:2317
@@ +2316,3 @@
+    // OpenCL v2.0 s6.13.10 - Allow casts from '0' to event_t type.
+    if (Self.getLangOpts().OpenCL && DestType->isEventT()) {
+      llvm::APSInt intValue;
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.


More information about the cfe-commits mailing list