Fixes an assertion failure when ivar is a struct containing incomplete
array. Also completes support for direct flexible array members.
rdar://problem/21054495
Paths
| Differential D38774
[CodeGen] Add support for IncompleteArrayType in Obj-C ivars. ClosedPublic Authored by vsapsai on Oct 10 2017, 5:33 PM.
Details Summary Fixes an assertion failure when ivar is a struct containing incomplete rdar://problem/21054495
Diff Detail
Event TimelineComment Actions To save reviewers some time. Incomplete array type is not the same as for zero-sized array, it is c"^c\00" while for zero-sized array it is c"[0c]\00". Don't know if it matters, I haven't found any difference in behaviour. Though maybe I wasn't looking in the right place. dexonsmith added a parent revision: D38114: [Sema] Emit an error for using tags with flexible array member as ObjC class ivar..Oct 10 2017, 8:20 PM dexonsmith edited parent revisions, added: D38773: [Sema] Add support for flexible array members in Obj-C.; removed: D38114: [Sema] Emit an error for using tags with flexible array member as ObjC class ivar..
Comment Actions
Decided to keep in test only cases with typedefs because test coverage is the
This revision is now accepted and ready to land.Oct 26 2017, 1:08 PM Closed by commit rL316723: [CodeGen] Add support for IncompleteArrayType in Obj-C ivars. (authored by vsapsai). · Explain WhyOct 26 2017, 5:56 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 119951 clang/include/clang/Basic/DiagnosticGroups.td
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/CodeGen/CGObjCMac.cpp
clang/lib/Sema/SemaDecl.cpp
clang/lib/Sema/SemaDeclObjC.cpp
clang/lib/Sema/SemaObjCProperty.cpp
clang/test/CodeGenObjC/ivar-layout-flexible-array.m
clang/test/Sema/transparent-union.c
clang/test/SemaCXX/flexible-array-test.cpp
clang/test/SemaObjC/flexible-array-arc.m
clang/test/SemaObjC/flexible-array.m
clang/test/SemaObjC/ivar-sem-check-1.m
clang/test/SemaObjCXX/flexible-array.mm
|
You can't just use isa<> here; there can be typedefs of incomplete array type.