Skip to content

ASTScope: Clean up IfConfigDecl handling and a couple of other things #34026

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

Conversation

slavapestov
Copy link
Contributor

  • The history vector passed down through lookup was only used for the selfDC and isCascading computations, both of which are now gone.
  • Members of the active clause of an IfConfigDecl are visited as part of their parent, so we don't have to walk into IfConfigDecls at all.
  • The ParameterListScope is only used as a parent for default argument initializer scopes, and doesn't bind any names, so it can be a sibling rather a parent of the FunctionBodyScope, which simplifies some source range computations.

@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov
Copy link
Contributor Author

@swift-ci Please test source compatibility

Copy link
Contributor

@davidungar davidungar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wonderful simplification. I suspect this builds on some other work you've done that enables this.
If it works, ship it!

@slavapestov slavapestov merged commit 8f2175e into swiftlang:master Sep 23, 2020
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