[libcxx] r308534 - [libcxx] [test] Fix Clang -Wunused-local-typedef warnings.

Stephan T. Lavavej via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 19 15:02:30 PDT 2017


Author: stl_msft
Date: Wed Jul 19 15:02:29 2017
New Revision: 308534

URL: http://llvm.org/viewvc/llvm-project?rev=308534&view=rev
Log:
[libcxx] [test] Fix Clang -Wunused-local-typedef warnings.

Fix D34536.

Modified:
    libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/acos.pass.cpp
    libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/acosh.pass.cpp
    libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/asin.pass.cpp
    libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/asinh.pass.cpp
    libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/atanh.pass.cpp
    libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/cos.pass.cpp
    libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/cosh.pass.cpp
    libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/sin.pass.cpp
    libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/sinh.pass.cpp
    libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/tanh.pass.cpp
    libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/eval.pass.cpp
    libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/eval.pass.cpp
    libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/eval.pass.cpp
    libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/eval.pass.cpp
    libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/eval.pass.cpp
    libcxx/trunk/test/std/thread/thread.threads/thread.thread.this/sleep_until.pass.cpp

Modified: libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/acos.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/acos.pass.cpp?rev=308534&r1=308533&r2=308534&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/acos.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/acos.pass.cpp Wed Jul 19 15:02:29 2017
@@ -34,7 +34,6 @@ test()
 
 void test_edges()
 {
-    typedef std::complex<double> C;
     const double pi = std::atan2(+0., -0.);
     const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
     for (unsigned i = 0; i < N; ++i)

Modified: libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/acosh.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/acosh.pass.cpp?rev=308534&r1=308533&r2=308534&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/acosh.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/acosh.pass.cpp Wed Jul 19 15:02:29 2017
@@ -34,7 +34,6 @@ test()
 
 void test_edges()
 {
-    typedef std::complex<double> C;
     const double pi = std::atan2(+0., -0.);
     const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
     for (unsigned i = 0; i < N; ++i)

Modified: libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/asin.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/asin.pass.cpp?rev=308534&r1=308533&r2=308534&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/asin.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/asin.pass.cpp Wed Jul 19 15:02:29 2017
@@ -34,7 +34,6 @@ test()
 
 void test_edges()
 {
-    typedef std::complex<double> C;
     const double pi = std::atan2(+0., -0.);
     const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
     for (unsigned i = 0; i < N; ++i)

Modified: libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/asinh.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/asinh.pass.cpp?rev=308534&r1=308533&r2=308534&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/asinh.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/asinh.pass.cpp Wed Jul 19 15:02:29 2017
@@ -34,7 +34,6 @@ test()
 
 void test_edges()
 {
-    typedef std::complex<double> C;
     const double pi = std::atan2(+0., -0.);
     const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
     for (unsigned i = 0; i < N; ++i)

Modified: libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/atanh.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/atanh.pass.cpp?rev=308534&r1=308533&r2=308534&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/atanh.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/atanh.pass.cpp Wed Jul 19 15:02:29 2017
@@ -34,7 +34,6 @@ test()
 
 void test_edges()
 {
-    typedef std::complex<double> C;
     const double pi = std::atan2(+0., -0.);
     const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
     for (unsigned i = 0; i < N; ++i)

Modified: libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/cos.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/cos.pass.cpp?rev=308534&r1=308533&r2=308534&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/cos.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/cos.pass.cpp Wed Jul 19 15:02:29 2017
@@ -34,7 +34,6 @@ test()
 
 void test_edges()
 {
-    typedef std::complex<double> C;
     const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
     for (unsigned i = 0; i < N; ++i)
     {

Modified: libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/cosh.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/cosh.pass.cpp?rev=308534&r1=308533&r2=308534&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/cosh.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/cosh.pass.cpp Wed Jul 19 15:02:29 2017
@@ -34,7 +34,6 @@ test()
 
 void test_edges()
 {
-    typedef std::complex<double> C;
     const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
     for (unsigned i = 0; i < N; ++i)
     {

Modified: libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/sin.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/sin.pass.cpp?rev=308534&r1=308533&r2=308534&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/sin.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/sin.pass.cpp Wed Jul 19 15:02:29 2017
@@ -34,7 +34,6 @@ test()
 
 void test_edges()
 {
-    typedef std::complex<double> C;
     const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
     for (unsigned i = 0; i < N; ++i)
     {

Modified: libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/sinh.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/sinh.pass.cpp?rev=308534&r1=308533&r2=308534&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/sinh.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/sinh.pass.cpp Wed Jul 19 15:02:29 2017
@@ -34,7 +34,6 @@ test()
 
 void test_edges()
 {
-    typedef std::complex<double> C;
     const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
     for (unsigned i = 0; i < N; ++i)
     {

Modified: libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/tanh.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/tanh.pass.cpp?rev=308534&r1=308533&r2=308534&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/tanh.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/tanh.pass.cpp Wed Jul 19 15:02:29 2017
@@ -34,7 +34,6 @@ test()
 
 void test_edges()
 {
-    typedef std::complex<double> C;
     const unsigned N = sizeof(testcases) / sizeof(testcases[0]);
     for (unsigned i = 0; i < N; ++i)
     {

Modified: libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/eval.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/eval.pass.cpp?rev=308534&r1=308533&r2=308534&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/eval.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.lognormal/eval.pass.cpp Wed Jul 19 15:02:29 2017
@@ -33,7 +33,6 @@ void
 test1()
 {
     typedef std::lognormal_distribution<> D;
-    typedef D::param_type P;
     typedef std::mt19937 G;
     G g;
     D d(-1./8192, 0.015625);
@@ -78,7 +77,6 @@ void
 test2()
 {
     typedef std::lognormal_distribution<> D;
-    typedef D::param_type P;
     typedef std::mt19937 G;
     G g;
     D d(-1./32, 0.25);
@@ -123,7 +121,6 @@ void
 test3()
 {
     typedef std::lognormal_distribution<> D;
-    typedef D::param_type P;
     typedef std::mt19937 G;
     G g;
     D d(-1./8, 0.5);
@@ -168,7 +165,6 @@ void
 test4()
 {
     typedef std::lognormal_distribution<> D;
-    typedef D::param_type P;
     typedef std::mt19937 G;
     G g;
     D d;
@@ -213,7 +209,6 @@ void
 test5()
 {
     typedef std::lognormal_distribution<> D;
-    typedef D::param_type P;
     typedef std::mt19937 G;
     G g;
     D d(-0.78125, 1.25);

Modified: libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/eval.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/eval.pass.cpp?rev=308534&r1=308533&r2=308534&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/eval.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.t/eval.pass.cpp Wed Jul 19 15:02:29 2017
@@ -33,7 +33,6 @@ int main()
 {
     {
         typedef std::student_t_distribution<> D;
-        typedef D::param_type P;
         typedef std::minstd_rand G;
         G g;
         D d(5.5);
@@ -69,7 +68,6 @@ int main()
     }
     {
         typedef std::student_t_distribution<> D;
-        typedef D::param_type P;
         typedef std::minstd_rand G;
         G g;
         D d(10);
@@ -105,7 +103,6 @@ int main()
     }
     {
         typedef std::student_t_distribution<> D;
-        typedef D::param_type P;
         typedef std::minstd_rand G;
         G g;
         D d(100);

Modified: libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/eval.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/eval.pass.cpp?rev=308534&r1=308533&r2=308534&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/eval.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.extreme/eval.pass.cpp Wed Jul 19 15:02:29 2017
@@ -33,7 +33,6 @@ void
 test1()
 {
     typedef std::extreme_value_distribution<> D;
-    typedef D::param_type P;
     typedef std::mt19937 G;
     G g;
     D d(0.5, 2);
@@ -75,7 +74,6 @@ void
 test2()
 {
     typedef std::extreme_value_distribution<> D;
-    typedef D::param_type P;
     typedef std::mt19937 G;
     G g;
     D d(1, 2);
@@ -117,7 +115,6 @@ void
 test3()
 {
     typedef std::extreme_value_distribution<> D;
-    typedef D::param_type P;
     typedef std::mt19937 G;
     G g;
     D d(1.5, 3);
@@ -159,7 +156,6 @@ void
 test4()
 {
     typedef std::extreme_value_distribution<> D;
-    typedef D::param_type P;
     typedef std::mt19937 G;
     G g;
     D d(3, 4);

Modified: libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/eval.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/eval.pass.cpp?rev=308534&r1=308533&r2=308534&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/eval.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.gamma/eval.pass.cpp Wed Jul 19 15:02:29 2017
@@ -33,7 +33,6 @@ int main()
 {
     {
         typedef std::gamma_distribution<> D;
-        typedef D::param_type P;
         typedef std::mt19937 G;
         G g;
         D d(0.5, 2);
@@ -73,7 +72,6 @@ int main()
     }
     {
         typedef std::gamma_distribution<> D;
-        typedef D::param_type P;
         typedef std::mt19937 G;
         G g;
         D d(1, .5);
@@ -113,7 +111,6 @@ int main()
     }
     {
         typedef std::gamma_distribution<> D;
-        typedef D::param_type P;
         typedef std::mt19937 G;
         G g;
         D d(2, 3);

Modified: libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/eval.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/eval.pass.cpp?rev=308534&r1=308533&r2=308534&view=diff
==============================================================================
--- libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/eval.pass.cpp (original)
+++ libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.samp/rand.dist.samp.plinear/eval.pass.cpp Wed Jul 19 15:02:29 2017
@@ -44,7 +44,6 @@ void
 test1()
 {
     typedef std::piecewise_linear_distribution<> D;
-    typedef D::param_type P;
     typedef std::mt19937_64 G;
     G g;
     double b[] = {10, 14, 16, 17};
@@ -97,7 +96,6 @@ void
 test2()
 {
     typedef std::piecewise_linear_distribution<> D;
-    typedef D::param_type P;
     typedef std::mt19937_64 G;
     G g;
     double b[] = {10, 14, 16, 17};
@@ -150,7 +148,6 @@ void
 test3()
 {
     typedef std::piecewise_linear_distribution<> D;
-    typedef D::param_type P;
     typedef std::mt19937_64 G;
     G g;
     double b[] = {10, 14, 16, 17};
@@ -203,7 +200,6 @@ void
 test4()
 {
     typedef std::piecewise_linear_distribution<> D;
-    typedef D::param_type P;
     typedef std::mt19937_64 G;
     G g;
     double b[] = {10, 14, 16};
@@ -257,7 +253,6 @@ void
 test5()
 {
     typedef std::piecewise_linear_distribution<> D;
-    typedef D::param_type P;
     typedef std::mt19937_64 G;
     G g;
     double b[] = {10, 14};
@@ -312,7 +307,6 @@ void
 test6()
 {
     typedef std::piecewise_linear_distribution<> D;
-    typedef D::param_type P;
     typedef std::mt19937_64 G;
     G g;
     double b[] = {10, 14, 16, 17};

Modified: libcxx/trunk/test/std/thread/thread.threads/thread.thread.this/sleep_until.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/thread.threads/thread.thread.this/sleep_until.pass.cpp?rev=308534&r1=308533&r2=308534&view=diff
==============================================================================
--- libcxx/trunk/test/std/thread/thread.threads/thread.thread.this/sleep_until.pass.cpp (original)
+++ libcxx/trunk/test/std/thread/thread.threads/thread.thread.this/sleep_until.pass.cpp Wed Jul 19 15:02:29 2017
@@ -22,7 +22,6 @@ int main()
 {
     typedef std::chrono::system_clock Clock;
     typedef Clock::time_point time_point;
-    typedef Clock::duration duration;
     std::chrono::milliseconds ms(500);
     time_point t0 = Clock::now();
     std::this_thread::sleep_until(t0 + ms);




More information about the cfe-commits mailing list