[PATCH] D25993: [Objective-C] Add objc_subclassing_restricted attribute

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 27 07:08:51 PDT 2016


aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: lib/Sema/SemaDeclObjC.cpp:3859
+        // objc_subclassing_restricted attribute when it has that attribute as
+        // well (because of interfaces imported from Swift). Therefore we have
+        // to check if we can subclass in the implementation as well.
----------------
arphaman wrote:
> aaron.ballman wrote:
> > Should this be mentioned in the docs?
> I think this more of an implementation detail. You typically wouldn't have `@interface`s in Objective-C code without corresponding `@implementation`s, so the attribute will act as expected for most cases. As well as that, you typically wouldn't care how Swift interfaces are declared in Objective-C. 
Works for me, thank you for the explanation!


Repository:
  rL LLVM

https://reviews.llvm.org/D25993





More information about the cfe-commits mailing list