From c538ab0daad54a962626f166844ca51dfb3e4c08 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Thu, 12 Apr 2018 23:56:22 +0000 Subject: [PATCH] [libcxx] [test] Fix whitespace, NFC. test/std almost always uses spaces; now it is entirely tab-free. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@329978 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../alg.copy/copy.pass.cpp | 8 +-- .../alg.copy/copy_backward.pass.cpp | 10 ++-- .../alg.copy/copy_if.pass.cpp | 8 +-- .../alg.copy/copy_n.pass.cpp | 8 +-- .../alg.unique/unique.pass.cpp | 2 +- .../alg.unique/unique_pred.pass.cpp | 2 +- .../queue/queue.defn/emplace.pass.cpp | 50 +++++++++---------- test/std/containers/test_compare.h | 4 +- .../new_array_ptr.fail.cpp | 2 +- .../new.delete.placement/new_ptr.fail.cpp | 2 +- .../ptr.launder/launder.pass.cpp | 12 ++--- test/std/strings/string.view/types.pass.cpp | 26 +++++----- .../futures/futures.async/async.fail.cpp | 6 +-- .../meta.trans.other/remove_cvref.pass.cpp | 2 +- 14 files changed, 71 insertions(+), 71 deletions(-) diff --git a/test/std/algorithms/alg.modifying.operations/alg.copy/copy.pass.cpp b/test/std/algorithms/alg.modifying.operations/alg.copy/copy.pass.cpp index 57aa11e56..d2d567f31 100644 --- a/test/std/algorithms/alg.modifying.operations/alg.copy/copy.pass.cpp +++ b/test/std/algorithms/alg.modifying.operations/alg.copy/copy.pass.cpp @@ -24,10 +24,10 @@ // int ia[] = {1, 2, 3, 4, 5}; // int ic[] = {6, 6, 6, 6, 6, 6, 6}; // -// auto p = std::copy(std::begin(ia), std::end(ia), std::begin(ic)); -// return std::equal(std::begin(ia), std::end(ia), std::begin(ic), p) -// && std::all_of(p, std::end(ic), [](int a){return a == 6;}) -// ; +// auto p = std::copy(std::begin(ia), std::end(ia), std::begin(ic)); +// return std::equal(std::begin(ia), std::end(ia), std::begin(ic), p) +// && std::all_of(p, std::end(ic), [](int a){return a == 6;}) +// ; // } // #endif diff --git a/test/std/algorithms/alg.modifying.operations/alg.copy/copy_backward.pass.cpp b/test/std/algorithms/alg.modifying.operations/alg.copy/copy_backward.pass.cpp index aaad25f70..3a2f0f62c 100644 --- a/test/std/algorithms/alg.modifying.operations/alg.copy/copy_backward.pass.cpp +++ b/test/std/algorithms/alg.modifying.operations/alg.copy/copy_backward.pass.cpp @@ -26,11 +26,11 @@ // int ia[] = {1, 2, 3, 4, 5}; // int ic[] = {6, 6, 6, 6, 6, 6, 6}; // -// size_t N = std::size(ia); -// auto p = std::copy_backward(std::begin(ia), std::end(ia), std::begin(ic) + N); -// return std::equal(std::begin(ic), p, std::begin(ia)) -// && std::all_of(p, std::end(ic), [](int a){return a == 6;}) -// ; +// size_t N = std::size(ia); +// auto p = std::copy_backward(std::begin(ia), std::end(ia), std::begin(ic) + N); +// return std::equal(std::begin(ic), p, std::begin(ia)) +// && std::all_of(p, std::end(ic), [](int a){return a == 6;}) +// ; // } // #endif diff --git a/test/std/algorithms/alg.modifying.operations/alg.copy/copy_if.pass.cpp b/test/std/algorithms/alg.modifying.operations/alg.copy/copy_if.pass.cpp index 2ec832546..19018151f 100644 --- a/test/std/algorithms/alg.modifying.operations/alg.copy/copy_if.pass.cpp +++ b/test/std/algorithms/alg.modifying.operations/alg.copy/copy_if.pass.cpp @@ -26,10 +26,10 @@ // int ia[] = {2, 4, 6, 8, 6}; // int ic[] = {0, 0, 0, 0, 0, 0}; // -// auto p = std::copy_if(std::begin(ia), std::end(ia), std::begin(ic), is6); -// return std::all_of(std::begin(ic), p, [](int a){return a == 6;}) -// && std::all_of(p, std::end(ic), [](int a){return a == 0;}) -// ; +// auto p = std::copy_if(std::begin(ia), std::end(ia), std::begin(ic), is6); +// return std::all_of(std::begin(ic), p, [](int a){return a == 6;}) +// && std::all_of(p, std::end(ic), [](int a){return a == 0;}) +// ; // } // #endif diff --git a/test/std/algorithms/alg.modifying.operations/alg.copy/copy_n.pass.cpp b/test/std/algorithms/alg.modifying.operations/alg.copy/copy_n.pass.cpp index a268cd90f..0e5fa63a3 100644 --- a/test/std/algorithms/alg.modifying.operations/alg.copy/copy_n.pass.cpp +++ b/test/std/algorithms/alg.modifying.operations/alg.copy/copy_n.pass.cpp @@ -25,10 +25,10 @@ // int ia[] = {1, 2, 3, 4, 5}; // int ic[] = {6, 6, 6, 6, 6, 6, 6}; // -// auto p = std::copy_n(std::begin(ia), 4, std::begin(ic)); -// return std::equal(std::begin(ic), p, std::begin(ia)) -// && std::all_of(p, std::end(ic), [](int a){return a == 6;}) -// ; +// auto p = std::copy_n(std::begin(ia), 4, std::begin(ic)); +// return std::equal(std::begin(ic), p, std::begin(ia)) +// && std::all_of(p, std::end(ic), [](int a){return a == 6;}) +// ; // } // #endif diff --git a/test/std/algorithms/alg.modifying.operations/alg.unique/unique.pass.cpp b/test/std/algorithms/alg.modifying.operations/alg.unique/unique.pass.cpp index b61196c9d..dcb09a181 100644 --- a/test/std/algorithms/alg.modifying.operations/alg.unique/unique.pass.cpp +++ b/test/std/algorithms/alg.modifying.operations/alg.unique/unique.pass.cpp @@ -26,7 +26,7 @@ TEST_CONSTEXPR bool test_constexpr() { int ia[] = {0, 1, 1, 3, 4}; const int expected[] = {0, 1, 3, 4}; - const size_t N = 4; + const size_t N = 4; auto it = std::unique(std::begin(ia), std::end(ia)); return it == (std::begin(ia) + N) diff --git a/test/std/algorithms/alg.modifying.operations/alg.unique/unique_pred.pass.cpp b/test/std/algorithms/alg.modifying.operations/alg.unique/unique_pred.pass.cpp index 539d226e8..2936a4e66 100644 --- a/test/std/algorithms/alg.modifying.operations/alg.unique/unique_pred.pass.cpp +++ b/test/std/algorithms/alg.modifying.operations/alg.unique/unique_pred.pass.cpp @@ -26,7 +26,7 @@ TEST_CONSTEXPR bool test_constexpr() { int ia[] = {0, 1, 1, 3, 4}; const int expected[] = {0, 1, 3, 4}; - const size_t N = 4; + const size_t N = 4; auto it = std::unique(std::begin(ia), std::end(ia), [](int a, int b) {return a == b; }); return it == (std::begin(ia) + N) diff --git a/test/std/containers/container.adaptors/queue/queue.defn/emplace.pass.cpp b/test/std/containers/container.adaptors/queue/queue.defn/emplace.pass.cpp index bcf5fb695..ead9ad0bc 100644 --- a/test/std/containers/container.adaptors/queue/queue.defn/emplace.pass.cpp +++ b/test/std/containers/container.adaptors/queue/queue.defn/emplace.pass.cpp @@ -1,6 +1,6 @@ //===----------------------------------------------------------------------===// // -// The LLVM Compiler Infrastructure +// The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. @@ -13,7 +13,7 @@ // template decltype(auto) emplace(Args&&... args); // return type is 'decltype(auto)' in C++17; 'void' before -// whatever the return type of the underlying container's emplace_back() returns. +// whatever the return type of the underlying container's emplace_back() returns. #include @@ -26,40 +26,40 @@ template void test_return_type() { - typedef typename Queue::container_type Container; - typedef typename Container::value_type value_type; - typedef decltype(std::declval().emplace(std::declval())) queue_return_type; + typedef typename Queue::container_type Container; + typedef typename Container::value_type value_type; + typedef decltype(std::declval().emplace(std::declval())) queue_return_type; #if TEST_STD_VER > 14 - typedef decltype(std::declval().emplace_back(std::declval())) container_return_type; - static_assert(std::is_same::value, ""); + typedef decltype(std::declval().emplace_back(std::declval())) container_return_type; + static_assert(std::is_same::value, ""); #else - static_assert(std::is_same::value, ""); + static_assert(std::is_same::value, ""); #endif } int main() { - test_return_type > (); - test_return_type > > (); + test_return_type > (); + test_return_type > > (); - typedef Emplaceable T; - std::queue q; + typedef Emplaceable T; + std::queue q; #if TEST_STD_VER > 14 - T& r1 = q.emplace(1, 2.5); - assert(&r1 == &q.back()); - T& r2 = q.emplace(2, 3.5); - assert(&r2 == &q.back()); - T& r3 = q.emplace(3, 4.5); - assert(&r3 == &q.back()); - assert(&r1 == &q.front()); + T& r1 = q.emplace(1, 2.5); + assert(&r1 == &q.back()); + T& r2 = q.emplace(2, 3.5); + assert(&r2 == &q.back()); + T& r3 = q.emplace(3, 4.5); + assert(&r3 == &q.back()); + assert(&r1 == &q.front()); #else - q.emplace(1, 2.5); - q.emplace(2, 3.5); - q.emplace(3, 4.5); + q.emplace(1, 2.5); + q.emplace(2, 3.5); + q.emplace(3, 4.5); #endif - assert(q.size() == 3); - assert(q.front() == Emplaceable(1, 2.5)); - assert(q.back() == Emplaceable(3, 4.5)); + assert(q.size() == 3); + assert(q.front() == Emplaceable(1, 2.5)); + assert(q.back() == Emplaceable(3, 4.5)); } diff --git a/test/std/containers/test_compare.h b/test/std/containers/test_compare.h index 35f4640f1..32d831d40 100644 --- a/test/std/containers/test_compare.h +++ b/test/std/containers/test_compare.h @@ -37,8 +37,8 @@ public: template class non_const_compare { -// operator() deliberately not marked as 'const' - bool operator()(const C& x,const C&y) { return x < y; } +// operator() deliberately not marked as 'const' + bool operator()(const C& x, const C& y) { return x < y; } }; diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_array_ptr.fail.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_array_ptr.fail.cpp index 83d5e80e8..61172fb5a 100644 --- a/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_array_ptr.fail.cpp +++ b/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_array_ptr.fail.cpp @@ -21,6 +21,6 @@ int main () { - char buffer[100]; + char buffer[100]; ::operator new[](4, buffer); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} } diff --git a/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_ptr.fail.cpp b/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_ptr.fail.cpp index 9d3892cb0..def8839c4 100644 --- a/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_ptr.fail.cpp +++ b/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_ptr.fail.cpp @@ -21,6 +21,6 @@ int main () { - char buffer[100]; + char buffer[100]; ::operator new(4, buffer); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} } diff --git a/test/std/language.support/support.dynamic/ptr.launder/launder.pass.cpp b/test/std/language.support/support.dynamic/ptr.launder/launder.pass.cpp index 1aa462957..457696a42 100644 --- a/test/std/language.support/support.dynamic/ptr.launder/launder.pass.cpp +++ b/test/std/language.support/support.dynamic/ptr.launder/launder.pass.cpp @@ -22,14 +22,14 @@ constexpr int gi = 5; constexpr float gf = 8.f; int main() { - static_assert(std::launder(&gi) == &gi, "" ); - static_assert(std::launder(&gf) == &gf, "" ); + static_assert(std::launder(&gi) == &gi, "" ); + static_assert(std::launder(&gf) == &gf, "" ); - const int *i = &gi; - const float *f = &gf; + const int *i = &gi; + const float *f = &gf; static_assert(std::is_same::value, ""); static_assert(std::is_same::value, ""); - assert(std::launder(i) == i); - assert(std::launder(f) == f); + assert(std::launder(i) == i); + assert(std::launder(f) == f); } diff --git a/test/std/strings/string.view/types.pass.cpp b/test/std/strings/string.view/types.pass.cpp index 00f4d60ee..4c29959f0 100644 --- a/test/std/strings/string.view/types.pass.cpp +++ b/test/std/strings/string.view/types.pass.cpp @@ -15,19 +15,19 @@ // { // public: // // types: -// using traits_type = traits; -// using value_type = charT; -// using pointer = value_type*; -// using const_pointer = const value_type*; -// using reference = value_type&; -// using const_reference = const value_type&; -// using const_iterator = implementation-defined ; // see 24.4.2.2 -// using iterator = const_iterator; -// using const_reverse_iterator = reverse_iterator; -// using iterator = const_reverse_iterator; -// using size_type = size_t; -// using difference_type = ptrdiff_t; -// static constexpr size_type npos = size_type(-1); +// using traits_type = traits; +// using value_type = charT; +// using pointer = value_type*; +// using const_pointer = const value_type*; +// using reference = value_type&; +// using const_reference = const value_type&; +// using const_iterator = implementation-defined ; // see 24.4.2.2 +// using iterator = const_iterator; +// using const_reverse_iterator = reverse_iterator; +// using iterator = const_reverse_iterator; +// using size_type = size_t; +// using difference_type = ptrdiff_t; +// static constexpr size_type npos = size_type(-1); // // }; diff --git a/test/std/thread/futures/futures.async/async.fail.cpp b/test/std/thread/futures/futures.async/async.fail.cpp index 594c67f52..e20f1a0a5 100644 --- a/test/std/thread/futures/futures.async/async.fail.cpp +++ b/test/std/thread/futures/futures.async/async.fail.cpp @@ -33,6 +33,6 @@ int foo (int x) { return x; } int main () { - std::async( foo, 3); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} - std::async(std::launch::async, foo, 3); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} -} \ No newline at end of file + std::async( foo, 3); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} + std::async(std::launch::async, foo, 3); // expected-error {{ignoring return value of function declared with 'nodiscard' attribute}} +} diff --git a/test/std/utilities/meta/meta.trans/meta.trans.other/remove_cvref.pass.cpp b/test/std/utilities/meta/meta.trans/meta.trans.other/remove_cvref.pass.cpp index e06229f7e..e220f591f 100644 --- a/test/std/utilities/meta/meta.trans/meta.trans.other/remove_cvref.pass.cpp +++ b/test/std/utilities/meta/meta.trans/meta.trans.other/remove_cvref.pass.cpp @@ -32,7 +32,7 @@ int main() test_remove_cvref(); test_remove_cvref(); -// Doesn't decay +// Doesn't decay test_remove_cvref(); test_remove_cvref(); test_remove_cvref();