[libcxx] r310761 - [libcxx] [test] Rename _Up to U, etc. NFCI.

Stephan T. Lavavej via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 11 13:54:09 PDT 2017


Author: stl_msft
Date: Fri Aug 11 13:54:09 2017
New Revision: 310761

URL: http://llvm.org/viewvc/llvm-project?rev=310761&view=rev
Log:
[libcxx] [test] Rename _Up to U, etc. NFCI.

This improves readability and (theoretically) improves portability,
as _Ugly names are reserved.

This performs additional de-uglification, so all of these tests
follow the example of iterator.traits/empty.pass.cpp.

Modified:
    libcxx/trunk/test/std/iterators/iterator.primitives/iterator.traits/empty.pass.cpp
    libcxx/trunk/test/std/utilities/function.objects/arithmetic.operations/transparent.pass.cpp
    libcxx/trunk/test/std/utilities/function.objects/bitwise.operations/transparent.pass.cpp
    libcxx/trunk/test/std/utilities/function.objects/comparisons/transparent.pass.cpp
    libcxx/trunk/test/std/utilities/function.objects/logical.operations/transparent.pass.cpp

Modified: libcxx/trunk/test/std/iterators/iterator.primitives/iterator.traits/empty.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/iterators/iterator.primitives/iterator.traits/empty.pass.cpp?rev=310761&r1=310760&r2=310761&view=diff
==============================================================================
--- libcxx/trunk/test/std/iterators/iterator.primitives/iterator.traits/empty.pass.cpp (original)
+++ libcxx/trunk/test/std/iterators/iterator.primitives/iterator.traits/empty.pass.cpp Fri Aug 11 13:54:09 2017
@@ -25,8 +25,8 @@ struct has_value_type
 {
 private:
     struct two {char lx; char lxx;};
-    template <class _Up> static two test(...);
-    template <class _Up> static char test(typename _Up::value_type* = 0);
+    template <class U> static two test(...);
+    template <class U> static char test(typename U::value_type* = 0);
 public:
     static const bool value = sizeof(test<T>(0)) == 1;
 };

Modified: libcxx/trunk/test/std/utilities/function.objects/arithmetic.operations/transparent.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/arithmetic.operations/transparent.pass.cpp?rev=310761&r1=310760&r2=310761&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/function.objects/arithmetic.operations/transparent.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/function.objects/arithmetic.operations/transparent.pass.cpp Fri Aug 11 13:54:09 2017
@@ -15,11 +15,11 @@ template <class T>
 struct is_transparent
 {
 private:
-    struct __two {char __lx; char __lxx;};
-    template <class _Up> static __two __test(...);
-    template <class _Up> static char __test(typename _Up::is_transparent* = 0);
+    struct two {char lx; char lxx;};
+    template <class U> static two test(...);
+    template <class U> static char test(typename U::is_transparent* = 0);
 public:
-    static const bool value = sizeof(__test<T>(0)) == 1;
+    static const bool value = sizeof(test<T>(0)) == 1;
 };
 
 

Modified: libcxx/trunk/test/std/utilities/function.objects/bitwise.operations/transparent.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/bitwise.operations/transparent.pass.cpp?rev=310761&r1=310760&r2=310761&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/function.objects/bitwise.operations/transparent.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/function.objects/bitwise.operations/transparent.pass.cpp Fri Aug 11 13:54:09 2017
@@ -15,11 +15,11 @@ template <class T>
 struct is_transparent
 {
 private:
-    struct __two {char __lx; char __lxx;};
-    template <class _Up> static __two __test(...);
-    template <class _Up> static char __test(typename _Up::is_transparent* = 0);
+    struct two {char lx; char lxx;};
+    template <class U> static two test(...);
+    template <class U> static char test(typename U::is_transparent* = 0);
 public:
-    static const bool value = sizeof(__test<T>(0)) == 1;
+    static const bool value = sizeof(test<T>(0)) == 1;
 };
 
 

Modified: libcxx/trunk/test/std/utilities/function.objects/comparisons/transparent.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/comparisons/transparent.pass.cpp?rev=310761&r1=310760&r2=310761&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/function.objects/comparisons/transparent.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/function.objects/comparisons/transparent.pass.cpp Fri Aug 11 13:54:09 2017
@@ -15,11 +15,11 @@ template <class T>
 struct is_transparent
 {
 private:
-    struct __two {char __lx; char __lxx;};
-    template <class _Up> static __two __test(...);
-    template <class _Up> static char __test(typename _Up::is_transparent* = 0);
+    struct two {char lx; char lxx;};
+    template <class U> static two test(...);
+    template <class U> static char test(typename U::is_transparent* = 0);
 public:
-    static const bool value = sizeof(__test<T>(0)) == 1;
+    static const bool value = sizeof(test<T>(0)) == 1;
 };
 
 

Modified: libcxx/trunk/test/std/utilities/function.objects/logical.operations/transparent.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/logical.operations/transparent.pass.cpp?rev=310761&r1=310760&r2=310761&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/function.objects/logical.operations/transparent.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/function.objects/logical.operations/transparent.pass.cpp Fri Aug 11 13:54:09 2017
@@ -15,11 +15,11 @@ template <class T>
 struct is_transparent
 {
 private:
-    struct __two {char __lx; char __lxx;};
-    template <class _Up> static __two __test(...);
-    template <class _Up> static char __test(typename _Up::is_transparent* = 0);
+    struct two {char lx; char lxx;};
+    template <class U> static two test(...);
+    template <class U> static char test(typename U::is_transparent* = 0);
 public:
-    static const bool value = sizeof(__test<T>(0)) == 1;
+    static const bool value = sizeof(test<T>(0)) == 1;
 };
 
 




More information about the cfe-commits mailing list