[libcxx-commits] [libcxxabi] r375307 - P1152R4: Fix deprecation warnings in libc++ testsuite and in uses of is_invocable that would internally conjure up a deprecated function type.

Richard Smith via libcxx-commits libcxx-commits at lists.llvm.org
Fri Oct 18 17:06:00 PDT 2019


Author: rsmith
Date: Fri Oct 18 17:06:00 2019
New Revision: 375307

URL: http://llvm.org/viewvc/llvm-project?rev=375307&view=rev
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

Modified:
    libcxxabi/trunk/test/unwind_06.pass.cpp

Modified: libcxxabi/trunk/test/unwind_06.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/unwind_06.pass.cpp?rev=375307&r1=375306&r2=375307&view=diff
==============================================================================
--- libcxxabi/trunk/test/unwind_06.pass.cpp (original)
+++ libcxxabi/trunk/test/unwind_06.pass.cpp Fri Oct 18 17:06:00 2019
@@ -24,7 +24,7 @@ volatile int counter;
 double try1(bool v) {
   double a = get(0);
   double b = get(1);
-  for (counter = 100; counter; --counter)
+  for (counter = 100; counter; counter = counter - 1)
     a += get(1) + b;
   if (v) throw 10;
   return get(0)+a+b;
@@ -34,7 +34,7 @@ double try2(bool v) {
   double a = get(0);
   double b = get(1);
   double c = get(2);
-  for (counter = 100; counter; --counter)
+  for (counter = 100; counter; counter = counter - 1)
     a += get(1) + b + c;
   if (v) throw 10;
   return get(0)+a+b+c;
@@ -45,7 +45,7 @@ double try3(bool v) {
   double b = get(1);
   double c = get(2);
   double d = get(3);
-  for (counter = 100; counter; --counter)
+  for (counter = 100; counter; counter = counter - 1)
     a += get(1) + b + c + d;
   if (v) throw 10;
   return get(0)+a+b+c+d;
@@ -57,7 +57,7 @@ double try4(bool v) {
   double c = get(0);
   double d = get(0);
   double e = get(0);
-  for (counter = 100; counter; --counter)
+  for (counter = 100; counter; counter = counter - 1)
     a += get(1) + b+c+d+e;
   if (v) throw 10;
   return get(0)+a+b+c+d+e;
@@ -70,7 +70,7 @@ double try5(bool v) {
   double d = get(0);
   double e = get(0);
   double f = get(0);
-  for (counter = 100; counter; --counter)
+  for (counter = 100; counter; counter = counter - 1)
     a += get(1) + b+c+d+e+f;
   if (v) throw 10;
   return get(0)+a+b+c+d+e+f;
@@ -84,7 +84,7 @@ double try6(bool v) {
   double e = get(0);
   double f = get(0);
   double g = get(0);
-  for (counter = 100; counter; --counter)
+  for (counter = 100; counter; counter = counter - 1)
     a += get(1) + b+c+d+e+f+g;
   if (v) throw 10;
   return get(0)+a+b+c+d+e+f+g;
@@ -99,7 +99,7 @@ double try7(bool v) {
   double f = get(0);
   double g = get(0);
   double h = get(0);
-  for (counter = 100; counter; --counter)
+  for (counter = 100; counter; counter = counter - 1)
     a += get(1) + b+c+d+e+f+g+h;
   if (v) throw 10;
   return get(0)+a+b+c+d+e+f+g+h;
@@ -115,7 +115,7 @@ double try8(bool v) {
   double g = get(0);
   double h = get(0);
   double i = get(0);
-  for (counter = 100; counter; --counter)
+  for (counter = 100; counter; counter = counter - 1)
     a += get(1) + b+c+d+e+f+g+h+i;
   if (v) throw 10;
   return get(0)+a+b+c+d+e+f+g+h+i;




More information about the libcxx-commits mailing list