Silence Clang 9 warning.

GitOrigin-RevId: 2b3fe4b28076c612d3b7c0caebdd33f192107cbd
This commit is contained in:
levlam 2019-03-29 21:25:55 +03:00
parent 29d745c87e
commit 0d6c1842e1

View File

@ -56,7 +56,14 @@ TEST(SharedPtr, simple) {
ptr2 = std::move(ptr); ptr2 = std::move(ptr);
CHECK(ptr.empty()); CHECK(ptr.empty());
CHECK(*ptr2 == "hello"); CHECK(*ptr2 == "hello");
#if TD_CLANG
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wself-assign-overloaded"
#endif
ptr2 = ptr2; ptr2 = ptr2;
#if TD_CLANG
#pragma clang diagnostic pop
#endif
CHECK(*ptr2 == "hello"); CHECK(*ptr2 == "hello");
CHECK(!Deleter::was_delete()); CHECK(!Deleter::was_delete());
ptr2.reset(); ptr2.reset();