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 d71ddf8b01b12271ba9a4fa614e5af34365f5d05..bef334c2d632fab1dd1c518b907f6c7787092326 100644 (file)
@@ -376,7 +376,7 @@ namespace {
             throw build_error();
       }
 
-      return std::move(mod);
+      return mod;
    }
 }