From 5dc76a5d34a1054bae2fd5bf6a9b8e44e2daecee Mon Sep 17 00:00:00 2001 From: Richard Trieu Date: Tue, 13 Jan 2015 02:10:33 +0000 Subject: Disable a warning for self move since the test is checking for this behavior. llvm-svn: 225754 --- llvm/unittests/ADT/APIntTest.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'llvm/unittests/ADT/APIntTest.cpp') diff --git a/llvm/unittests/ADT/APIntTest.cpp b/llvm/unittests/ADT/APIntTest.cpp index 8198c71..9f063cc 100644 --- a/llvm/unittests/ADT/APIntTest.cpp +++ b/llvm/unittests/ADT/APIntTest.cpp @@ -678,6 +678,9 @@ TEST(APIntTest, nearestLogBase2) { EXPECT_EQ(A9.nearestLogBase2(), UINT32_MAX); } +// Disable the warning that triggers on exactly what is being tested. +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wself-move" TEST(APIntTest, SelfMoveAssignment) { APInt X(32, 0xdeadbeef); X = std::move(X); @@ -694,5 +697,6 @@ TEST(APIntTest, SelfMoveAssignment) { EXPECT_EQ(0xdeadbeefdeadbeefULL, Raw[0]); EXPECT_EQ(0xdeadbeefdeadbeefULL, Raw[1]); } +#pragma clang diagnostic pop } -- cgit v1.1