mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Suppress clang warning on intentional self assignment
This commit is contained in:
@@ -98,12 +98,20 @@ struct Buffer_test : beast::unit_test::suite
|
||||
x = b0;
|
||||
BEAST_EXPECT (x == b0);
|
||||
BEAST_EXPECT (sane (x));
|
||||
#if defined(__clang__) && !defined(__APPLE__) && (__clang_major__ >= 7)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wself-assign-overloaded"
|
||||
#endif
|
||||
|
||||
x = x;
|
||||
BEAST_EXPECT (x == b0);
|
||||
BEAST_EXPECT (sane (x));
|
||||
y = y;
|
||||
BEAST_EXPECT (y == b3);
|
||||
BEAST_EXPECT (sane (y));
|
||||
#if defined(__clang__) && !defined(__APPLE__) && (__clang_major__ >= 7)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
}
|
||||
|
||||
// Check move constructor & move assignments:
|
||||
|
||||
Reference in New Issue
Block a user