[4.2 EARLY] [ClangImporter] Hardcode NSString being bridged to String #17431
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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