[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

Jordan Rose via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 24 17:34:43 PDT 2019


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


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