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
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
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
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
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
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<
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<
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
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