unstick r375307

Revision 375307

Date:
2019/10/19 00:06:00
Author:
rsmith
Revision Log:
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
Files:

Legend:

 
Added
 
Removed
 
Modified
  • libcxx/trunk/include/__config

     
    963 963 # define _LIBCPP_DEPRECATED_IN_CXX17
    964 964 #endif
    965 965
    966 // Macros to enter and leave a state where deprecation warnings are suppressed.
    967 #if !defined(_LIBCPP_SUPPRESS_DEPRECATED_PUSH) && \
    968 (defined(_LIBCPP_COMPILER_CLANG) || defined(_LIBCPP_COMPILER_GCC))
    969 # define _LIBCPP_SUPPRESS_DEPRECATED_PUSH \
    970 _Pragma("GCC diagnostic push") \
    971 _Pragma("GCC diagnostic ignored \"-Wdeprecated\"")
    972 # define _LIBCPP_SUPPRESS_DEPRECATED_POP \
    973 _Pragma("GCC diagnostic pop")
    974 #endif
    975 #if !defined(_LIBCPP_SUPPRESS_DEPRECATED_PUSH)
    976 # define _LIBCPP_SUPPRESS_DEPRECATED_PUSH
    977 # define _LIBCPP_SUPPRESS_DEPRECATED_POP
    978 #endif
    979
    966 980 #if _LIBCPP_STD_VER <= 11
    967 981 # define _LIBCPP_EXPLICIT_AFTER_CXX11
    968 982 #else
  • libcxx/trunk/include/type_traits

     
    1119 1119 template <class _Tp> using add_rvalue_reference_t = typename add_rvalue_reference<_Tp>::type;
    1120 1120 #endif
    1121 1121
    1122 // Suppress deprecation notice for volatile-qualified return type resulting
    1123 // from volatile-qualified types _Tp.
    1124 _LIBCPP_SUPPRESS_DEPRECATED_PUSH
    1122 1125 template <class _Tp> _Tp&& __declval(int);
    1123 1126 template <class _Tp> _Tp __declval(long);
    1127 _LIBCPP_SUPPRESS_DEPRECATED_POP
    1124 1128
    1125 1129 template <class _Tp>
    1126 1130 decltype(_VSTD::__declval<_Tp>(0))
  • libcxx/trunk/test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp

     
    55 55 #endif
    56 56 }
    57 57
    58 // Do not warn on deprecated uses of 'volatile' below.
    59 _LIBCPP_SUPPRESS_DEPRECATED_PUSH
    60
    58 61 int main(int, char**)
    59 62 {
    60 63 {
     
    171 174
    172 175 return 0;
    173 176 }
    177
    178 _LIBCPP_SUPPRESS_DEPRECATED_POP
  • libcxxabi/trunk/test/unwind_06.pass.cpp

     
    24 24 double try1(bool v) {
    25 25 double a = get(0);
    26 26 double b = get(1);
    27 for (counter = 100; counter; --counter)
    27 for (counter = 100; counter; counter = counter - 1)
    28 28 a += get(1) + b;
    29 29 if (v) throw 10;
    30 30 return get(0)+a+b;
     
    34 34 double a = get(0);
    35 35 double b = get(1);
    36 36 double c = get(2);
    37 for (counter = 100; counter; --counter)
    37 for (counter = 100; counter; counter = counter - 1)
    38 38 a += get(1) + b + c;
    39 39 if (v) throw 10;
    40 40 return get(0)+a+b+c;
     
    45 45 double b = get(1);
    46 46 double c = get(2);
    47 47 double d = get(3);
    48 for (counter = 100; counter; --counter)
    48 for (counter = 100; counter; counter = counter - 1)
    49 49 a += get(1) + b + c + d;
    50 50 if (v) throw 10;
    51 51 return get(0)+a+b+c+d;
     
    57 57 double c = get(0);
    58 58 double d = get(0);
    59 59 double e = get(0);
    60 for (counter = 100; counter; --counter)
    60 for (counter = 100; counter; counter = counter - 1)
    61 61 a += get(1) + b+c+d+e;
    62 62 if (v) throw 10;
    63 63 return get(0)+a+b+c+d+e;
     
    70 70 double d = get(0);
    71 71 double e = get(0);
    72 72 double f = get(0);
    73 for (counter = 100; counter; --counter)
    73 for (counter = 100; counter; counter = counter - 1)
    74 74 a += get(1) + b+c+d+e+f;
    75 75 if (v) throw 10;
    76 76 return get(0)+a+b+c+d+e+f;
     
    84 84 double e = get(0);
    85 85 double f = get(0);
    86 86 double g = get(0);
    87 for (counter = 100; counter; --counter)
    87 for (counter = 100; counter; counter = counter - 1)
    88 88 a += get(1) + b+c+d+e+f+g;
    89 89 if (v) throw 10;
    90 90 return get(0)+a+b+c+d+e+f+g;
     
    99 99 double f = get(0);
    100 100 double g = get(0);
    101 101 double h = get(0);
    102 for (counter = 100; counter; --counter)
    102 for (counter = 100; counter; counter = counter - 1)
    103 103 a += get(1) + b+c+d+e+f+g+h;
    104 104 if (v) throw 10;
    105 105 return get(0)+a+b+c+d+e+f+g+h;
     
    115 115 double g = get(0);
    116 116 double h = get(0);
    117 117 double i = get(0);
    118 for (counter = 100; counter; --counter)
    118 for (counter = 100; counter; counter = counter - 1)
    119 119 a += get(1) + b+c+d+e+f+g+h+i;
    120 120 if (v) throw 10;
    121 121 return get(0)+a+b+c+d+e+f+g+h+i;