From 042335fbac0582eb57a93c8bf04fa0383ad5e58a Mon Sep 17 00:00:00 2001 From: Corentin Wallez Date: Tue, 6 Apr 2021 17:32:19 +0000 Subject: [PATCH] Add the -Wredundant-move warning. Dawn uses objects with move semantics like Ref<> that feel like they need to be std::moved in a bunch of places. This warning triggers when std::move() is used when it has no effect, keep the code less verbose. Bug: None Change-Id: I2b11f709e943e7b16024bfde07910577b983aa34 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46441 Commit-Queue: Stephen White Auto-Submit: Corentin Wallez Reviewed-by: Austin Eng Reviewed-by: Stephen White --- src/common/BUILD.gn | 1 + 1 file changed, 1 insertion(+) diff --git a/src/common/BUILD.gn b/src/common/BUILD.gn index fdca30bc35..176e82ea41 100644 --- a/src/common/BUILD.gn +++ b/src/common/BUILD.gn @@ -106,6 +106,7 @@ config("dawn_internal") { "-Wnon-c-typedef-for-linkage", "-Wpessimizing-move", "-Wrange-loop-analysis", + "-Wredundant-move", "-Wshadow-field", "-Wstrict-prototypes", "-Wtautological-unsigned-zero-compare",