[5.3][SourceKit][InterfaceGen] Don't print clang decls marked with the swift_private attribute. #32047
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.
Cherry-pick of #32046 for 5.3.
Explanation:
ObjC decls marked with the
swift_private
attribute (via theNS_REFINED_FOR_SWIFT
macro) are intended to be hidden from framework clients, but still exposed for use in the Swift code within the framework or its Swift overlay. We were still printing them in the generated interface of the framework though, counteracting the intention of these being hidden from clients.Scope of issue: Affects interface generation only.
Origination: Since
NS_REFINED_FOR_SWIFT
was introduced (not a regression).Risk: Low. The fix is simple and only impacts interface generation. The compiler and other sourcekitd requests are unaffected.
Testing: Added a regression test for the new behavior and all existing tests pass.
Reviewers: @akyrtzi on the master PR.
Resolves rdar://problem/62464954