svenvh added inline comments.

================
Comment at: clang/docs/LanguageExtensions.rst:1748
+With this extension it is possible to enable bitfields in structs
+or unions using regular OpenCL extension pragma mechanism detailed in
+`the OpenCL Extension Specification, section 1.2
----------------



================
Comment at: clang/lib/Sema/SemaDecl.cpp:16798
     }
     // OpenCL v1.2 s6.9.c: bitfields are not supported.
+    if (BitWidth && !getOpenCLOptions().isAvailableOption(
----------------



================
Comment at: clang/test/SemaOpenCL/unsupported.cl:11
+#ifndef BITFIELDS_EXT
+// expected-error@-2 {{bit-fields are not supported in OpenCL}}
+#endif
----------------
The extension has "bitfields" in the name but most diagnostics (including this 
one) spell it as "bit-fields".  I wonder what the least surprising name would 
be?  It seems Clang tends to use the hyphenated form in diagnostics and the 
non-hyphenated form in e.g. option names (e.g. `fsigned-bitfields`), so using 
the non-hyphenated form in the extension name is probably fine.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101843/new/

https://reviews.llvm.org/D101843

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to