From ca0d0951c1e43cb5a18e668371f22a12416a98df Mon Sep 17 00:00:00 2001 From: Julian Büning Date: Thu, 22 Jun 2023 17:44:36 +0200 Subject: RefTest: suppress -Wself-move This warning (introduced with GCC 13, also present in clang) warns precisely about what we want to test here. --- unittests/Ref/RefTest.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'unittests') diff --git a/unittests/Ref/RefTest.cpp b/unittests/Ref/RefTest.cpp index bf313513..2f17738f 100644 --- a/unittests/Ref/RefTest.cpp +++ b/unittests/Ref/RefTest.cpp @@ -95,8 +95,11 @@ TEST(RefTest, SelfMove) { struct Expr *r_e = new Expr(); ref r(r_e); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wself-move" // Check self move r = std::move(r); +#pragma GCC diagnostic pop finished = 1; } EXPECT_EQ(1, finished_counter); -- cgit 1.4.1