Merge pull request #96 from cmazakas/unknown-warning-fix

Refactor tests to disable `-Wself-assign-overloaded` themselves
This commit is contained in:
Peter Dimov
2022-02-12 03:34:39 +02:00
committed by GitHub
3 changed files with 15 additions and 3 deletions

View File

@ -47,7 +47,7 @@ test-suite unordered
[ run unordered/constructor_tests.cpp ]
[ run unordered/copy_tests.cpp ]
[ run unordered/move_tests.cpp ]
[ run unordered/assign_tests.cpp : : : <toolset>clang:<cxxflags>"-Wno-self-assign-overloaded" ]
[ run unordered/assign_tests.cpp ]
[ run unordered/insert_tests.cpp ]
[ run unordered/insert_stable_tests.cpp ]
[ run unordered/insert_hint_tests.cpp ]
@ -90,7 +90,7 @@ test-suite unordered
: <define>BOOST_UNORDERED_USE_MOVE
: bmove_move ]
[ run unordered/assign_tests.cpp : :
: <define>BOOST_UNORDERED_USE_MOVE <toolset>clang:<cxxflags>"-Wno-self-assign-overloaded"
: <define>BOOST_UNORDERED_USE_MOVE
: bmove_assign ]
;
@ -98,7 +98,7 @@ test-suite unordered-exception
:
[ run exception/constructor_exception_tests.cpp framework ]
[ run exception/copy_exception_tests.cpp framework ]
[ run exception/assign_exception_tests.cpp framework : : : <toolset>clang:<cxxflags>"-Wno-self-assign-overloaded" ]
[ run exception/assign_exception_tests.cpp framework ]
[ run exception/move_assign_exception_tests.cpp framework ]
[ run exception/insert_exception_tests.cpp framework ]
[ run exception/erase_exception_tests.cpp framework ]

View File

@ -13,6 +13,12 @@
#pragma warning(disable : 4512) // assignment operator could not be generated
#endif
#if defined(__clang__) && defined(__has_warning)
#if __has_warning("-Wself-assign-overloaded")
#pragma clang diagnostic ignored "-Wself-assign-overloaded"
#endif
#endif
test::seed_t initialize_seed(12847);
template <class T> struct self_assign_base : public test::exception_base

View File

@ -21,6 +21,12 @@
#pragma warning(disable : 4127) // conditional expression is constant
#endif
#if defined(__clang__) && defined(__has_warning)
#if __has_warning("-Wself-assign-overloaded")
#pragma clang diagnostic ignored "-Wself-assign-overloaded"
#endif
#endif
namespace assign_tests {
test::seed_t initialize_seed(96785);