-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[NFC] Create PackageUnit
class, and Package
entries to DeclContext / ASTHierarchy
#64034
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
Conversation
@swift-ci test |
package
scope / add corresponding entries to DeclContext and ASTHierarchyPackageUnit
class, and Package
entries to DeclContext / ASTHierarchy
@swift-ci test |
PackageUnit
class, and Package
entries to DeclContext / ASTHierarchyPackageUnit
class, and Package
entries to DeclContext / ASTHierarchy
@swift-ci test |
…THierarchy Previously enum AccessLimitKind was added to distinguish access scopes b/t package and public while keeping DeclContext null but it proved to be too limiting. This PR creates package specific entries for DeclContext and ASTHierarchy. It create a new class PackageUnit that can be set as the parent DeclContext of ModuleDecl. This PR contains addition of such entries but not the use of them; the actual use of them will be in the upcoming PRs. Resolves rdar://106155600
@swift-ci test |
@swift-ci test |
@@ -1830,7 +1831,6 @@ static bool shouldSerializeMember(Decl *D) { | |||
if (D->getASTContext().LangOpts.AllowModuleWithCompilerErrors) | |||
return false; | |||
llvm_unreachable("decl should never be a member"); | |||
|
|||
case DeclKind::Missing: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: This chunk and the next one doesn't fit with the overall spacing style of this code. If you get back to this code or have to update this PR it would be nice to make it uniform.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, I think that structure will make overall improvements to packages easier in the future too.
@swift-ci smoke test |
@swift-ci smoke test |
Previously
enum AccessLimitKind
was added to distinguish access scopes b/tpackage
andpublic
while keepingDeclContext
null but it proved to be too limiting. This PR createspackage
specific entries for DeclContext and ASTHierarchy. It create a new classPackageUnit
that can be set as the parent DeclContext ofModuleDecl
. This PR contains addition of such entries but not the use of them; the actual use of them will be in the upcoming PRs.Resolves rdar://106155600