Skip to content

[AST] Account for non-user modules in isPrivateStdlibDecl #76122

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 29, 2024

Conversation

hamishknight
Copy link
Contributor

After landing #76057 I realized we were only checking modules marked system in isPrivateStdlibDecl, meaning that it won't account for modules found in the SDK's parent platform directory. Change the check such that we allow either non-user or system modules to be considered, ensuring we e.g hide underscored members from platform modules in completion. Also rename the function to isPrivateSystemDecl to better reflect what it's checking.

rdar://131854240

This ensures we don't violate the invariant that
a ModuleDecl isn't empty.
Consider both non-user and system modules when
checking whether an underscored decl should be
considered private.

rdar://131854240
This better reflects what we're actually checking
here.
@hamishknight
Copy link
Contributor Author

@swift-ci please test

@hamishknight hamishknight merged commit 4987c3b into swiftlang:main Aug 29, 2024
5 checks passed
@hamishknight hamishknight deleted the platform-2 branch August 29, 2024 10:25
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.

2 participants