Skip to content

swift-reflection-dump: fix -Wpessimizing-move warning #2240

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
Apr 19, 2016

Conversation

compnerd
Copy link
Member

What's in this pull request?

Resolved bug number: (SR-)


Before merging this pull request to apple/swift repository:

  • Test pull request on Swift continuous integration.

Triggering Swift CI

The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:

Smoke Testing

Platform Comment
All supported platforms @swift-ci Please smoke test
OS X platform @swift-ci Please smoke test OS X platform
Linux platform @swift-ci Please smoke test Linux platform

Validation Testing

Platform Comment
All supported platforms @swift-ci Please test
OS X platform @swift-ci Please test OS X platform
Linux platform @swift-ci Please test Linux platform

Note: Only members of the Apple organization can trigger swift-ci.

warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
auto Expected = std::move(llvm::object::createBinary(binaryFileName)
^
note: remove std::move call here
auto Expected = std::move(llvm::object::createBinary(binaryFilename)
^~~~~~~~~

@jrose-apple
Copy link
Contributor

Maybe fix -Wpessimizing-move warning? ;-)

@swift-ci Please test

@jrose-apple
Copy link
Contributor

Let's try that again.

@swift-ci Please test.

@compnerd
Copy link
Member Author

I don't think that the master-next support has ever worked:

Traceback (most recent call last):
File "/Users/buildnode/jenkins/workspace/swift-PR-osx/swift/utils/update-checkout", line 164, in
sys.exit(main())
File "/Users/buildnode/jenkins/workspace/swift-PR-osx/swift/utils/update-checkout", line 146, in main
clone_with_ssh, branch, skip_history, args.skip_repository)
File "/Users/buildnode/jenkins/workspace/swift-PR-osx/swift/utils/update-checkout", line 99, in obtain_additional_swift_sources
repo_branch = NEXT_BRANCHES[dir_name]
KeyError: 'compiler-rt'

The dictionary is missing keys. I can't remember the person who was working on the test infrastructure :-(.

  warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
    auto Expected = std::move(llvm::object::createBinary(binaryFileName)
                    ^
  note: remove std::move call here
    auto Expected = std::move(llvm::object::createBinary(binaryFilename)
                    ^~~~~~~~~
@compnerd compnerd changed the title swift-reflection-dump: silence -Wpessimizing-move warning swift-reflection-dump: fix -Wpessimizing-move warning Apr 19, 2016
@jrose-apple
Copy link
Contributor

Ah, I didn't even notice that. I guess I'll trust the change on master-next to be correct, and then your change to be correct on top of that. Thanks.

@jrose-apple jrose-apple merged commit 9e3ceac into swiftlang:master-next Apr 19, 2016
@compnerd compnerd deleted the pessimizing-move branch July 3, 2016 17:20
MaxDesiatov pushed a commit that referenced this pull request Apr 19, 2021
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