[PATCH] D57438: [Sema][ObjC] Allow declaring ObjC pointer members in C++ unions under ARC
Akira Hatanaka via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 29 22:06:38 PST 2019
ahatanak created this revision.
ahatanak added reviewers: rsmith, rjmccall, doug.gregor.
ahatanak added a project: clang.
Herald added subscribers: dexonsmith, jkorous.
ObjC pointer members are currently not allowed in unions in either C or C++ mode. This patch lifts the restriction in C++ mode.
This patch essentially treats ObjC pointer members the same way a non-static data member of a class type that has non-trivial special functions is treated. The ObjC pointer member causes all of the defaulted special functions of the union that directly contains the member to be defined as deleted, except when the member has an in-class initializer, the default constructor isn't defined as deleted.
rdar://problem/34213306
Repository:
rC Clang
https://reviews.llvm.org/D57438
Files:
include/clang/Basic/DiagnosticSemaKinds.td
lib/AST/DeclCXX.cpp
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDeclCXX.cpp
test/SemaObjCXX/arc-0x.mm
test/SemaObjCXX/objc-weak.mm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57438.184249.patch
Type: text/x-patch
Size: 14547 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190130/a6d88dbf/attachment.bin>
More information about the cfe-commits
mailing list