[PATCH] D20602: Add .rgba syntax extension to ext_vector_type types

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 29 13:13:51 PDT 2016


rsmith added inline comments.

================
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:7907
@@ -7904,1 +7906,3 @@
+def ext_opencl_ext_vector_type_rgba_selector: ExtWarn<
+  "vector component name '%0' is an OpenCL version 2.2 feature">;
 } // end of sema category
----------------
As mentioned, normal Clang policy is to issue an `ExtWarn` in such cases unless there is some actual problem with accepting the feature as an extension. This *does* cause us to produce a diagnostic, which, as you say, is important.

The C and C++ standards are both clear that producing a diagnostic is a sufficient response to code that is ill-formed, and that we are still allowed to accept the program after producing the diagnostic; if the OpenCL specification says something else, it is simply broken and we should get it fixed.

================
Comment at: test/Misc/warning-flags.c:15-19
@@ -14,7 +14,7 @@
 
     If you add a new warning without a flag, this test will fail.  To fix
     this test, simply add a warning group to that warning.
 
 
 The list of warnings below should NEVER grow.  It should gradually shrink to 0.
 
----------------
Please follow these instructions.


http://reviews.llvm.org/D20602





More information about the cfe-commits mailing list