diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-10-19 00:06:00 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-10-19 00:06:00 +0000 |
| commit | a9727033fb5fa229b520e0e0d973f68780bc5348 (patch) | |
| tree | 1f0afdef1d75d333b9206b4e26d3c26edf55a3bd /libcxx/include/__config | |
| parent | 974c8b7e2fde550fd87850d50695341101c38c2d (diff) | |
| download | bcm5719-llvm-a9727033fb5fa229b520e0e0d973f68780bc5348.tar.gz bcm5719-llvm-a9727033fb5fa229b520e0e0d973f68780bc5348.zip | |
P1152R4: Fix deprecation warnings in libc++ testsuite and in uses of is_invocable that would internally conjure up a deprecated function type.
Summary: The implementation of P1152R4 in Clang has resulted in some deprecation warnings appearing in the libc++ and libc++abi test suite. Fix or suppress these warnings.
Reviewers: mclow.lists, EricWF
Subscribers: christof, ldionne, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D68879
llvm-svn: 375307
Diffstat (limited to 'libcxx/include/__config')
| -rw-r--r-- | libcxx/include/__config | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libcxx/include/__config b/libcxx/include/__config index ee7351e9313..1ae2fdc7b81 100644 --- a/libcxx/include/__config +++ b/libcxx/include/__config @@ -963,6 +963,20 @@ typedef unsigned int char32_t; # define _LIBCPP_DEPRECATED_IN_CXX17 #endif +// Macros to enter and leave a state where deprecation warnings are suppressed. +#if !defined(_LIBCPP_SUPPRESS_DEPRECATED_PUSH) && \ + (defined(_LIBCPP_COMPILER_CLANG) || defined(_LIBCPP_COMPILER_GCC)) +# define _LIBCPP_SUPPRESS_DEPRECATED_PUSH \ + _Pragma("GCC diagnostic push") \ + _Pragma("GCC diagnostic ignored \"-Wdeprecated\"") +# define _LIBCPP_SUPPRESS_DEPRECATED_POP \ + _Pragma("GCC diagnostic pop") +#endif +#if !defined(_LIBCPP_SUPPRESS_DEPRECATED_PUSH) +# define _LIBCPP_SUPPRESS_DEPRECATED_PUSH +# define _LIBCPP_SUPPRESS_DEPRECATED_POP +#endif + #if _LIBCPP_STD_VER <= 11 # define _LIBCPP_EXPLICIT_AFTER_CXX11 #else |

