Thanks Joey, Attached an updated patch. Please review.
Guy -----Original Message----- From: Joey Gouly [mailto:[email protected]] Sent: Thursday, February 14, 2013 15:49 To: Benyei, Guy; Tanya Lattner; Richard Smith Cc: [email protected] Subject: RE: [PATCH] OpenCL images and samplers related restriction (6.9.b) Hi Guy, Could you not merge the err_event_t_struct_field, err_image_field and err_sampler_field errors into one? Then code like: + if (LangOpts.OpenCL) + if (T->isImageType()) + Diag(Loc, diag::err_image_field) << (Record->isStruct() ? 0 : 1) + << T; + else if (T->isSamplerT()) + Diag(Loc, diag::err_sampler_field) << (Record->isStruct() ? 0 : 1); + else if (T->isEventT()) + Diag(Loc, diag::err_event_t_struct_field) << (Record->isStruct() + ? 0 : 1); Would become if (LangOpts.OpenCL && (T->isImageType() || isEventT() || isSamplerT()) Diag(Loc, diag::err_opencl_invalid_field) << (Record->isStruct() ? 0 : 1) << T; The same for err_image_variable, err_image_pointer, err_image_array, err_image_return_type (and their sampler counterparts) Just a thought, Joey From: [email protected] [mailto:[email protected]] On Behalf Of Benyei, Guy Sent: 14 February 2013 13:26 To: Tanya Lattner; Richard Smith Cc: [email protected] Subject: RE: [PATCH] OpenCL images and samplers related restriction (6.9.b) Tanya and Richard, Thanks for the review – attached the updated patch. Please review Thank Guy --------------------------------------------------------------------- Intel Israel (74) Limited This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
opencl_restriction_b3.patch
Description: opencl_restriction_b3.patch
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
