about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorJulian Büning <julian.buening@comsys.rwth-aachen.de>2023-06-22 17:44:36 +0200
committerMartinNowack <2443641+MartinNowack@users.noreply.github.com>2023-06-26 07:46:35 +0100
commitca0d0951c1e43cb5a18e668371f22a12416a98df (patch)
treebf348f937dfd15491dc3fad596029b3383b144cb
parent8b799c50ead1622691d870a1719c6dc7c34b5892 (diff)
downloadklee-ca0d0951c1e43cb5a18e668371f22a12416a98df.tar.gz
RefTest: suppress -Wself-move
This warning (introduced with GCC 13, also present in clang) warns
precisely about what we want to test here.
-rw-r--r--unittests/Ref/RefTest.cpp3
1 files changed, 3 insertions, 0 deletions
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<Expr> 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);