This patch adds an objc_subclassing_restricted attribute into clang. This attribute acts similarly to 'final' - Objective-C classes with this attribute can't be subclassed. However, @interface declarations that have objc_subclassing_restricted but don't have @implementation are allowed to inherit other @interface declarations with objc_subclassing_restricted. This is needed to describe the Swift class hierarchy in clang while making sure that the Objective-C classes can't subclass the Swift classes.
This attribute is already implemented in a fork of clang that's used for Swift (https://github.com/apple/swift-clang) and this patch migrates that code to the upstream clang repository.
No new undocumented attributes, please.