Skip to content

[5.5] [Refactoring] Preserve comments in async transform #37404

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 2 commits into from
May 13, 2021

Conversation

hamishknight
Copy link
Contributor

5.5 cherry-pick of #37387


Previously we would drop comments between nodes in a BraceStmt, as we printed each node out individually. To remedy this, always make sure we scan backwards to find any preceding comments attached to a node. In addition, make sure we keep track of any SourceLocs which we don't print, but may have comments attached which we want to preserve.

rdar://77401810

Previously we would drop comments between nodes in
a BraceStmt, as we printed each node out individually.
To remedy this, always make sure we scan backwards
to find any preceding comments attached to a node,
and also keep track of any SourceLocs which we
don't print, but may have comments attached which
we want to preserve.

rdar://77401810
@hamishknight
Copy link
Contributor Author

@swift-ci please test

@akyrtzi akyrtzi merged commit 6a117d7 into swiftlang:release/5.5 May 13, 2021
@hamishknight hamishknight deleted the any-comments-5.5 branch May 13, 2021 19:39
@AnthonyLatsis AnthonyLatsis added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.5 labels Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants