Suppress Boost.Exception clang-win warnings

This commit is contained in:
Peter Dimov
2019-12-08 21:24:11 +02:00
parent 81e3072d04
commit fdf6b240f5
3 changed files with 25 additions and 8 deletions

View File

@ -5,14 +5,20 @@
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
#include <boost/throw_exception.hpp>
#include <boost/exception_ptr.hpp>
#include <boost/core/lightweight_test.hpp>
#if defined(_MSC_VER)
# pragma warning(disable: 4702) // unreachable code
#endif
#if defined(__clang__)
# pragma clang diagnostic ignored "-Wpotentially-evaluated-expression"
# pragma clang diagnostic ignored "-Wdelete-non-abstract-non-virtual-dtor"
# pragma clang diagnostic ignored "-Wunused-parameter"
#endif
#include <boost/throw_exception.hpp>
#include <boost/exception_ptr.hpp>
#include <boost/core/lightweight_test.hpp>
class my_exception: public std::exception
{
};

View File

@ -5,6 +5,11 @@
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
#if defined(__clang__)
# pragma clang diagnostic ignored "-Wpotentially-evaluated-expression"
# pragma clang diagnostic ignored "-Wdelete-non-abstract-non-virtual-dtor"
#endif
#include <boost/throw_exception.hpp>
#include <boost/exception/get_error_info.hpp>
#include <boost/exception/info.hpp>

View File

@ -5,6 +5,16 @@
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
#if defined(_MSC_VER)
# pragma warning(disable: 4702) // unreachable code
#endif
#if defined(__clang__)
# pragma clang diagnostic ignored "-Wpotentially-evaluated-expression"
# pragma clang diagnostic ignored "-Wdelete-non-abstract-non-virtual-dtor"
# pragma clang diagnostic ignored "-Wunused-parameter"
#endif
#include "lib1_throw.hpp"
#include "lib2_throw.hpp"
#include "lib3_throw.hpp"
@ -13,10 +23,6 @@
#include <boost/exception/get_error_info.hpp>
#include <boost/core/lightweight_test.hpp>
#if defined(_MSC_VER)
# pragma warning(disable: 4702) // unreachable code
#endif
void test_catch_by_type()
{
BOOST_TEST_THROWS( lib1::f(), lib1::exception );