[PATCH] D65256: [Sema][ObjC] Mark C union fields that have non-trivial ObjC ownership qualifications as unavailable if the union is declared in a system header
Akira Hatanaka via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 24 19:08:54 PDT 2019
ahatanak marked an inline comment as done.
ahatanak added inline comments.
================
Comment at: lib/Sema/SemaDecl.cpp:16379
+ !getLangOpts().CPlusPlus && !FD->hasAttr<UnavailableAttr>() &&
+ !FD->getType()->getAs<AttributedType>()) {
+ // For backward compatibility, fields of C unions declared in system
----------------
jordan_rose wrote:
> This check seems a little worrisome since we could have some other kind of attributed type. Is there an easy way to check specifically for a lifetime qualifier?
I think I can make `IsObjCOwnershipAttributedType` in SemaType.cpp a method of `ASTContext` or `Sema` and call it here.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65256/new/
https://reviews.llvm.org/D65256
More information about the cfe-commits
mailing list