[PATCH] D38773: [Sema] Add support for flexible array members in Obj-C.

2017-10-23 Thread Volodymyr Sapsai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316381: [Sema] Add support for flexible array members in Obj-C. (authored by vsapsai). Changed prior to commit: https://reviews.llvm.org/D38773?vs=118990=119943#toc Repository: rL LLVM

[PATCH] D38773: [Sema] Add support for flexible array members in Obj-C.

2017-10-23 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D38773 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D38773: [Sema] Add support for flexible array members in Obj-C.

2017-10-13 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 118990. vsapsai added a comment. - Address rjmccall review comment, move warn_variable_sized_ivar_visibility to DiagnoseVariableSizedIvars. https://reviews.llvm.org/D38773 Files: clang/include/clang/Basic/DiagnosticGroups.td

[PATCH] D38773: [Sema] Add support for flexible array members in Obj-C.

2017-10-13 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:15055 } + // If it is the last field is checked elsewhere. } rjmccall wrote: > vsapsai wrote: > > rjmccall wrote: > > > "Whether" rather than "If", please. You

[PATCH] D38773: [Sema] Add support for flexible array members in Obj-C.

2017-10-12 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:15055 } + // If it is the last field is checked elsewhere. } vsapsai wrote: > rjmccall wrote: > > "Whether" rather than "If", please. You should also leave a

[PATCH] D38773: [Sema] Add support for flexible array members in Obj-C.

2017-10-12 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:5226 +def err_objc_variable_sized_type_not_at_end : Error< + "field %0 with variable sized type %1 is not at the end of class">; +def note_next_field_declaration : Note<

[PATCH] D38773: [Sema] Add support for flexible array members in Obj-C.

2017-10-12 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:5226 +def err_objc_variable_sized_type_not_at_end : Error< + "field %0 with variable sized type %1 is not at the end of class">; +def note_next_field_declaration : Note<

[PATCH] D38773: [Sema] Add support for flexible array members in Obj-C.

2017-10-10 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Previous discussion on the mailing list can be found at http://lists.llvm.org/pipermail/cfe-dev/2017-September/055548.html The implementation is not exactly like it was discussed, it has some changes. There is another case when extra ivar is added at the end, it is for

[PATCH] D38773: [Sema] Add support for flexible array members in Obj-C.

2017-10-10 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. Allow Obj-C ivars with incomplete array type but only as the last ivar. Also add a requirement for ivars that contain a flexible array member to be at the end of class too. It is possible to add in a subclass another ivar at the end but we'll emit a warning in this