Skip to content

Allow rewrite to detach from the node's parent #1851

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 1 commit into from
Jun 28, 2023

Conversation

bnbarham
Copy link
Contributor

@bnbarham bnbarham commented Jun 26, 2023

MissingMaker and MissingNodesBasicFormatter do not require the returned node to have a parent. Avoid re-creating all the parent nodes in this case by detaching the rewritten node (or rather, not re-attaching it).

Resolves rdar://111332992 (#1847).

@bnbarham bnbarham requested a review from ahoppen as a code owner June 26, 2023 23:12
@bnbarham
Copy link
Contributor Author

@swift-ci please test

@bnbarham
Copy link
Contributor Author

Ah, we can't detach because we're formatting... That's unfortunate 🤔

`MissingMaker` and `MissingNodesBasicFormatter` do not require the
returned node to have a parent. Avoid re-creating all the parent nodes
in this case by detaching the rewritten node (or rather, not
re-attaching it).

Resolves rdar://111332992 (swiftlang#1847).
@bnbarham
Copy link
Contributor Author

@swift-ci please test

@bnbarham bnbarham changed the title Detach node before making present/missing in diagnostics generator Allow rewrite to detach from the node's parent Jun 27, 2023
@bnbarham
Copy link
Contributor Author

@swift-ci please test Windows platform

@bnbarham bnbarham merged commit b556ac7 into swiftlang:main Jun 28, 2023
@bnbarham bnbarham deleted the diag-perf branch June 28, 2023 18:46
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