From 2f5d8e33d736866d80a8a0ce29a07f68d5d42ac4 Mon Sep 17 00:00:00 2001 From: Takahiro Date: Sat, 4 Jun 2022 03:40:41 +0000 Subject: [PATCH] Delint RefBaseTests.cpp This commit removes the lines from RefBaseTests.cpp that access a moved-from object after move. This change removes "use-after- move" clang-tidy warning. There is no pointing testing the behavior of moved-from objects because it can be avoided with clang-tidy check. Bug: dawn:1439 Change-Id: If2144db2b50ad3f5a6d7a8d402b2978db4d8bd16 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92620 Kokoro: Kokoro Commit-Queue: Takahiro Reviewed-by: Corentin Wallez --- src/dawn/tests/unittests/RefBaseTests.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/dawn/tests/unittests/RefBaseTests.cpp b/src/dawn/tests/unittests/RefBaseTests.cpp index dafdcf790d..6436c8a4ed 100644 --- a/src/dawn/tests/unittests/RefBaseTests.cpp +++ b/src/dawn/tests/unittests/RefBaseTests.cpp @@ -244,11 +244,7 @@ TEST(RefBase, RefMoveAssignmentSelf) { Ref& self = ref; events.clear(); - { - ref = std::move(self); - ref = std::move(self); - ref = std::move(self); - } + { ref = std::move(self); } EXPECT_THAT(events, testing::ElementsAre()); }