Skip to content

Conversation

@jrose-apple
Copy link
Contributor

  • Explanation: [4.2] [APINotes] Don't apply API notes to @class / forward @protocol decls apple/swift-clang#199 removes support for API notes on forward declarations of ObjC classes and protocols, but we were still using that in one place: to bridge NSString to String in the ObjectiveC module, a level below Foundation. (This wouldn't have to go into the early branch except that Clang just has swift-4.2-branch for both.)

  • Scope: Disallows all ObjC forward class declarations from being bridged to value types except NSString.

  • Issue: rdar://problem/40278479

  • Risk: Low. No one would have been doing this for any type other than NSString (because you can't implement the corresponding bridging protocol to go the other way), and almost no one imports the ObjectiveC module without Foundation.

  • Testing: Passed existing compiler regression tests with and without the Clang change.

  • Reviewed by: @DougGregor

…17412)

...so that we don't have to depend on the ObjectiveC module having API
notes for a class it doesn't actually define.

Support for rdar://problem/40278479.

(cherry picked from commit 426d27c)
@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

@jrose-apple jrose-apple merged commit 0794b33 into swiftlang:swift-4.2-branch-06-11-2018 Jun 22, 2018
@jrose-apple jrose-apple deleted the 4.2-EARLY-forward-march branch June 22, 2018 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant