clover/llvm: remove harmful std::move call
authorKarol Herbst <kherbst@redhat.com>
Fri, 20 Sep 2019 10:43:10 +0000 (12:43 +0200)
committerKarol Herbst <karolherbst@gmail.com>
Wed, 25 Sep 2019 10:39:58 +0000 (10:39 +0000)
both clang and gcc warn with:
"moving a local object in a return statement prevents copy elision"

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
src/gallium/state_trackers/clover/llvm/invocation.cpp

index d71ddf8..bef334c 100644 (file)
@@ -376,7 +376,7 @@ namespace {
             throw build_error();
       }
 
-      return std::move(mod);
+      return mod;
    }
 }