Skip to content

[migrator] When renaming a function decl, we should use underscore to represent empty external argument label. rdar://34569243 #12221

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
Oct 2, 2017

Conversation

nkcsgexi
Copy link
Contributor

@nkcsgexi nkcsgexi commented Oct 2, 2017

No description provided.

… represent empty external argument label. rdar://34569243
@nkcsgexi
Copy link
Contributor Author

nkcsgexi commented Oct 2, 2017

@swift-ci please smoke test

@nkcsgexi nkcsgexi requested a review from nathawes October 2, 2017 18:11
@nkcsgexi
Copy link
Contributor Author

nkcsgexi commented Oct 2, 2017

@nathawes could you review this for swift-4.0-branch?

@@ -695,9 +695,10 @@ struct APIDiffMigratorPass : public ASTMigratorPass, public SourceEntityWalker {
if (ArgLoc.isInvalid())
Editor.insertBefore(PD->getNameLoc(),
(llvm::Twine(NewArg) + " ").str());
Copy link
Contributor

Choose a reason for hiding this comment

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

Should there be a ternary checking NewArg is empty here too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, we've not seen this kind of change though. Will add here too.

@nkcsgexi
Copy link
Contributor Author

nkcsgexi commented Oct 2, 2017

@swift-ci please smoke test

Copy link
Contributor

@nathawes nathawes left a comment

Choose a reason for hiding this comment

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

Looks good Xi!

@nkcsgexi nkcsgexi merged commit f2ef42b into swiftlang:master Oct 2, 2017
@nkcsgexi nkcsgexi deleted the migrator-fix branch October 2, 2017 19:31
nkcsgexi added a commit that referenced this pull request Oct 3, 2017
… represent empty external argument label. rdar://34569243 (#12221) (#12225)
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