From 75f574fc48b1cf829cc98f21638e846bdcd460a4 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sat, 9 May 2020 04:42:27 +0300 Subject: [PATCH] Move warning suppression before the includes --- test/variant_get_by_index.cpp | 12 ++++++------ test/variant_get_by_type.cpp | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/test/variant_get_by_index.cpp b/test/variant_get_by_index.cpp index 97ef08b..846d0ba 100644 --- a/test/variant_get_by_index.cpp +++ b/test/variant_get_by_index.cpp @@ -6,6 +6,12 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt +#if defined( __clang__ ) && defined( __has_warning ) +# if __has_warning( "-Wdeprecated-volatile" ) +# pragma clang diagnostic ignored "-Wdeprecated-volatile" +# endif +#endif + #include #include #include @@ -15,12 +21,6 @@ using namespace boost::variant2; -#if defined( __clang__ ) && defined( __has_warning ) -# if __has_warning( "-Wdeprecated-volatile" ) -# pragma clang diagnostic ignored "-Wdeprecated-volatile" -# endif -#endif - int main() { { diff --git a/test/variant_get_by_type.cpp b/test/variant_get_by_type.cpp index 4c8476d..8f44a7e 100644 --- a/test/variant_get_by_type.cpp +++ b/test/variant_get_by_type.cpp @@ -6,6 +6,12 @@ // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt +#if defined( __clang__ ) && defined( __has_warning ) +# if __has_warning( "-Wdeprecated-volatile" ) +# pragma clang diagnostic ignored "-Wdeprecated-volatile" +# endif +#endif + #include #include #include @@ -15,12 +21,6 @@ using namespace boost::variant2; -#if defined( __clang__ ) && defined( __has_warning ) -# if __has_warning( "-Wdeprecated-volatile" ) -# pragma clang diagnostic ignored "-Wdeprecated-volatile" -# endif -#endif - int main() { {