This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG237c6924bd46: [OpenCL] Add clang extension for bit-fields.
(authored by Anastasia).
Herald added subscribers: foad, ldrumm.
Herald added a project: c
svenvh accepted this revision.
svenvh added a comment.
This revision is now accepted and ready to land.
LGTM!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101843/new/
https://reviews.llvm.org/D101843
___
cfe-commits mailing list
cfe-commits@
Anastasia added inline comments.
Comment at: clang/lib/Sema/SemaDecl.cpp:16798
}
// OpenCL v1.2 s6.9.c: bitfields are not supported.
+if (BitWidth && !getOpenCLOptions().isAvailableOption(
svenvh wrote:
>
Slightly modified to avoid repeating the ex
Anastasia updated this revision to Diff 344784.
Anastasia added a comment.
Added suggestions from Sven.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101843/new/
https://reviews.llvm.org/D101843
Files:
clang/docs/LanguageExtensions.rst
clang/include/clang/Basic/OpenCLExtensions.def
Anastasia added inline comments.
Comment at: clang/test/SemaOpenCL/unsupported.cl:11
+#ifndef BITFIELDS_EXT
+// expected-error@-2 {{bit-fields are not supported in OpenCL}}
+#endif
svenvh wrote:
> The extension has "bitfields" in the name but most diagnostics (in
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
---
Anastasia created this revision.
Anastasia added reviewers: svenvh, olestrohm.
Herald added subscribers: ebevhan, kerbowa, yaxunl, nhaehnle, jvesely,
jholewinski.
Anastasia requested review of this revision.
Bitfields result in struct/union layout that is implementation dependent and
therefore i