pirama added inline comments. ================ Comment at: include/clang/Basic/DiagnosticSemaKinds.td:7900 @@ -7897,1 +7899,3 @@ +def ext_opencl_ext_vector_type_rgba_selector: ExtWarn< + "vector component name '%0' is an OpenCL 2.2 extension">; } // end of sema category ---------------- Anastasia wrote: > Could it be an error instead for CL <2.2? It isn't a valid feature and we > have already rejected similar cases with an error. > > How about changing to something like: > "vector component name '%0' is not supported in earlier than OpenCL version > 2.2" > > See similar diagnostics above - err_opencl_invalid_read_write, > err_opencl_unknown_type_specifier. > > Using extension might be confusing because we have core spec and extension > spec in OpenCL. Since .rgba is just a syntactic feature in the frontend that requires no support from the runtime, should this be an error? Making this an ExtWarn, like Richard suggested, will reject these under -pedantic-errors. But I'll let you make this call.
I'll update the diagnostic message to the following, if that's ok: > "vector component name '%0' cannot be used earlier than OpenCL version 2.2. http://reviews.llvm.org/D20602 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits