This revision was automatically updated to reflect the committed changes.
ahatanak marked an inline comment as done.
Closed by commit rL298332: Add support for attribute enum_extensibility.
(authored by ahatanak).
Changed prior to commit:
https://reviews.llvm.org/D30766?vs=91782&id=92418#toc
R
ahatanak marked an inline comment as done.
ahatanak added inline comments.
Comment at: test/Sema/enum-attr.c:27
+
+enum __attribute__((enum_extensibility(arg1))) EnumInvalidArg { //
expected-warning{{'enum_extensibility' attribute argument not supported:
'arg1'}}
+ G
-
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
Aside from the request for a FIXME and a decision from the author on error vs
warning, the code LGTM. Feel free to make a decision and commit without further
review.
=
ahatanak added inline comments.
Comment at: test/Sema/enum-attr.c:27
+
+enum __attribute__((enum_extensibility(arg1))) EnumInvalidArg { //
expected-warning{{'enum_extensibility' attribute argument not supported:
'arg1'}}
+ G
aaron.ballman wrote:
> ahatanak wro
ahatanak updated this revision to Diff 91782.
ahatanak marked 3 inline comments as done.
ahatanak added a comment.
Address review comments from Aaron.
https://reviews.llvm.org/D30766
Files:
include/clang/AST/Decl.h
include/clang/Basic/Attr.td
include/clang/Basic/AttrDocs.td
include/clan
aaron.ballman added inline comments.
Comment at: include/clang/Basic/AttrDocs.td:1969
+ let Content = [{
+Attribute ``enum_extensibility`` is used to distinguish between enum
definitions that are extensible and those that are not. The attribute can take
either ``closed`` or ``
ahatanak added inline comments.
Comment at: test/Sema/enum-attr.c:27
+
+enum __attribute__((enum_extensibility(arg1))) EnumInvalidArg { //
expected-warning{{'enum_extensibility' attribute argument not supported:
'arg1'}}
+ G
arphaman wrote:
> Should this be an
ahatanak updated this revision to Diff 91577.
ahatanak marked 2 inline comments as done.
ahatanak added a comment.
Address Alex's review comments.
https://reviews.llvm.org/D30766
Files:
include/clang/AST/Decl.h
include/clang/Basic/Attr.td
include/clang/Basic/AttrDocs.td
include/clang/Ba
arphaman added inline comments.
Comment at: include/clang/Basic/Attr.td:887
+def EnumExtensibility : InheritableAttr {
+ let Spellings = [GNU<"enum_extensibility">];
+ let Subjects = SubjectList<[Enum]>;
We might as well have a C++11 spelling in the `clang` nam
ahatanak created this revision.
This patch adds support for a new attribute that will be used to distinguish
between extensible and inextensible enums. The attribute was discussed on
cfe-dev a few weeks ago and I've made a few modifications to the original
proposal based on the feedback I recei
10 matches
Mail list logo