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

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 26 10:33:21 PDT 2016


aaron.ballman requested changes to this revision.
aaron.ballman added inline comments.
This revision now requires changes to proceed.


================
Comment at: include/clang/Basic/Attr.td:1291
+  let Subjects = SubjectList<[ObjCInterface], ErrorDiag>;
+  let Documentation = [Undocumented];
+}
----------------
No new undocumented attributes, please.


================
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:776
+def err_restricted_superclass_mismatch : Error<
+  "cannot subclass a class with objc_subclassing_restricted attribute">;
 def warn_objc_root_class_missing : Warning<
----------------
Please quote the attribute name in the diagnostic; also, this reads a bit strangely. Perhaps: `cannot subclass a class that was declared with the 'objc_subclassing_restricted' attribute`?


================
Comment at: lib/Sema/SemaDeclObjC.cpp:3888
     }
+  } else if (const ObjCInterfaceDecl *IntfDecl =
+                 dyn_cast<ObjCInterfaceDecl>(ClassDecl)) {
----------------
Can use `auto` here.


Repository:
  rL LLVM

https://reviews.llvm.org/D25993





More information about the cfe-commits mailing list