aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJordan Maples <jomaples@microsoft.com>2019-10-04 12:38:55 -0700
committerJordan Maples <jomaples@microsoft.com>2019-10-04 12:38:55 -0700
commit2b8f7aea325ed2ef193d572599820aad098ebf40 (patch)
treed61fb1bbb436976e17e4df495835fd0da26bfc3c
parent7adf7eb6fe4c8d90a60df6ba2833b55146f79716 (diff)
downloadplatform_external_Microsoft-GSL-2b8f7aea325ed2ef193d572599820aad098ebf40.tar.gz
platform_external_Microsoft-GSL-2b8f7aea325ed2ef193d572599820aad098ebf40.tar.bz2
platform_external_Microsoft-GSL-2b8f7aea325ed2ef193d572599820aad098ebf40.zip
adding clang/gcc suppression of the deprecation warnings.
-rw-r--r--include/gsl/multi_span9
-rw-r--r--tests/bounds_tests.cpp8
-rw-r--r--tests/multi_span_tests.cpp10
-rw-r--r--tests/strided_span_tests.cpp8
4 files changed, 34 insertions, 1 deletions
diff --git a/include/gsl/multi_span b/include/gsl/multi_span
index d2b2a69..3a2d982 100644
--- a/include/gsl/multi_span
+++ b/include/gsl/multi_span
@@ -57,6 +57,11 @@
#endif // _MSC_VER < 1910
#endif // _MSC_VER
+#if __clang__ || __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
// GCC 7 does not like the signed unsigned missmatch (size_t ptrdiff_t)
// While there is a conversion from signed to unsigned, it happens at
// compiletime, so the compiler wouldn't have to warn indiscriminently, but
@@ -2261,4 +2266,8 @@ general_span_iterator<Span> operator+(typename general_span_iterator<Span>::diff
#pragma GCC diagnostic pop
#endif // __GNUC__ > 6
+#if __clang__ || __GNUC__
+#pragma GCC diagnostic pop
+#endif
+
#endif // GSL_MULTI_SPAN_H
diff --git a/tests/bounds_tests.cpp b/tests/bounds_tests.cpp
index 29c198a..da29e91 100644
--- a/tests/bounds_tests.cpp
+++ b/tests/bounds_tests.cpp
@@ -19,7 +19,11 @@
// so people aren't annoyed by them when running the tool.
#pragma warning(disable : 26440 26426) // from catch
#pragma warning(disable : 4996) // use of function or classes marked [[deprecated]]
+#endif
+#if __clang__ || __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
#include <catch/catch.hpp> // for AssertionHandler, StringRef, TEST_CASE
@@ -115,3 +119,7 @@ TEST_CASE("bounds_convertible")
#ifdef CONFIRM_COMPILATION_ERRORS
copy(src_span_static, dst_span_static);
#endif
+
+#if __clang__ || __GNUC__
+#pragma GCC diagnostic pop
+#endif \ No newline at end of file
diff --git a/tests/multi_span_tests.cpp b/tests/multi_span_tests.cpp
index 97b2271..c4532bb 100644
--- a/tests/multi_span_tests.cpp
+++ b/tests/multi_span_tests.cpp
@@ -18,9 +18,13 @@
// blanket turn off warnings from CppCoreCheck from catch
// so people aren't annoyed by them when running the tool.
#pragma warning(disable : 26440 26426) // from catch
-#pragma warning(disable : 4996) // multi_span is in the process of being deprecated.
+//#pragma warning(disable : 4996) // multi_span is in the process of being deprecated.
// Suppressing warnings until it is completely removed
+#endif
+#if __clang__ || __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
#include <catch/catch.hpp> // for AssertionHandler, StringRef, CHECK, CHECK...
@@ -1785,3 +1789,7 @@ TEST_CASE("iterator")
#ifdef CONFIRM_COMPILATION_ERRORS
copy(src_span_static, dst_span_static);
#endif
+
+#if __clang__ || __GNUC__
+#pragma GCC diagnostic pop
+#endif
diff --git a/tests/strided_span_tests.cpp b/tests/strided_span_tests.cpp
index 0d0896a..f201df4 100644
--- a/tests/strided_span_tests.cpp
+++ b/tests/strided_span_tests.cpp
@@ -20,7 +20,11 @@
#pragma warning(disable : 26440 26426) // from catch deprecated
#pragma warning(disable : 4996) // strided_span is in the process of being deprecated.
// Suppressing warnings until it is completely removed
+#endif
+#if __clang__ || __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
#include <catch/catch.hpp> // for AssertionHandler, StringRef, CHECK, CHECK...
@@ -796,3 +800,7 @@ TEST_CASE("strided_span_conversion")
i++;
}
}
+
+#if __clang__ || __GNUC__
+#pragma GCC diagnostic pop
+#endif