Skip to content

Swift: Hide LValueType in the main AST #11566

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 5 commits into from
Dec 8, 2022

Conversation

MathiasVP
Copy link
Contributor

:til: that lvalues are annotated with an LValueType in the AST. I don't think this is a very user-friendly type to have pop up in the "main AST" (it certainly surprised me!).

This PR hide those LValueTypes from the main AST.

@MathiasVP MathiasVP requested a review from a team as a code owner December 5, 2022 14:36
@github-actions github-actions bot added the Swift label Dec 5, 2022
Copy link
Contributor

@redsun82 redsun82 left a comment

Choose a reason for hiding this comment

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

Why is this causing so many changes in the dataflow test?

@MathiasVP
Copy link
Contributor Author

Why is this causing so many changes in the dataflow test?

This is because we now recognize more PostUpdateNodes. The dataflow library detects which arguments might be an object whose fields could be modified by a function call. This is done by this check here. Previously, those getType calls returned an LValueType which made the check fail.

Now, it can be argued that some of these PostUpdateNodes actually shouldn't be there. But we can fix that in a later PR. That won't have any affects on results.

Copy link
Contributor

@redsun82 redsun82 left a comment

Choose a reason for hiding this comment

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

:shipit:

@MathiasVP MathiasVP merged commit ba3d50a into github:main Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants