[llvm] r225754 - Disable a warning for self move since the test is checking for this behavior.

Richard Trieu rtrieu at google.com
Mon Jan 12 18:10:34 PST 2015


Author: rtrieu
Date: Mon Jan 12 20:10:33 2015
New Revision: 225754

URL: http://llvm.org/viewvc/llvm-project?rev=225754&view=rev
Log:
Disable a warning for self move since the test is checking for this behavior.

Modified:
    llvm/trunk/unittests/ADT/APIntTest.cpp

Modified: llvm/trunk/unittests/ADT/APIntTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/APIntTest.cpp?rev=225754&r1=225753&r2=225754&view=diff
==============================================================================
--- llvm/trunk/unittests/ADT/APIntTest.cpp (original)
+++ llvm/trunk/unittests/ADT/APIntTest.cpp Mon Jan 12 20:10:33 2015
@@ -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
 
 }





More information about the llvm-commits mailing list