Skip to content

[libSyntax] Miscellaneous minor improvements #36229

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

ahoppen
Copy link
Member

@ahoppen ahoppen commented Mar 2, 2021

This PR is a collection of minor improvements to libSyntax

  • Fix some formatting issues where lines contain more than 80 columns
  • Change OpaqueSyntaxNode to be a const void * pointer instead of void * since its data is not supposed to be modified
  • Remove discaredRecordedNode. Since RawSyntax is no longer reference counted, none of the implementations did anything and the comment in there says, we should get rid of it anyway.

@ahoppen
Copy link
Member Author

ahoppen commented Mar 2, 2021

@swift-ci Please test

@ahoppen ahoppen requested a review from rintaro March 2, 2021 16:40
@ahoppen ahoppen marked this pull request as ready for review March 2, 2021 16:40
ahoppen added 3 commits March 2, 2021 20:07
The data of an OpaqueSyntaxNode should never be modified. Also, this
allows us to get rid of two const_casts.
It doesn't do anything anymore and we shouldn't have it, so let's just
remove it.
@ahoppen ahoppen force-pushed the pr/opaque-const-pointer-and-delete-discarednode branch from 99e04c8 to dc8eed4 Compare March 2, 2021 19:08
@ahoppen
Copy link
Member Author

ahoppen commented Mar 2, 2021

Full test suite passed earlier. Just running smoke tests after rebasing onto main.

@swift-ci Please smoke test

@ahoppen ahoppen merged commit 68877f9 into swiftlang:main Mar 3, 2021
@ahoppen ahoppen deleted the pr/opaque-const-pointer-and-delete-discarednode branch March 3, 2021 07:36
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