Skip to content

Handle aliasing a non-top-level command. #5585

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
Nov 10, 2022

Conversation

jimingham
Copy link

This didn't work previously because we had to check whether the incoming command was an alias command, but if it wasn't we still used the result of that lookup - which was by the command's node name. That fails for non-top-level commands. In this case, the resolution is pretty simple since we already have the node's CommandObject, so all we needed to do was turn it into a shared pointer, for which I added enable_shared_from_this to the CommandObject.

Differential Revision: https://reviews.llvm.org/D137662

(cherry picked from commit d518ed4)

This didn't work previously because we had to check whether the incoming
command was an alias command, but if it wasn't we still used the result
of that lookup - which was by the command's node name.  That fails for
non-top-level commands.  In this case, the resolution is pretty simple since
we already have the node's CommandObject, so all we needed to do was turn
it into a shared pointer, for which I added enable_shared_from_this to the
CommandObject.

Differential Revision: https://reviews.llvm.org/D137662

(cherry picked from commit d518ed4)
@jimingham
Copy link
Author

@swift-ci please test

@jimingham jimingham merged commit be09589 into swiftlang:stable/20220421 Nov 10, 2022
@jimingham jimingham deleted the multiword-alias-weed branch November 10, 2022 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.

1 participant