Avoid pessimizing std::move (#3124)

Should fix a warning
This commit is contained in:
David Neto 2019-12-27 12:05:58 -05:00 committed by GitHub
parent fad92f1e7e
commit 8aa423930d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -60,8 +60,7 @@ class PassTest : public TestT {
// from pass Process() function.
std::tuple<std::vector<uint32_t>, Pass::Status> OptimizeToBinary(
Pass* pass, const std::string& original, bool skip_nop) {
context_ =
std::move(BuildModule(env_, consumer_, original, assemble_options_));
context_ = BuildModule(env_, consumer_, original, assemble_options_);
EXPECT_NE(nullptr, context()) << "Assembling failed for shader:\n"
<< original << std::endl;
if (!context()) {
@ -197,8 +196,7 @@ class PassTest : public TestT {
// messages.
template <typename PassT, typename... Args>
void SinglePassRunAndFail(const std::string& original, Args&&... args) {
context_ =
std::move(BuildModule(env_, consumer_, original, assemble_options_));
context_ = BuildModule(env_, consumer_, original, assemble_options_);
EXPECT_NE(nullptr, context()) << "Assembling failed for shader:\n"
<< original << std::endl;
std::ostringstream errs;
@ -235,8 +233,7 @@ class PassTest : public TestT {
void RunAndCheck(const std::string& original, const std::string& expected) {
assert(manager_->NumPasses());
context_ =
std::move(BuildModule(env_, nullptr, original, assemble_options_));
context_ = BuildModule(env_, nullptr, original, assemble_options_);
ASSERT_NE(nullptr, context());
context()->set_preserve_bindings(OptimizerOptions()->preserve_bindings_);