Skip to content

FrontendTool: fix a use-after-move on Windows #20696

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 22, 2018

Conversation

compnerd
Copy link
Member

The order of evaluation of arguments is undefined by the language
specification. Windows evaluates right to left rather than left to
right. This means that the argument was getting moved away before
initializing the first formal argument. Use a temporary to construct
the value to avoid the use-after-move.

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

The order of evaluation of arguments is undefined by the language
specification.  Windows evaluates right to left rather than left to
right.  This means that the argument was getting moved away before
initializing the first formal argument.  Use a temporary to construct
the value to avoid the use-after-move.
@compnerd
Copy link
Member Author

@swift-ci please test and merge

@swift-ci swift-ci merged commit a7f8f89 into swiftlang:master Nov 22, 2018
@compnerd compnerd deleted the orders branch November 22, 2018 01:47
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