Commit Graph

2 Commits

Author SHA1 Message Date
Saleem Abdulrasool
7606e2b5c5 ClangImporter: improve ObjC-interop and enable tests
This enables additional tests for the ClangImporter.  This found a
missing piece in the `-enable-objc-interop` work that was done
previously.  Address that and enable the tests.  There are now the
following failing tests on Linux:

  * sdk - depends on Foundation (not hermetic, see SR-7572)
  * mixed-nsuinteger - depends on Foundation (not hermetic, see SR-7572)
  * import-mixed-with-header-twice - requires apple/swift PR#16022
  * can_import_objc_idempotent - requires apple/swift PR#16022
  * objc_protocol_renaming - requires apple/swift PR#16022
2018-05-01 18:39:42 -07:00
Jordan Rose
fbe65e2bc5 [ClangImporter] Import objc_subclassing_restricted classes as 'public' (#14766)
(rather than 'open')

This attribute was originally introduced for Swift classes exposed to
Objective-C, but if it /is/ used on a pure Objective-C class Swift
should respect it. There might be an actual reason, such as a hot code
path in ContrivedExampleKit checking against the class object's
address instead of using -isKindOfClass:.

For source compatibility, only enforce this in Swift 5 mode.

rdar://problem/33971529
2018-02-21 10:14:42 -08:00