[libcxx] r267844 - Add braces, move braces, and rename variables to avoid shadowing. Patch from STL at microsoft.com

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 27 19:45:11 PDT 2016


Author: ericwf
Date: Wed Apr 27 21:45:11 2016
New Revision: 267844

URL: http://llvm.org/viewvc/llvm-project?rev=267844&view=rev
Log:
Add braces, move braces, and rename variables to avoid shadowing. Patch from STL at microsoft.com

Modified:
    libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort_comp.pass.cpp
    libcxx/trunk/test/std/containers/associative/multiset/iterator.pass.cpp
    libcxx/trunk/test/std/containers/associative/multiset/multiset.cons/iter_iter_alloc.pass.cpp
    libcxx/trunk/test/std/containers/associative/set/set.cons/iter_iter_alloc.pass.cpp
    libcxx/trunk/test/std/utilities/memory/unique.ptr/unique.ptr.single/pointer_type.pass.cpp

Modified: libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort_comp.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort_comp.pass.cpp?rev=267844&r1=267843&r2=267844&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort_comp.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort_comp.pass.cpp Wed Apr 27 21:45:11 2016
@@ -62,6 +62,7 @@ test_larger_sorts(unsigned N)
 
 int main()
 {
+    {
     int i = 0;
     std::partial_sort(&i, &i, &i);
     assert(i == 0);
@@ -73,6 +74,7 @@ int main()
     test_larger_sorts(997);
     test_larger_sorts(1000);
     test_larger_sorts(1009);
+    }
 
 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
     {

Modified: libcxx/trunk/test/std/containers/associative/multiset/iterator.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/associative/multiset/iterator.pass.cpp?rev=267844&r1=267843&r2=267844&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/associative/multiset/iterator.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/associative/multiset/iterator.pass.cpp Wed Apr 27 21:45:11 2016
@@ -70,7 +70,7 @@ int main()
         std::multiset<int>::const_iterator k = i;
         assert(i == k);
         for (int j = 1; j <= 8; ++j)
-            for (int k = 0; k < 3; ++k, ++i)
+            for (int n = 0; n < 3; ++n, ++i)
                 assert(*i == j);
     }
     {
@@ -151,7 +151,7 @@ int main()
         std::multiset<int, std::less<int>, min_allocator<int>>::const_iterator k = i;
         assert(i == k);
         for (int j = 1; j <= 8; ++j)
-            for (int k = 0; k < 3; ++k, ++i)
+            for (int n = 0; n < 3; ++n, ++i)
                 assert(*i == j);
     }
     {

Modified: libcxx/trunk/test/std/containers/associative/multiset/multiset.cons/iter_iter_alloc.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/associative/multiset/multiset.cons/iter_iter_alloc.pass.cpp?rev=267844&r1=267843&r2=267844&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/associative/multiset/multiset.cons/iter_iter_alloc.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/associative/multiset/multiset.cons/iter_iter_alloc.pass.cpp Wed Apr 27 21:45:11 2016
@@ -24,6 +24,7 @@
 
 int main()
 {
+    {
     typedef int V;
     V ar[] =
     {
@@ -55,6 +56,7 @@ int main()
     assert(*next(m.begin(), 6) == 3);
     assert(*next(m.begin(), 7) == 3);
     assert(*next(m.begin(), 8) == 3);
+    }
 #if _LIBCPP_STD_VER > 11
     {
     typedef int V;

Modified: libcxx/trunk/test/std/containers/associative/set/set.cons/iter_iter_alloc.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/associative/set/set.cons/iter_iter_alloc.pass.cpp?rev=267844&r1=267843&r2=267844&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/associative/set/set.cons/iter_iter_alloc.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/associative/set/set.cons/iter_iter_alloc.pass.cpp Wed Apr 27 21:45:11 2016
@@ -28,6 +28,7 @@
 
 int main()
 {
+    {
     typedef int V;
     V ar[] =
     {
@@ -53,6 +54,7 @@ int main()
     assert(*m.begin() == 1);
     assert(*next(m.begin()) == 2);
     assert(*next(m.begin(), 2) == 3);
+    }
 #if _LIBCPP_STD_VER > 11
     {
     typedef int V;

Modified: libcxx/trunk/test/std/utilities/memory/unique.ptr/unique.ptr.single/pointer_type.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/memory/unique.ptr/unique.ptr.single/pointer_type.pass.cpp?rev=267844&r1=267843&r2=267844&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/memory/unique.ptr/unique.ptr.single/pointer_type.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/memory/unique.ptr/unique.ptr.single/pointer_type.pass.cpp Wed Apr 27 21:45:11 2016
@@ -46,10 +46,10 @@ int main()
     {
     typedef std::unique_ptr<int, D2> P;
     static_assert(std::is_same<P::pointer, int*>::value, "");
-
+    }
     {
     typedef std::unique_ptr<int, D3> P;
     static_assert(std::is_same<P::pointer, int*>::value, "");
-    }}
+    }
 #endif
 }




More information about the cfe-commits mailing list