[libcxx] r332159 - [libcxx] [test] Update msvc_stdlib_force_include.hpp.

2018-05-11 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Fri May 11 16:57:32 2018
New Revision: 332159

URL: http://llvm.org/viewvc/llvm-project?rev=332159&view=rev
Log:
[libcxx] [test] Update msvc_stdlib_force_include.hpp.

Modified:
libcxx/trunk/test/support/msvc_stdlib_force_include.hpp

Modified: libcxx/trunk/test/support/msvc_stdlib_force_include.hpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/support/msvc_stdlib_force_include.hpp?rev=332159&r1=332158&r2=332159&view=diff
==
--- libcxx/trunk/test/support/msvc_stdlib_force_include.hpp (original)
+++ libcxx/trunk/test/support/msvc_stdlib_force_include.hpp Fri May 11 16:57:32 
2018
@@ -55,10 +55,6 @@ const AssertionDialogAvoider assertion_d
 #define __has_attribute(X) _MSVC_HAS_ATTRIBUTE_ ## X
 #define _MSVC_HAS_ATTRIBUTE_vector_size 0
 
-#ifdef _NOEXCEPT_TYPES_SUPPORTED
-#define __cpp_noexcept_function_type201510
-#endif // _NOEXCEPT_TYPES_SUPPORTED
-
 // Silence compiler warnings.
 #pragma warning(disable: 4180) // qualifier applied to function type has 
no meaning; ignored
 #pragma warning(disable: 4324) // structure was padded due to alignment 
specifier


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r314258 - [libcxx] [test] Strip trailing whitespace.

2017-09-26 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Tue Sep 26 16:08:41 2017
New Revision: 314258

URL: http://llvm.org/viewvc/llvm-project?rev=314258&view=rev
Log:
[libcxx] [test] Strip trailing whitespace.

Modified:

libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/string_view.pass.cpp

Modified: 
libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/string_view.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/string_view.pass.cpp?rev=314258&r1=314257&r2=314258&view=diff
==
--- 
libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/string_view.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_insert/string_view.pass.cpp
 Tue Sep 26 16:08:41 2017
@@ -18,7 +18,7 @@
 
 #include "test_macros.h"
 #include "min_allocator.h"
- 
+
 template 
 void
 test(S s, typename S::size_type pos, SV sv, S expected)


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r314257 - [libcxx] [test] Silence warning C4324 for MSVC.

2017-09-26 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Tue Sep 26 16:08:39 2017
New Revision: 314257

URL: http://llvm.org/viewvc/llvm-project?rev=314257&view=rev
Log:
[libcxx] [test] Silence warning C4324 for MSVC.

This warning "structure was padded due to alignment specifier" says
that the compiler is going to do exactly what you asked it to do.
It's triggered by the tests for over-aligned dynamic memory allocation.

Modified:
libcxx/trunk/test/support/msvc_stdlib_force_include.hpp

Modified: libcxx/trunk/test/support/msvc_stdlib_force_include.hpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/support/msvc_stdlib_force_include.hpp?rev=314257&r1=314256&r2=314257&view=diff
==
--- libcxx/trunk/test/support/msvc_stdlib_force_include.hpp (original)
+++ libcxx/trunk/test/support/msvc_stdlib_force_include.hpp Tue Sep 26 16:08:39 
2017
@@ -54,6 +54,7 @@ const AssertionDialogAvoider assertion_d
 
 // Silence compiler warnings.
 #pragma warning(disable: 4180) // qualifier applied to function type has 
no meaning; ignored
+#pragma warning(disable: 4324) // structure was padded due to alignment 
specifier
 #pragma warning(disable: 4521) // multiple copy constructors specified
 #pragma warning(disable: 4702) // unreachable code
 #pragma warning(disable: 28251) // Inconsistent annotation for 'new': this 
instance has no annotations.


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r314259 - [libcxx] [test] Fix unused local typedef warnings.

2017-09-26 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Tue Sep 26 16:08:43 2017
New Revision: 314259

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

Modified:

libcxx/trunk/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_view_size.pass.cpp

Modified: 
libcxx/trunk/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_view_size.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_view_size.pass.cpp?rev=314259&r1=314258&r2=314259&view=diff
==
--- 
libcxx/trunk/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_view_size.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_view_size.pass.cpp
 Tue Sep 26 16:08:43 2017
@@ -150,8 +150,8 @@ int main()
 }
 #if TEST_STD_VER >= 11
 {
-typedef std::basic_string, 
min_allocator> S;
-typedef std::string_view SV;
+// typedef std::basic_string, 
min_allocator> S;
+// typedef std::string_view SV;
 // test0();
 // test1();
 }


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r324959 - [libcxx] [test] Strip trailing whitespace, NFC.

2018-02-12 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Mon Feb 12 14:54:35 2018
New Revision: 324959

URL: http://llvm.org/viewvc/llvm-project?rev=324959&view=rev
Log:
[libcxx] [test] Strip trailing whitespace, NFC.

Modified:

libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.copy/copy.pass.cpp

libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.copy/copy_backward.pass.cpp

libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.copy/copy_if.pass.cpp

libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.copy/copy_n.pass.cpp

libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.fill/fill.pass.cpp

libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.fill/fill_n.pass.cpp

libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.generate/generate.pass.cpp

libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.generate/generate_n.pass.cpp

libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.partitions/partition_copy.pass.cpp

libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.remove/remove.pass.cpp

libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.remove/remove_copy.pass.cpp

libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.remove/remove_copy_if.pass.cpp

libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.remove/remove_if.pass.cpp

libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.replace/replace_copy.pass.cpp

libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.replace/replace_copy_if.pass.cpp

libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.reverse/reverse_copy.pass.cpp

libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.rotate/rotate_copy.pass.cpp

libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.transform/binary_transform.pass.cpp

libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.transform/unary_transform.pass.cpp

libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.unique/unique.pass.cpp

libcxx/trunk/test/std/algorithms/alg.nonmodifying/alg.find.end/find_end.pass.cpp

libcxx/trunk/test/std/algorithms/alg.nonmodifying/alg.find.first.of/find_first_of.pass.cpp

libcxx/trunk/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each_n.pass.cpp
libcxx/trunk/test/std/algorithms/alg.nonmodifying/mismatch/mismatch.pass.cpp

libcxx/trunk/test/std/algorithms/alg.nonmodifying/mismatch/mismatch_pred.pass.cpp
libcxx/trunk/test/std/algorithms/alg.sorting/alg.merge/merge.pass.cpp
libcxx/trunk/test/std/algorithms/alg.sorting/alg.merge/merge_comp.pass.cpp

libcxx/trunk/test/std/algorithms/alg.sorting/alg.set.operations/includes/includes.pass.cpp

libcxx/trunk/test/std/algorithms/alg.sorting/alg.set.operations/includes/includes_comp.pass.cpp

libcxx/trunk/test/std/algorithms/alg.sorting/alg.set.operations/set.intersection/set_intersection.pass.cpp

libcxx/trunk/test/std/algorithms/alg.sorting/alg.set.operations/set.intersection/set_intersection_comp.pass.cpp

libcxx/trunk/test/std/containers/container.adaptors/queue/queue.defn/emplace.pass.cpp

libcxx/trunk/test/std/containers/container.adaptors/stack/stack.defn/emplace.pass.cpp
libcxx/trunk/test/std/containers/sequences/list/list.ops/sort_comp.pass.cpp
libcxx/trunk/test/std/strings/string.view/types.pass.cpp
libcxx/trunk/test/std/utilities/meta/meta.type.synop/endian.pass.cpp
libcxx/trunk/test/std/utilities/utility/exchange/exchange.pass.cpp

Modified: 
libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.copy/copy.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.copy/copy.pass.cpp?rev=324959&r1=324958&r2=324959&view=diff
==
--- 
libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.copy/copy.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.copy/copy.pass.cpp
 Mon Feb 12 14:54:35 2018
@@ -23,11 +23,11 @@
 // TEST_CONSTEXPR bool test_constexpr() {
 // 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;})
-// ;   
+// ;
 // }
 // #endif
 

Modified: 
libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.copy/copy_backward.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.copy/copy_backward.pass.cpp?rev=324959&r1=324958&r2=324959&view=diff
==
--- 
libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.copy/copy_backward.pass.cpp
 (original)
++

[libcxx] r326120 - [libcxx] [test] Fix MSVC warnings and errors.

2018-02-26 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Mon Feb 26 12:47:46 2018
New Revision: 326120

URL: http://llvm.org/viewvc/llvm-project?rev=326120&view=rev
Log:
[libcxx] [test] Fix MSVC warnings and errors.

test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp
test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_init_op.pass.cpp
test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan.pass.cpp
test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op.pass.cpp
test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op_init.pass.cpp
test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp
test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop.pass.cpp
test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop_init.pass.cpp
Fix MSVC x64 truncation warnings.
warning C4267: conversion from 'size_t' to 'int', possible loss of data

test/std/strings/basic.string/string.modifiers/string_append/push_back.pass.cpp
Fix MSVC uninitialized memory warning.
warning C6001: Using uninitialized memory 'vl'.

test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR20855_tuple_ref_binding_diagnostics.pass.cpp
Include  for the assert() macro.

Fixes D43273.

Modified:

libcxx/trunk/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp

libcxx/trunk/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_init_op.pass.cpp

libcxx/trunk/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan.pass.cpp

libcxx/trunk/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op.pass.cpp

libcxx/trunk/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op_init.pass.cpp

libcxx/trunk/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp

libcxx/trunk/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop.pass.cpp

libcxx/trunk/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop_init.pass.cpp

libcxx/trunk/test/std/strings/basic.string/string.modifiers/string_append/push_back.pass.cpp

libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR20855_tuple_ref_binding_diagnostics.pass.cpp

Modified: 
libcxx/trunk/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp?rev=326120&r1=326119&r2=326120&view=diff
==
--- 
libcxx/trunk/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp
 Mon Feb 26 12:47:46 2018
@@ -55,31 +55,31 @@ test()
 test(Iter(ia), Iter(ia + i), 0, pRes, pRes + i);
 }
 
-int triangle(int n) { return n*(n+1)/2; }
+size_t triangle(size_t n) { return n*(n+1)/2; }
 
 //  Basic sanity
 void basic_tests()
 {
 {
-std::vector v(10);
+std::vector v(10);
 std::fill(v.begin(), v.end(), 3);
-std::exclusive_scan(v.begin(), v.end(), v.begin(), 50);
+std::exclusive_scan(v.begin(), v.end(), v.begin(), size_t{50});
 for (size_t i = 0; i < v.size(); ++i)
-assert(v[i] == 50 + (int) i * 3);
+assert(v[i] == 50 + i * 3);
 }
 
 {
-std::vector v(10);
+std::vector v(10);
 std::iota(v.begin(), v.end(), 0);
-std::exclusive_scan(v.begin(), v.end(), v.begin(), 30);
+std::exclusive_scan(v.begin(), v.end(), v.begin(), size_t{30});
 for (size_t i = 0; i < v.size(); ++i)
 assert(v[i] == 30 + triangle(i-1));
 }
 
 {
-std::vector v(10);
+std::vector v(10);
 std::iota(v.begin(), v.end(), 1);
-std::exclusive_scan(v.begin(), v.end(), v.begin(), 40);
+std::exclusive_scan(v.begin(), v.end(), v.begin(), size_t{40});
 for (size_t i = 0; i < v.size(); ++i)
 assert(v[i] == 40 + triangle(i));
 }

Modified: 
libcxx/trunk/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_init_op.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_init_op.pass.cpp?rev=326120&r1=326119&r2=326120&view=diff
==
--- 
libcxx/trunk/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_init_op.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_init_op.pass.cpp
 Mon Feb 26 12:47:46 2018
@@ -74,11 +74,11 @@ int main()
 {
 std::vector v(10);
 std::iota(v.begin(), v.end(), static_cast(1));
-std::vector res;
+std::vector res;
 std::exclusive_scan(v.begin(), v.end(), std::back_inserter(res), 1, 
std::multiplies<>());
 
 assert(res.size() == 10);
-int j = 1;
+size_t j = 1;
 assert(res[0] == 1);
 

[libcxx] r304765 - [libcxx] [test] Add _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS to msvc_stdlib_force_include.hpp.

2017-06-05 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Mon Jun  5 21:46:12 2017
New Revision: 304765

URL: http://llvm.org/viewvc/llvm-project?rev=304765&view=rev
Log:
[libcxx] [test] Add _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS to 
msvc_stdlib_force_include.hpp.

This macro will instruct MSVC's STL to not warn about features that are 
deprecated in C++17,
as libcxx tests those features and uses them elsewhere.

Modified:
libcxx/trunk/test/support/msvc_stdlib_force_include.hpp

Modified: libcxx/trunk/test/support/msvc_stdlib_force_include.hpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/support/msvc_stdlib_force_include.hpp?rev=304765&r1=304764&r2=304765&view=diff
==
--- libcxx/trunk/test/support/msvc_stdlib_force_include.hpp (original)
+++ libcxx/trunk/test/support/msvc_stdlib_force_include.hpp Mon Jun  5 21:46:12 
2017
@@ -81,6 +81,9 @@ const AssertionDialogAvoider assertion_d
 
 // Silence warnings about raw pointers and other unchecked iterators.
 #define _SCL_SECURE_NO_WARNINGS
+
+// Silence warnings about features that are deprecated in C++17.
+#define _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS
 #endif // _LIBCXX_IN_DEVCRT
 
 #include 


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r305000 - [libcxx] [test] Update locale names for Windows.

2017-06-08 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Thu Jun  8 13:22:03 2017
New Revision: 305000

URL: http://llvm.org/viewvc/llvm-project?rev=305000&view=rev
Log:
[libcxx] [test] Update locale names for Windows.

locale.codecvt.byname/ctor_char.pass.cpp:
This test used to use "en_US" as a plain string instead of using 
platform_support.
Need to fix this because MS STL expects "en-US" instead.

platform_support.h:
These are the legacy Windows locale names. Should use IETF tags instead.
I've also added en_US, since a test was using that as a locale string as well.

msvc_stdlib_force_include.hpp:
Remove _MSVC_STL_VER. The libraries will directly define _MSVC_STL_VERSION in 
the future.

Fixes D29351.

Modified:

libcxx/trunk/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char.pass.cpp
libcxx/trunk/test/support/msvc_stdlib_force_include.hpp
libcxx/trunk/test/support/platform_support.h

Modified: 
libcxx/trunk/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char.pass.cpp?rev=305000&r1=304999&r2=305000&view=diff
==
--- 
libcxx/trunk/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char.pass.cpp
 Thu Jun  8 13:22:03 2017
@@ -17,6 +17,8 @@
 #include 
 #include 
 
+#include "platform_support.h"
+
 typedef std::codecvt_byname F;
 
 class my_facet
@@ -38,12 +40,12 @@ int my_facet::count = 0;
 int main()
 {
 {
-std::locale l(std::locale::classic(), new my_facet("en_US"));
+std::locale l(std::locale::classic(), new my_facet(LOCALE_en_US));
 assert(my_facet::count == 1);
 }
 assert(my_facet::count == 0);
 {
-my_facet f("en_US", 1);
+my_facet f(LOCALE_en_US, 1);
 assert(my_facet::count == 1);
 {
 std::locale l(std::locale::classic(), &f);
@@ -53,12 +55,12 @@ int main()
 }
 assert(my_facet::count == 0);
 {
-std::locale l(std::locale::classic(), new 
my_facet(std::string("en_US")));
+std::locale l(std::locale::classic(), new 
my_facet(std::string(LOCALE_en_US)));
 assert(my_facet::count == 1);
 }
 assert(my_facet::count == 0);
 {
-my_facet f(std::string("en_US"), 1);
+my_facet f(std::string(LOCALE_en_US), 1);
 assert(my_facet::count == 1);
 {
 std::locale l(std::locale::classic(), &f);

Modified: libcxx/trunk/test/support/msvc_stdlib_force_include.hpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/support/msvc_stdlib_force_include.hpp?rev=305000&r1=304999&r2=305000&view=diff
==
--- libcxx/trunk/test/support/msvc_stdlib_force_include.hpp (original)
+++ libcxx/trunk/test/support/msvc_stdlib_force_include.hpp Thu Jun  8 13:22:03 
2017
@@ -28,11 +28,6 @@
 #error This header may not be used when targeting libc++
 #endif
 
-// Indicates that we are using the MSVC standard library.
-#ifndef _MSVC_STL_VER
-#define _MSVC_STL_VER 42
-#endif
-
 #ifndef _LIBCXX_IN_DEVCRT
 struct AssertionDialogAvoider {
 AssertionDialogAvoider() {

Modified: libcxx/trunk/test/support/platform_support.h
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/support/platform_support.h?rev=305000&r1=304999&r2=305000&view=diff
==
--- libcxx/trunk/test/support/platform_support.h (original)
+++ libcxx/trunk/test/support/platform_support.h Thu Jun  8 13:22:03 2017
@@ -19,16 +19,18 @@
 #ifdef _WIN32
 // WARNING: Windows does not support UTF-8 codepages.
 // Locales are "converted" using http://docs.moodle.org/dev/Table_of_locales
-#define LOCALE_en_US_UTF_8 "English_United States.1252"
-#define LOCALE_cs_CZ_ISO8859_2 "Czech_Czech Republic.1250"
-#define LOCALE_fr_FR_UTF_8 "French_France.1252"
-#define LOCALE_fr_CA_ISO8859_1 "French_Canada.1252"
-#define LOCALE_ru_RU_UTF_8 "Russian_Russia.1251"
-#define LOCALE_zh_CN_UTF_8 "Chinese_China.936"
+#define LOCALE_en_US   "en-US"
+#define LOCALE_en_US_UTF_8 "en-US"
+#define LOCALE_cs_CZ_ISO8859_2 "cs-CZ"
+#define LOCALE_fr_FR_UTF_8 "fr-FR"
+#define LOCALE_fr_CA_ISO8859_1 "fr-CA"
+#define LOCALE_ru_RU_UTF_8 "ru-RU"
+#define LOCALE_zh_CN_UTF_8 "zh-CN"
 #elif defined(__CloudABI__)
 // Timezones are integrated into locales through LC_TIMEZONE_MASK on
 // CloudABI. LC_ALL_MASK can only be used if a timezone has also been
 // provided. UTC should be all right.
+#define LOCALE_en_US   "en_US"
 #define LOCALE_en_US_UTF_8 "en_US.UTF-8@UTC"
 #define LOCALE_fr_FR_UTF_8 "fr_FR.UTF-8@UTC"
 #d

[libcxx] r304999 - [libcxx] [test] Remove a Clang/C2 workaround.

2017-06-08 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Thu Jun  8 13:21:59 2017
New Revision: 304999

URL: http://llvm.org/viewvc/llvm-project?rev=304999&view=rev
Log:
[libcxx] [test] Remove a Clang/C2 workaround.

Clang/LLVM doesn't need this workaround.

Fixes D33955.

Modified:

libcxx/trunk/test/std/utilities/optional/optional.object/optional.object.mod/reset.pass.cpp

Modified: 
libcxx/trunk/test/std/utilities/optional/optional.object/optional.object.mod/reset.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/optional/optional.object/optional.object.mod/reset.pass.cpp?rev=304999&r1=304998&r2=304999&view=diff
==
--- 
libcxx/trunk/test/std/utilities/optional/optional.object/optional.object.mod/reset.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/utilities/optional/optional.object/optional.object.mod/reset.pass.cpp
 Thu Jun  8 13:21:59 2017
@@ -48,7 +48,6 @@ int main()
 assert(X::dtor_called == false);
 assert(static_cast(opt) == false);
 }
-assert(X::dtor_called == false); // TRANSITION, Clang/C2 VSO#239997
 {
 optional opt(X{});
 X::dtor_called = false;
@@ -57,5 +56,4 @@ int main()
 assert(static_cast(opt) == false);
 X::dtor_called = false;
 }
-assert(X::dtor_called == false); // TRANSITION, Clang/C2 VSO#239997
 }


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r305843 - [libcxx] [test] Add more tests to tuple_size_structured_bindings.pass.cpp and make it friendlier to C1XX.

2017-06-20 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Tue Jun 20 15:34:50 2017
New Revision: 305843

URL: http://llvm.org/viewvc/llvm-project?rev=305843&view=rev
Log:
[libcxx] [test] Add more tests to tuple_size_structured_bindings.pass.cpp and 
make it friendlier to C1XX.

Style/paranoia: 42.1 doesn't have an exact binary representation. Although this 
doesn't
cause failures, it makes me uncomfortable, so I'm changing it to 42.5.

C1XX rightly warns about unreferenced variables. Adding tests for their values
makes C1XX happy and improves test coverage.

C1XX (somewhat obnoxiously) warns about seeing a struct specialized as a class.
Although the Standard doesn't care, saying struct consistently is better.
(The Standard itself is still inconsistent about whether to depict tuple_element
and tuple_size as structs or classes.)

Fixes D33953.

Modified:

libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp

Modified: 
libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp?rev=305843&r1=305842&r2=305843&view=diff
==
--- 
libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp
 Tue Jun 20 15:34:50 2017
@@ -64,18 +64,22 @@ void test_decomp_tuple() {
 void test_decomp_pair() {
   typedef std::pair T;
   {
-T s{99, 42.1};
+T s{99, 42.5};
 auto [m1, m2] = s;
 auto& [r1, r2] = s;
 assert(m1 == 99);
+assert(m2 == 42.5);
 assert(&r1 == &std::get<0>(s));
+assert(&r2 == &std::get<1>(s));
   }
   {
-T const s{99, 42.1};
+T const s{99, 42.5};
 auto [m1, m2] = s;
 auto& [r1, r2] = s;
 assert(m1 == 99);
+assert(m2 == 42.5);
 assert(&r1 == &std::get<0>(s));
+assert(&r2 == &std::get<1>(s));
   }
 }
 
@@ -86,14 +90,22 @@ void test_decomp_array() {
 auto [m1, m2, m3] = s;
 auto& [r1, r2, r3] = s;
 assert(m1 == 99);
+assert(m2 == 42);
+assert(m3 == -1);
 assert(&r1 == &std::get<0>(s));
+assert(&r2 == &std::get<1>(s));
+assert(&r3 == &std::get<2>(s));
   }
   {
 T const s{{99, 42, -1}};
 auto [m1, m2, m3] = s;
 auto& [r1, r2, r3] = s;
 assert(m1 == 99);
+assert(m2 == 42);
+assert(m3 == -1);
 assert(&r1 == &std::get<0>(s));
+assert(&r2 == &std::get<1>(s));
+assert(&r3 == &std::get<2>(s));
   }
 }
 
@@ -105,8 +117,7 @@ template 
 int get(Test const&) { static_assert(N == 0, ""); return -1; }
 
 template <>
-class std::tuple_element<0, Test> {
-public:
+struct std::tuple_element<0, Test> {
   typedef int type;
 };
 
@@ -117,8 +128,7 @@ void test_before_tuple_size_specializati
 }
 
 template <>
-class std::tuple_size {
-public:
+struct std::tuple_size {
   static const size_t value = 1;
 };
 


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r305848 - [libcxx] [test] Strip trailing whitespace. NFC.

2017-06-20 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Tue Jun 20 16:00:02 2017
New Revision: 305848

URL: http://llvm.org/viewvc/llvm-project?rev=305848&view=rev
Log:
[libcxx] [test] Strip trailing whitespace. NFC.

Modified:

libcxx/trunk/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each_n.pass.cpp

libcxx/trunk/test/std/iterators/iterator.primitives/iterator.operations/advance.pass.cpp

libcxx/trunk/test/std/iterators/iterator.primitives/iterator.operations/prev.pass.cpp

libcxx/trunk/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp

libcxx/trunk/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan_init_op.pass.cpp
libcxx/trunk/test/std/numerics/numeric.ops/reduce/reduce_init_op.pass.cpp

libcxx/trunk/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp

libcxx/trunk/test/std/numerics/numeric.ops/transform.reduce/transform_reduce_iter_iter_init_bop_uop.pass.cpp

libcxx/trunk/test/std/numerics/numeric.ops/transform.reduce/transform_reduce_iter_iter_iter_init.pass.cpp

libcxx/trunk/test/std/numerics/numeric.ops/transform.reduce/transform_reduce_iter_iter_iter_init_op_op.pass.cpp

libcxx/trunk/test/std/utilities/allocator.adaptor/allocator.adaptor.cnstr/allocs.pass.cpp

libcxx/trunk/test/std/utilities/optional/optional.object/optional.object.ctor/move.pass.cpp
libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/dtor.pass.cpp
libcxx/trunk/test/std/utilities/utility/pairs/pairs.pair/dtor.pass.cpp

Modified: 
libcxx/trunk/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each_n.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each_n.pass.cpp?rev=305848&r1=305847&r2=305848&view=diff
==
--- 
libcxx/trunk/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each_n.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/algorithms/alg.nonmodifying/alg.foreach/for_each_n.pass.cpp
 Tue Jun 20 16:00:02 2017
@@ -36,15 +36,15 @@ int main()
 auto f = for_each_test(0);
 Iter it = std::for_each_n(Iter(ia), 0, std::ref(f));
 assert(it == Iter(ia));
-assert(f.count == 0);
+assert(f.count == 0);
 }
 
 {
 auto f = for_each_test(0);
 Iter it = std::for_each_n(Iter(ia), s, std::ref(f));
-
+
 assert(it == Iter(ia+s));
-assert(f.count == s);
+assert(f.count == s);
 for (unsigned i = 0; i < s; ++i)
 assert(ia[i] == static_cast(i+1));
 }
@@ -52,9 +52,9 @@ int main()
 {
 auto f = for_each_test(0);
 Iter it = std::for_each_n(Iter(ia), 1, std::ref(f));
-
+
 assert(it == Iter(ia+1));
-assert(f.count == 1);
+assert(f.count == 1);
 for (unsigned i = 0; i < 1; ++i)
 assert(ia[i] == static_cast(i+2));
 }

Modified: 
libcxx/trunk/test/std/iterators/iterator.primitives/iterator.operations/advance.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/iterators/iterator.primitives/iterator.operations/advance.pass.cpp?rev=305848&r1=305847&r2=305848&view=diff
==
--- 
libcxx/trunk/test/std/iterators/iterator.primitives/iterator.operations/advance.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/iterators/iterator.primitives/iterator.operations/advance.pass.cpp
 Tue Jun 20 16:00:02 2017
@@ -35,7 +35,7 @@ test(It i, typename std::iterator_traits
 
 #if TEST_STD_VER > 14
 template 
-constexpr bool 
+constexpr bool
 constepxr_test(It i, typename std::iterator_traits::difference_type n, It 
x)
 {
 std::advance(i, n);

Modified: 
libcxx/trunk/test/std/iterators/iterator.primitives/iterator.operations/prev.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/iterators/iterator.primitives/iterator.operations/prev.pass.cpp?rev=305848&r1=305847&r2=305848&view=diff
==
--- 
libcxx/trunk/test/std/iterators/iterator.primitives/iterator.operations/prev.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/iterators/iterator.primitives/iterator.operations/prev.pass.cpp
 Tue Jun 20 16:00:02 2017
@@ -71,5 +71,5 @@ int main()
 static_assert( constexpr_test(s+1, s), "" );
 }
 #endif
-
+
 }

Modified: 
libcxx/trunk/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp?rev=305848&r1=305847&r2=305848&view=diff
==
--- 
libcxx/trunk/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/numerics/numeric.ops/exclusive.scan/exclusive_scan.pass.cpp
 Tue Jun 20 16:00:02 2017
@@ -13,7 +13,7 @@
 // template
 // OutputIterator exclusive_sca

[libcxx] r305854 - [libcxx] [test] Fix -Wmismatched-tags in tuple_size_structured_bindings.pass.cpp.

2017-06-20 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Tue Jun 20 16:10:53 2017
New Revision: 305854

URL: http://llvm.org/viewvc/llvm-project?rev=305854&view=rev
Log:
[libcxx] [test] Fix -Wmismatched-tags in 
tuple_size_structured_bindings.pass.cpp.

Clang and C1XX both complain about mismatched class/struct, but libc++ and 
MSVC's STL
differ on what they use for tuple_element/tuple_size, so there's no way to win 
here.

I'm reverting this part of my previous change. In the future, I'll have to 
suppress
the warning for one compiler or the other.

Modified:

libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp

Modified: 
libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp?rev=305854&r1=305853&r2=305854&view=diff
==
--- 
libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp
 Tue Jun 20 16:10:53 2017
@@ -117,7 +117,8 @@ template 
 int get(Test const&) { static_assert(N == 0, ""); return -1; }
 
 template <>
-struct std::tuple_element<0, Test> {
+class std::tuple_element<0, Test> {
+public:
   typedef int type;
 };
 
@@ -128,7 +129,8 @@ void test_before_tuple_size_specializati
 }
 
 template <>
-struct std::tuple_size {
+class std::tuple_size {
+public:
   static const size_t value = 1;
 };
 


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r322144 - [libcxx] [test] Improve MSVC portability.

2018-01-09 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Tue Jan  9 16:39:46 2018
New Revision: 322144

URL: http://llvm.org/viewvc/llvm-project?rev=322144&view=rev
Log:
[libcxx] [test] Improve MSVC portability.

test/support/msvc_stdlib_force_include.hpp
When testing MSVC's STL with C1XX, simulate a couple more compiler feature-test 
macros.

When testing MSVC's STL, simulate a few library feature-test macros.

test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp
The vector_size attribute is a non-Standard extension that's supported by Clang 
and GCC,
but not C1XX. Therefore, guard this with `__has_attribute(vector_size)`.

Additionally, while these tests pass when MSVC's STL is compiled with Clang,
I don't consider this to be a supported scenario for our library,
so also guard this with defined(_LIBCPP_VERSION).

test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp
N4713 23.14.10 [func.not_fn]/1 depicts only `call_wrapper(call_wrapper&&) = 
default;`
and `call_wrapper(const call_wrapper&) = default;`. According to
15.8.2 [class.copy.assign]/2 and /4, this makes call_wrapper non-assignable.
Therefore, guard the assignability tests as libc++ specific.

Add a (void) cast to tolerate not_fn() being marked as nodiscard.

Fixes D41213.

Modified:
libcxx/trunk/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp
libcxx/trunk/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp
libcxx/trunk/test/support/msvc_stdlib_force_include.hpp

Modified: 
libcxx/trunk/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp?rev=322144&r1=322143&r2=322144&view=diff
==
--- libcxx/trunk/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp 
(original)
+++ libcxx/trunk/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp 
Tue Jan  9 16:39:46 2018
@@ -89,6 +89,7 @@ int main()
 CHECK_ALWAYS_LOCK_FREE(float);
 CHECK_ALWAYS_LOCK_FREE(double);
 CHECK_ALWAYS_LOCK_FREE(long double);
+#if __has_attribute(vector_size) && defined(_LIBCPP_VERSION)
 CHECK_ALWAYS_LOCK_FREE(int __attribute__((vector_size(1 * sizeof(int);
 CHECK_ALWAYS_LOCK_FREE(int __attribute__((vector_size(2 * sizeof(int);
 CHECK_ALWAYS_LOCK_FREE(int __attribute__((vector_size(4 * sizeof(int);
@@ -104,6 +105,7 @@ int main()
 CHECK_ALWAYS_LOCK_FREE(double __attribute__((vector_size(4 * 
sizeof(double);
 CHECK_ALWAYS_LOCK_FREE(double __attribute__((vector_size(16 * 
sizeof(double);
 CHECK_ALWAYS_LOCK_FREE(double __attribute__((vector_size(32 * 
sizeof(double);
+#endif // __has_attribute(vector_size) && defined(_LIBCPP_VERSION)
 CHECK_ALWAYS_LOCK_FREE(struct Empty {});
 CHECK_ALWAYS_LOCK_FREE(struct OneInt { int i; });
 CHECK_ALWAYS_LOCK_FREE(struct IntArr2 { int i[2]; });

Modified: 
libcxx/trunk/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp?rev=322144&r1=322143&r2=322144&view=diff
==
--- 
libcxx/trunk/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp 
(original)
+++ 
libcxx/trunk/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp 
Tue Jan  9 16:39:46 2018
@@ -305,15 +305,17 @@ void constructor_tests()
 using RetT = decltype(std::not_fn(value));
 static_assert(std::is_move_constructible::value, "");
 static_assert(std::is_copy_constructible::value, "");
-static_assert(std::is_move_assignable::value, "");
-static_assert(std::is_copy_assignable::value, "");
+LIBCPP_STATIC_ASSERT(std::is_move_assignable::value, "");
+LIBCPP_STATIC_ASSERT(std::is_copy_assignable::value, "");
 auto ret = std::not_fn(value);
 assert(ret() == false);
 auto ret2 = std::not_fn(value2);
 assert(ret2() == true);
+#if defined(_LIBCPP_VERSION)
 ret = ret2;
 assert(ret() == true);
 assert(ret2() == true);
+#endif // _LIBCPP_VERSION
 }
 {
 using T = MoveAssignableWrapper;
@@ -322,14 +324,16 @@ void constructor_tests()
 using RetT = decltype(std::not_fn(std::move(value)));
 static_assert(std::is_move_constructible::value, "");
 static_assert(!std::is_copy_constructible::value, "");
-static_assert(std::is_move_assignable::value, "");
+LIBCPP_STATIC_ASSERT(std::is_move_assignable::value, "");
 static_assert(!std::is_copy_assignable::value, "");
 auto ret = std::not_fn(std::move(value));
 assert(ret() == false);
 auto ret2 = std::not_fn(std::move(value2));
 assert(ret2() == true);
+#if defined(_LIBCPP_VERSION)
 ret = std::move(ret2);
 assert(ret() == true);
+#endif /

[libcxx] r334676 - [libcxx] [test] Strip trailing whitespace. NFC.

2018-06-13 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Wed Jun 13 17:12:20 2018
New Revision: 334676

URL: http://llvm.org/viewvc/llvm-project?rev=334676&view=rev
Log:
[libcxx] [test] Strip trailing whitespace. NFC.

Modified:

libcxx/trunk/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.fail.cpp

libcxx/trunk/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.pass.cpp

libcxx/trunk/test/std/containers/container.adaptors/queue/queue.cons/deduct.fail.cpp

libcxx/trunk/test/std/containers/container.adaptors/queue/queue.cons/deduct.pass.cpp

libcxx/trunk/test/std/containers/container.adaptors/stack/stack.cons/deduct.fail.cpp

libcxx/trunk/test/std/containers/container.adaptors/stack/stack.cons/deduct.pass.cpp
libcxx/trunk/test/std/containers/sequences/deque/deque.cons/deduct.fail.cpp
libcxx/trunk/test/std/containers/sequences/deque/deque.cons/deduct.pass.cpp

libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.cons/deduct.fail.cpp

libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.cons/deduct.pass.cpp
libcxx/trunk/test/std/containers/sequences/list/list.cons/deduct.fail.cpp
libcxx/trunk/test/std/containers/sequences/list/list.cons/deduct.pass.cpp

libcxx/trunk/test/std/containers/sequences/vector/vector.cons/deduct.fail.cpp

libcxx/trunk/test/std/containers/sequences/vector/vector.cons/deduct.pass.cpp

libcxx/trunk/test/std/language.support/support.exception/uncaught/uncaught_exceptions.pass.cpp
libcxx/trunk/test/std/re/re.regex/re.regex.construct/deduct.fail.cpp
libcxx/trunk/test/std/re/re.regex/re.regex.construct/deduct.pass.cpp

libcxx/trunk/test/std/utilities/optional/optional.object/optional.object.ctor/deduct.fail.cpp

libcxx/trunk/test/std/utilities/optional/optional.object/optional.object.ctor/deduct.pass.cpp

Modified: 
libcxx/trunk/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.fail.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.fail.cpp?rev=334676&r1=334675&r2=334676&view=diff
==
--- 
libcxx/trunk/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.fail.cpp
 (original)
+++ 
libcxx/trunk/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.fail.cpp
 Wed Jun 13 17:12:20 2018
@@ -19,7 +19,7 @@
 
 
 int main()
-{  
+{
 //  Test the explicit deduction guides
 {
 //  queue(Compare, Container, const Alloc);
@@ -35,7 +35,7 @@ int main()
 }
 
 {
-//  priority_queue(Iter, Iter, Comp)  
+//  priority_queue(Iter, Iter, Comp)
 //  int is not an iterator
 std::priority_queue pri(15, 17, std::greater());  // 
expected-error {{no viable constructor or deduction guide for deduction of 
template arguments of 'priority_queue'}}
 }

Modified: 
libcxx/trunk/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.pass.cpp?rev=334676&r1=334675&r2=334676&view=diff
==
--- 
libcxx/trunk/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.pass.cpp
 Wed Jun 13 17:12:20 2018
@@ -14,17 +14,17 @@
 // template
 // priority_queue(Compare, Container)
 // -> priority_queue;
-// 
+//
 // template::value_type>,
 //  class Container = vector::value_type>>
 // priority_queue(InputIterator, InputIterator, Compare = Compare(), Container 
= Container())
 // -> priority_queue::value_type, 
Container, Compare>;
-// 
+//
 // template
 // priority_queue(Compare, Container, Allocator)
 // -> priority_queue;
-
+
 
 #include 
 #include 
@@ -41,7 +41,7 @@ struct A {};
 
 int main()
 {
-  
+
 //  Test the explicit deduction guides
 {
 std::vector v{0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
@@ -56,7 +56,7 @@ int main()
 std::vector> v{10, 11, 12, 13, 14, 15, 16, 17, 
18, 19 };
 std::priority_queue pri(std::greater(), v, test_allocator(2)); 
// priority_queue(Compare, Container, Allocator)
 
-static_assert(std::is_same_v>, std::greater>>, "");
 assert(pri.size() == v.size());
 assert(pri.top() == 10);

Modified: 
libcxx/trunk/test/std/containers/container.adaptors/queue/queue.cons/deduct.fail.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/container.adaptors/queue/queue.cons/deduct.fail.cpp?rev=334676&r1=334675&r2=334676&view=diff
==
--- 
libcxx/trunk/test/std/containers/container.adaptors/queue/queue.cons/deduct.fail.cpp
 (original)
+++ 
libcxx/trunk/test/std/cont

[libcxx] r334675 - [libcxx] [test] Update msvc_stdlib_force_include.hpp.

2018-06-13 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Wed Jun 13 17:12:14 2018
New Revision: 334675

URL: http://llvm.org/viewvc/llvm-project?rev=334675&view=rev
Log:
[libcxx] [test] Update msvc_stdlib_force_include.hpp.

MSVC's STL removed _SCL_SECURE_NO_WARNINGS.

MSVC's STL implemented feature-test macros.

Modified:
libcxx/trunk/test/support/msvc_stdlib_force_include.hpp

Modified: libcxx/trunk/test/support/msvc_stdlib_force_include.hpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/support/msvc_stdlib_force_include.hpp?rev=334675&r1=334674&r2=334675&view=diff
==
--- libcxx/trunk/test/support/msvc_stdlib_force_include.hpp (original)
+++ libcxx/trunk/test/support/msvc_stdlib_force_include.hpp Wed Jun 13 17:12:14 
2018
@@ -73,9 +73,6 @@ const AssertionDialogAvoider assertion_d
 // atomic_is_lock_free.pass.cpp needs this VS 2015 Update 2 fix.
 #define _ENABLE_ATOMIC_ALIGNMENT_FIX
 
-// Silence warnings about raw pointers and other unchecked iterators.
-#define _SCL_SECURE_NO_WARNINGS
-
 // Silence warnings about features that are deprecated in C++17.
 #define _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS
 #endif // _LIBCXX_IN_DEVCRT
@@ -88,12 +85,4 @@ const AssertionDialogAvoider assertion_d
 #define TEST_STD_VER 14
 #endif // _HAS_CXX17
 
-// Simulate library feature-test macros.
-#define __cpp_lib_invoke 201411
-#define __cpp_lib_void_t 201411
-
-#if _HAS_CXX17
-#define __cpp_lib_atomic_is_always_lock_free 201603
-#endif // _HAS_CXX17
-
 #endif // SUPPORT_MSVC_STDLIB_FORCE_INCLUDE_HPP


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r312258 - [libcxx] [www] Change http://cplusplus.github.io/LWG/lwg-defects.html# to https://wg21.link/lwg .

2017-08-31 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Thu Aug 31 10:59:36 2017
New Revision: 312258

URL: http://llvm.org/viewvc/llvm-project?rev=312258&view=rev
Log:
[libcxx] [www] Change http://cplusplus.github.io/LWG/lwg-defects.html# to 
https://wg21.link/lwg .

Fixes D37318.

Modified:
libcxx/trunk/www/cxx1y_status.html

Modified: libcxx/trunk/www/cxx1y_status.html
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/www/cxx1y_status.html?rev=312258&r1=312257&r2=312258&view=diff
==
--- libcxx/trunk/www/cxx1y_status.html (original)
+++ libcxx/trunk/www/cxx1y_status.html Thu Aug 31 10:59:36 2017
@@ -109,165 +109,165 @@
 
   
Issue #Issue 
NameMeetingStatus
-   http://cplusplus.github.io/LWG/lwg-defects.html#1214";>1214Insufficient/inconsistent
 key immutability requirements for associative 
containersKonaComplete
-   http://cplusplus.github.io/LWG/lwg-defects.html#2009";>2009Reporting
 out-of-bound values on numeric string 
conversionsKonaComplete
-   http://cplusplus.github.io/LWG/lwg-defects.html#2010";>2010is_*
 traits for binding operations can't be meaningfully 
specializedKonaComplete
-   http://cplusplus.github.io/LWG/lwg-defects.html#2015";>2015Incorrect
 pre-conditions for some type traitsKonaComplete
-   http://cplusplus.github.io/LWG/lwg-defects.html#2021";>2021Further
 incorrect usages of result_ofKonaComplete
-   http://cplusplus.github.io/LWG/lwg-defects.html#2028";>2028messages_base::catalog
 overspecifiedKonaComplete
-   http://cplusplus.github.io/LWG/lwg-defects.html#2033";>2033Preconditions
 of reserve, shrink_to_fit, and resize 
functionsKonaComplete
-   http://cplusplus.github.io/LWG/lwg-defects.html#2039";>2039Issues
 with std::reverse and std::copy_ifKonaComplete
-   http://cplusplus.github.io/LWG/lwg-defects.html#2044";>2044No 
definition of "Stable" for copy 
algorithmsKonaComplete
-   http://cplusplus.github.io/LWG/lwg-defects.html#2045";>2045forward_list::merge
 and forward_list::splice_after with unequal 
allocatorsKonaComplete
-   http://cplusplus.github.io/LWG/lwg-defects.html#2047";>2047Incorrect
 "mixed" move-assignment semantics of 
unique_ptrKonaComplete
-   http://cplusplus.github.io/LWG/lwg-defects.html#2050";>2050Unordered
 associative containers do not use allocator_traits to define member 
typesKonaComplete
-   http://cplusplus.github.io/LWG/lwg-defects.html#2053";>2053Errors
 in regex bitmask typesKonaComplete
-   http://cplusplus.github.io/LWG/lwg-defects.html#2061";>2061make_move_iterator
 and arraysKonaComplete
-   http://cplusplus.github.io/LWG/lwg-defects.html#2064";>2064More
 noexcept issues in basic_stringKonaComplete
-   http://cplusplus.github.io/LWG/lwg-defects.html#2065";>2065Minimal
 allocator interfaceKonaComplete
-   http://cplusplus.github.io/LWG/lwg-defects.html#2067";>2067packaged_task
 should have deleted copy c'tor with const 
parameterKonaComplete
-   http://cplusplus.github.io/LWG/lwg-defects.html#2069";>2069Inconsistent
 exception spec for basic_string move 
constructorKonaComplete
-   http://cplusplus.github.io/LWG/lwg-defects.html#2096";>2096Incorrect
 constraints of future::get in regard to 
MoveAssignableKonaComplete
-   http://cplusplus.github.io/LWG/lwg-defects.html#2102";>2102Why
 is std::launch an implementation-defined 
type?KonaComplete
+   https://wg21.link/lwg1214";>1214Insufficient/inconsistent key 
immutability requirements for associative 
containersKonaComplete
+   https://wg21.link/lwg2009";>2009Reporting 
out-of-bound values on numeric string 
conversionsKonaComplete
+   https://wg21.link/lwg2010";>2010is_* 
traits for binding operations can't be meaningfully 
specializedKonaComplete
+   https://wg21.link/lwg2015";>2015Incorrect 
pre-conditions for some type traitsKonaComplete
+   https://wg21.link/lwg2021";>2021Further 
incorrect usages of result_ofKonaComplete
+   https://wg21.link/lwg2028";>2028messages_base::catalog 
overspecifiedKonaComplete
+   https://wg21.link/lwg2033";>2033Preconditions of reserve, 
shrink_to_fit, and resize functionsKonaComplete
+   https://wg21.link/lwg2039";>2039Issues 
with std::reverse and std::copy_ifKonaComplete
+   https://wg21.link/lwg2044";>2044No 
definition of "Stable" for copy 
algorithmsKonaComplete
+   https://wg21.link/lwg2045";>2045forward_list::merge and 
forward_list::splice_after with unequal 
allocatorsKonaComplete
+   https://wg21.link/lwg2047";>2047Incorrect 
"mixed" move-assignment semantics of 
unique_ptrKonaComplete
+   https://wg21.link/lwg2050";>2050Unordered 
associative containers do not use allocator_traits to define member 
typesKonaComplete
+   https://wg21.link/lwg2053";>2053Errors in 
regex bitmask typesKonaComplete
+   https://wg21.link/lwg2061";>2061make_move_iterator and 
arraysKonaComplete
+   https://wg21.link/lwg2064";>2064More 
noexcept issues in basic_stringKonaC

[libcxx] r312260 - [libcxx] [www] Manually change http links to https.

2017-08-31 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Thu Aug 31 10:59:42 2017
New Revision: 312260

URL: http://llvm.org/viewvc/llvm-project?rev=312260&view=rev
Log:
[libcxx] [www] Manually change http links to https.

Fixes D37318.

Modified:
libcxx/trunk/www/atomic_design.html
libcxx/trunk/www/atomic_design_a.html
libcxx/trunk/www/atomic_design_b.html
libcxx/trunk/www/atomic_design_c.html
libcxx/trunk/www/cxx1y_status.html
libcxx/trunk/www/cxx1z_status.html
libcxx/trunk/www/cxx2a_status.html
libcxx/trunk/www/index.html
libcxx/trunk/www/ts1z_status.html
libcxx/trunk/www/type_traits_design.html
libcxx/trunk/www/upcoming_meeting.html

Modified: libcxx/trunk/www/atomic_design.html
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/www/atomic_design.html?rev=312260&r1=312259&r2=312260&view=diff
==
--- libcxx/trunk/www/atomic_design.html (original)
+++ libcxx/trunk/www/atomic_design.html Thu Aug 31 10:59:42 2017
@@ -12,7 +12,7 @@
 
 
   
-http://llvm.org/";>LLVM Home
+https://llvm.org/";>LLVM Home
   
 
   
@@ -22,11 +22,11 @@
 
   
 Quick Links
-http://lists.llvm.org/mailman/listinfo/cfe-dev";>cfe-dev
-http://lists.llvm.org/mailman/listinfo/cfe-commits";>cfe-commits
+https://lists.llvm.org/mailman/listinfo/cfe-dev";>cfe-dev
+https://lists.llvm.org/mailman/listinfo/cfe-commits";>cfe-commits
 https://bugs.llvm.org/";>Bug Reports
-http://llvm.org/svn/llvm-project/libcxx/trunk/";>Browse SVN
-http://llvm.org/viewvc/llvm-project/libcxx/trunk/";>Browse 
ViewVC
+https://llvm.org/svn/llvm-project/libcxx/trunk/";>Browse SVN
+https://llvm.org/viewvc/llvm-project/libcxx/trunk/";>Browse 
ViewVC
   
 
 

Modified: libcxx/trunk/www/atomic_design_a.html
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/www/atomic_design_a.html?rev=312260&r1=312259&r2=312260&view=diff
==
--- libcxx/trunk/www/atomic_design_a.html (original)
+++ libcxx/trunk/www/atomic_design_a.html Thu Aug 31 10:59:42 2017
@@ -12,7 +12,7 @@
 
 
   
-http://llvm.org/";>LLVM Home
+https://llvm.org/";>LLVM Home
   
 
   
@@ -22,11 +22,11 @@
 
   
 Quick Links
-http://lists.llvm.org/mailman/listinfo/cfe-dev";>cfe-dev
-http://lists.llvm.org/mailman/listinfo/cfe-commits";>cfe-commits
+https://lists.llvm.org/mailman/listinfo/cfe-dev";>cfe-dev
+https://lists.llvm.org/mailman/listinfo/cfe-commits";>cfe-commits
 https://bugs.llvm.org/";>Bug Reports
-http://llvm.org/svn/llvm-project/libcxx/trunk/";>Browse SVN
-http://llvm.org/viewvc/llvm-project/libcxx/trunk/";>Browse 
ViewVC
+https://llvm.org/svn/llvm-project/libcxx/trunk/";>Browse SVN
+https://llvm.org/viewvc/llvm-project/libcxx/trunk/";>Browse 
ViewVC
   
 
 

Modified: libcxx/trunk/www/atomic_design_b.html
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/www/atomic_design_b.html?rev=312260&r1=312259&r2=312260&view=diff
==
--- libcxx/trunk/www/atomic_design_b.html (original)
+++ libcxx/trunk/www/atomic_design_b.html Thu Aug 31 10:59:42 2017
@@ -12,7 +12,7 @@
 
 
   
-http://llvm.org/";>LLVM Home
+https://llvm.org/";>LLVM Home
   
 
   
@@ -22,11 +22,11 @@
 
   
 Quick Links
-http://lists.llvm.org/mailman/listinfo/cfe-dev";>cfe-dev
-http://lists.llvm.org/mailman/listinfo/cfe-commits";>cfe-commits
+https://lists.llvm.org/mailman/listinfo/cfe-dev";>cfe-dev
+https://lists.llvm.org/mailman/listinfo/cfe-commits";>cfe-commits
 https://bugs.llvm.org/";>Bug Reports
-http://llvm.org/svn/llvm-project/libcxx/trunk/";>Browse SVN
-http://llvm.org/viewvc/llvm-project/libcxx/trunk/";>Browse 
ViewVC
+https://llvm.org/svn/llvm-project/libcxx/trunk/";>Browse SVN
+https://llvm.org/viewvc/llvm-project/libcxx/trunk/";>Browse 
ViewVC
   
 
 

Modified: libcxx/trunk/www/atomic_design_c.html
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/www/atomic_design_c.html?rev=312260&r1=312259&r2=312260&view=diff
==
--- libcxx/trunk/www/atomic_design_c.html (original)
+++ libcxx/trunk/www/atomic_design_c.html Thu Aug 31 10:59:42 2017
@@ -12,7 +12,7 @@
 
 
   
-http://llvm.org/";>LLVM Home
+https://llvm.org/";>LLVM Home
   
 
   
@@ -22,11 +22,11 @@
 
   
 Quick Links
-http://lists.llvm.org/mailman/listinfo/cfe-dev";>cfe-dev
-http://lists.llvm.org/mailman/listinfo/cfe-commits";>cfe-commits
+https://lists.llvm.org/mailman/listinfo/cfe-dev";>cfe-dev
+https://lists.llvm.org/mailman/listinfo/cfe-commits";>cfe-commits
 https://bugs.llvm.org/";>Bug Reports
-http://llvm.org/svn/llvm-project/libcxx/trunk/";>Browse SVN
-http://llvm.org/viewvc/llvm-project/libcxx/trunk/";>Browse 
ViewVC
+https://llvm.org/svn/llvm-project/libcxx/trunk/";>Browse S

[libcxx] r312261 - [libcxx] [www] Fix broken link for LLVM Bugzilla.

2017-08-31 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Thu Aug 31 10:59:46 2017
New Revision: 312261

URL: http://llvm.org/viewvc/llvm-project?rev=312261&view=rev
Log:
[libcxx] [www] Fix broken link for LLVM Bugzilla.

Fixes D37318.

Modified:
libcxx/trunk/www/index.html

Modified: libcxx/trunk/www/index.html
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/www/index.html?rev=312261&r1=312260&r2=312261&view=diff
==
--- libcxx/trunk/www/index.html (original)
+++ libcxx/trunk/www/index.html Thu Aug 31 10:59:46 2017
@@ -203,7 +203,7 @@
 
   
   If you think you've found a bug in libc++, please report it using
-  the http://llvm.org/bugs";>LLVM Bugzilla. If you're not sure, you
+  the https://bugs.llvm.org/";>LLVM Bugzilla. If you're not sure, 
you
   can post a message to the https://lists.llvm.org/mailman/listinfo/cfe-dev";>cfe-dev 
   mailing list or on IRC. Please include "libc++" in your subject.
   


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r312259 - [libcxx] [www] Semi-manually change http://www.open-std.org and http://isocpp.org papers to https://wg21.link .

2017-08-31 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Thu Aug 31 10:59:39 2017
New Revision: 312259

URL: http://llvm.org/viewvc/llvm-project?rev=312259&view=rev
Log:
[libcxx] [www] Semi-manually change http://www.open-std.org and 
http://isocpp.org papers to https://wg21.link .

Fixes D37318.

Modified:
libcxx/trunk/www/atomic_design_c.html
libcxx/trunk/www/cxx1y_status.html
libcxx/trunk/www/cxx1z_status.html
libcxx/trunk/www/cxx2a_status.html
libcxx/trunk/www/ts1z_status.html
libcxx/trunk/www/type_traits_design.html
libcxx/trunk/www/upcoming_meeting.html

Modified: libcxx/trunk/www/atomic_design_c.html
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/www/atomic_design_c.html?rev=312259&r1=312258&r2=312259&view=diff
==
--- libcxx/trunk/www/atomic_design_c.html (original)
+++ libcxx/trunk/www/atomic_design_c.html Thu Aug 31 10:59:39 2017
@@ -328,7 +328,7 @@ void __atomic_signal_fence_seq_cst()
 
 
 One should consult the (currently draft)
-http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3126.pdf";>C++ 
standard
+https://wg21.link/n3126";>C++ standard
 for the details of the definitions for these operations.  For example
 __atomic_compare_exchange_weak_seq_cst_seq_cst is allowed to fail
 spuriously while __atomic_compare_exchange_strong_seq_cst_seq_cst is
@@ -370,7 +370,7 @@ memory_order_relaxed
 
 
 (See the
-http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3126.pdf";>C++ 
standard
+https://wg21.link/n3126";>C++ standard
 for the detailed definitions of each of these orderings).
 
 

Modified: libcxx/trunk/www/cxx1y_status.html
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/www/cxx1y_status.html?rev=312259&r1=312258&r2=312259&view=diff
==
--- libcxx/trunk/www/cxx1y_status.html (original)
+++ libcxx/trunk/www/cxx1y_status.html Thu Aug 31 10:59:39 2017
@@ -51,17 +51,17 @@
   
Paper #GroupPaper 
NameMeetingStatusFirst released version
 
-   http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3346.pdf";>3346LWGTerminology
 for Container Element Requirements - Rev 
1KonaComplete3.4
+   https://wg21.link/n3346";>3346LWGTerminology for 
Container Element Requirements - Rev 
1KonaComplete3.4

 
 

-   http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3421.htm";>3421LWGMaking
 Operator Functors 
greater<>PortlandComplete3.4
-   http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3462.html";>3462LWGstd::result_of
 and SFINAEPortlandComplete3.4
-   http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3469.html";>3469LWGConstexpr
 Library Additions: chrono, 
v3PortlandComplete3.4
-   http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3470.html";>3470LWGConstexpr
 Library Additions: containers, 
v2PortlandComplete3.4
-   http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3471.html";>3471LWGConstexpr
 Library Additions: utilities, 
v3PortlandComplete3.4
-   http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3302.html";>3302LWGConstexpr
 Library Additions: complex, 
v2PortlandComplete3.4
+   https://wg21.link/n3421";>3421LWGMaking Operator 
Functors greater<>PortlandComplete3.4
+   https://wg21.link/n3462";>3462LWGstd::result_of and 
SFINAEPortlandComplete3.4
+   https://wg21.link/n3469";>3469LWGConstexpr Library 
Additions: chrono, v3PortlandComplete3.4
+   https://wg21.link/n3470";>3470LWGConstexpr Library 
Additions: containers, 
v2PortlandComplete3.4
+   https://wg21.link/n3471";>3471LWGConstexpr Library 
Additions: utilities, v3PortlandComplete3.4
+   https://wg21.link/n3302";>3302LWGConstexpr Library 
Additions: complex, v2PortlandComplete3.4

 
 
@@ -76,31 +76,31 @@
 
 

-   http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3545.pdf";>3545LWGAn
 Incremental Improvement to 
integral_constantBristolComplete3.4
-   http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3644.pdf";>3644LWGNull
 Forward IteratorsBristolComplete3.4
-   http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3668.html";>3668LWGstd::exchange()BristolComplete3.4
-   http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3658.html";>3658LWGCompile-time
 integer sequencesBristolComplete3.4
-   http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3670.html";>3670LWGAddressing
 Tuples by TypeBristolComplete3.4
-   http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3671.html";>3671LWGMaking
 non-modifying sequence operations more 
robustBristolComplete3.4
-   http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3656.htm";>3656LWGmake_uniqueBristolComplete3.4
-   http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3654.html";>3654LWGQuoted
 StringsBristolComplete3.4
-   http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3642.pdf";>3642LWGUser-defined
 LiteralsBristo

[libcxx] r312262 - [libcxx] [www] Strip trailing whitespace.

2017-08-31 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Thu Aug 31 10:59:48 2017
New Revision: 312262

URL: http://llvm.org/viewvc/llvm-project?rev=312262&view=rev
Log:
[libcxx] [www] Strip trailing whitespace.

Fixes D37318.

Modified:
libcxx/trunk/www/atomic_design_c.html
libcxx/trunk/www/cxx1y_status.html
libcxx/trunk/www/index.html
libcxx/trunk/www/ts1z_status.html

Modified: libcxx/trunk/www/atomic_design_c.html
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/www/atomic_design_c.html?rev=312262&r1=312261&r2=312262&view=diff
==
--- libcxx/trunk/www/atomic_design_c.html (original)
+++ libcxx/trunk/www/atomic_design_c.html Thu Aug 31 10:59:48 2017
@@ -115,7 +115,7 @@ __has_feature(__atomic_flag) == 1
 __has_feature(__atomic_exchange_seq_cst_j) == 1
 __has_feature(__atomic_store_seq_cst_j) == 1
 
-typedef unsigned int __atomic_flag__; 
+typedef unsigned int __atomic_flag__;
 
 unsigned int __atomic_exchange_seq_cst(unsigned int volatile*, unsigned int)
 {

Modified: libcxx/trunk/www/cxx1y_status.html
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/www/cxx1y_status.html?rev=312262&r1=312261&r2=312262&view=diff
==
--- libcxx/trunk/www/cxx1y_status.html (original)
+++ libcxx/trunk/www/cxx1y_status.html Thu Aug 31 10:59:48 2017
@@ -46,7 +46,7 @@
 SG1 - Study group #1 (Concurrency working group)
   
   
-  
+
   Paper Status
   
Paper #GroupPaper 
NameMeetingStatusFirst released version
@@ -55,7 +55,7 @@

 
 
-   
+
https://wg21.link/n3421";>3421LWGMaking Operator 
Functors greater<>PortlandComplete3.4
https://wg21.link/n3462";>3462LWGstd::result_of and 
SFINAEPortlandComplete3.4
https://wg21.link/n3469";>3469LWGConstexpr Library 
Additions: chrono, v3PortlandComplete3.4
@@ -75,7 +75,7 @@
 
 
 
-   
+
https://wg21.link/n3545";>3545LWGAn Incremental 
Improvement to 
integral_constantBristolComplete3.4
https://wg21.link/n3644";>3644LWGNull Forward 
IteratorsBristolComplete3.4
https://wg21.link/n3668";>3668LWGstd::exchange()BristolComplete3.4
@@ -90,7 +90,7 @@
https://wg21.link/n3672";>3672LWGA proposal to add a 
utility class to represent optional objectsBristolRemoved 
from Draft Standardn/a
https://wg21.link/n3669";>3669LWGFixing constexpr 
member functions without 
constBristolComplete3.4
https://wg21.link/n3662";>3662LWGC++ Dynamic Arrays 
(dynarray)BristolRemoved from Draft 
Standardn/a
-   
+
https://wg21.link/n3659";>3659SG1Shared Locking in 
C++BristolComplete3.4
 


Modified: libcxx/trunk/www/index.html
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/www/index.html?rev=312262&r1=312261&r2=312262&view=diff
==
--- libcxx/trunk/www/index.html (original)
+++ libcxx/trunk/www/index.html Thu Aug 31 10:59:48 2017
@@ -204,7 +204,7 @@
   
   If you think you've found a bug in libc++, please report it using
   the https://bugs.llvm.org/";>LLVM Bugzilla. If you're not sure, 
you
-  can post a message to the https://lists.llvm.org/mailman/listinfo/cfe-dev";>cfe-dev 
+  can post a message to the https://lists.llvm.org/mailman/listinfo/cfe-dev";>cfe-dev
   mailing list or on IRC. Please include "libc++" in your subject.
   
 

Modified: libcxx/trunk/www/ts1z_status.html
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/www/ts1z_status.html?rev=312262&r1=312261&r2=312262&view=diff
==
--- libcxx/trunk/www/ts1z_status.html (original)
+++ libcxx/trunk/www/ts1z_status.html Thu Aug 31 10:59:48 2017
@@ -95,7 +95,7 @@
 
 
   
-  
+
   Features in Filesystem
   
Feature NameStatusFirst released 
version


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r312263 - [libcxx] [www] Change an absolute link to cxx1z_status.html to be relative.

2017-08-31 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Thu Aug 31 10:59:51 2017
New Revision: 312263

URL: http://llvm.org/viewvc/llvm-project?rev=312263&view=rev
Log:
[libcxx] [www] Change an absolute link to cxx1z_status.html to be relative.

Fixes D37318.

Modified:
libcxx/trunk/www/upcoming_meeting.html

Modified: libcxx/trunk/www/upcoming_meeting.html
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/www/upcoming_meeting.html?rev=312263&r1=312262&r2=312263&view=diff
==
--- libcxx/trunk/www/upcoming_meeting.html (original)
+++ libcxx/trunk/www/upcoming_meeting.html Thu Aug 31 10:59:51 2017
@@ -35,7 +35,7 @@
   libc++ Issaquah Status
   
 
-  This is a temporary page; please check the c++1z status https://libcxx.llvm.org/cxx1z_status.html";>here
+  This is a temporary page; please check the c++1z status here
   This page shows the status of the papers and issues that are expected to 
be adopted in Toronto.
 
   The groups that have contributed papers:


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


RE: [PATCH] D36860: [Driver] Recognize DevDiv internal builds of MSVC, with a different directory structure

2017-08-31 Thread Stephan T. Lavavej via cfe-commits
[STL]
> I can't check in copies of `cl.exe` and `link.exe` (the former's version is 
> inspected, so it can't just be a dummy file).
> I'm happy without upstream tests for this logic. In the long run, I hope that 
> we can eliminate this internal directory structure and make it identical to 
> the released directory structure.

[David Blaikie] 
> Version as in file metadata, or version as in "cl -v" printed output or the 
> like?
> If it's file metadata (such that Clang can discover it without having to run 
> the binary on a test machine) might be worth making a dummy file with just 
> the version metadata in it.
> But yeah *shrug* your call

Looks like it's just the metadata, so a dummy file would be possible (Don 
pointed out how the version metadata is created - I thought it was some 
complicated process, but it's not).

However, I'm not planning to write tests at the moment - I see that it is 
possible but there's a big leap from that to knowing how to actually write 
them, and I have to go back to working on C++17 features. If the logic for 
DevDiv-internal paths breaks, I'll deal with it then.

Thanks,
STL
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r329977 - [libcxx] [test] Use TEST_COMPILER_C1XX.

2018-04-12 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Thu Apr 12 16:56:17 2018
New Revision: 329977

URL: http://llvm.org/viewvc/llvm-project?rev=329977&view=rev
Log:
[libcxx] [test] Use TEST_COMPILER_C1XX.

Also TEST_COMPILER_CLANG in one place. (More could be changed.)

Modified:

libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.generate/generate_n.pass.cpp

libcxx/trunk/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.ops/assign_t.pass.cpp

libcxx/trunk/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_neg_one.pass.cpp
libcxx/trunk/test/std/numerics/rand/rand.eng/rand.eng.lcong/values.pass.cpp

Modified: 
libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.generate/generate_n.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.generate/generate_n.pass.cpp?rev=329977&r1=329976&r2=329977&view=diff
==
--- 
libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.generate/generate_n.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.generate/generate_n.pass.cpp
 Thu Apr 12 16:56:17 2018
@@ -15,14 +15,15 @@
 //   constexpr void  // constexpr after c++17
 //   generate_n(Iter first, Size n, Generator gen);
 
-#ifdef _MSC_VER
+#include "test_macros.h"
+
+#ifdef TEST_COMPILER_C1XX
 #pragma warning(disable: 4244) // conversion from 'const double' to 'int', 
possible loss of data
 #endif
 
 #include 
 #include 
 
-#include "test_macros.h"
 #include "test_iterators.h"
 #include "user_defined_integral.hpp"
 

Modified: 
libcxx/trunk/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.ops/assign_t.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.ops/assign_t.pass.cpp?rev=329977&r1=329976&r2=329977&view=diff
==
--- 
libcxx/trunk/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.ops/assign_t.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/iterators/stream.iterators/ostream.iterator/ostream.iterator.ops/assign_t.pass.cpp
 Thu Apr 12 16:56:17 2018
@@ -17,11 +17,13 @@
 #include 
 #include 
 
-#if defined(__clang__)
+#include "test_macros.h"
+
+#if defined(TEST_COMPILER_CLANG)
 #pragma clang diagnostic ignored "-Wliteral-conversion"
 #endif
 
-#ifdef _MSC_VER
+#ifdef TEST_COMPILER_C1XX
 #pragma warning(disable: 4244) // conversion from 'X' to 'Y', possible loss of 
data
 #endif
 

Modified: 
libcxx/trunk/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_neg_one.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_neg_one.pass.cpp?rev=329977&r1=329976&r2=329977&view=diff
==
--- 
libcxx/trunk/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_neg_one.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_neg_one.pass.cpp
 Thu Apr 12 16:56:17 2018
@@ -21,8 +21,9 @@
 #include 
 #include 
 #include "test_iterators.h"
+#include "test_macros.h"
 
-#ifdef _MSC_VER
+#ifdef TEST_COMPILER_C1XX
 #pragma warning(disable: 4146) // unary minus operator applied to unsigned 
type, result still unsigned
 #endif
 

Modified: 
libcxx/trunk/test/std/numerics/rand/rand.eng/rand.eng.lcong/values.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/rand/rand.eng/rand.eng.lcong/values.pass.cpp?rev=329977&r1=329976&r2=329977&view=diff
==
--- libcxx/trunk/test/std/numerics/rand/rand.eng/rand.eng.lcong/values.pass.cpp 
(original)
+++ libcxx/trunk/test/std/numerics/rand/rand.eng/rand.eng.lcong/values.pass.cpp 
Thu Apr 12 16:56:17 2018
@@ -45,10 +45,10 @@ test1()
 assert((LCE::min() == (c == 0u ? 1u: 0u)));
 #endif
 
-#ifdef _MSC_VER
+#ifdef TEST_COMPILER_C1XX
 #pragma warning(push)
 #pragma warning(disable: 4310) // cast truncates constant value
-#endif // _MSC_VER
+#endif // TEST_COMPILER_C1XX
 
 #if TEST_STD_VER >= 11
 static_assert((LCE::max() == result_type(m - 1u)), "");
@@ -56,9 +56,9 @@ test1()
 assert((LCE::max() == result_type(m - 1u)));
 #endif
 
-#ifdef _MSC_VER
+#ifdef TEST_COMPILER_C1XX
 #pragma warning(pop)
-#endif // _MSC_VER
+#endif // TEST_COMPILER_C1XX
 
 static_assert((LCE::default_seed == 1), "");
 where(LCE::multiplier);


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r329974 - [libcxx] [test] Avoid unary_function.

2018-04-12 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Thu Apr 12 16:56:10 2018
New Revision: 329974

URL: http://llvm.org/viewvc/llvm-project?rev=329974&view=rev
Log:
[libcxx] [test] Avoid unary_function.

Replace unary_function inheritance (which was never required,
even in C++98) with argument_type and result_type typedefs.
This increases portability, as unary_function was removed in C++17
and MSVC has implemented that removal.

Fixes D45596.

Modified:
libcxx/trunk/test/support/Counter.h

Modified: libcxx/trunk/test/support/Counter.h
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/support/Counter.h?rev=329974&r1=329973&r2=329974&view=diff
==
--- libcxx/trunk/test/support/Counter.h (original)
+++ libcxx/trunk/test/support/Counter.h Thu Apr 12 16:56:10 2018
@@ -45,8 +45,10 @@ namespace std {
 
 template 
 struct hash >
-: public std::unary_function, std::size_t>
 {
+typedef Counter argument_type;
+typedef std::size_t result_type;
+
 std::size_t operator()(const Counter& x) const {return 
std::hash(x.get());}
 };
 }


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r329973 - [libcxx] [test] Avoid MSVC truncation warnings.

2018-04-12 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Thu Apr 12 16:56:07 2018
New Revision: 329973

URL: http://llvm.org/viewvc/llvm-project?rev=329973&view=rev
Log:
[libcxx] [test] Avoid MSVC truncation warnings.

MSVC emits "warning C4244: 'initializing': conversion from 'int'
to 'short', possible loss of data" when it sees pair
constructed from (whatever, 4), because int is being truncated to
short within pair's constructor. (The compiler doesn't take into
account the fact that 4 is a literal at the callsite; it generates
this warning when the constructor is instantiated, because it might
be called with a runtime-valued int that would actually truncate.)

Instead of static_cast, we can simply change short to int
in these tests, without affecting the pair operations that they're
trying to test: move assignment, convert copy construction, and
convert move construction.

Fixes D45016.

Modified:

libcxx/trunk/test/std/utilities/utility/pairs/pairs.pair/assign_rv_pair.pass.cpp

libcxx/trunk/test/std/utilities/utility/pairs/pairs.pair/const_pair_U_V.pass.cpp

libcxx/trunk/test/std/utilities/utility/pairs/pairs.pair/rv_pair_U_V.pass.cpp

Modified: 
libcxx/trunk/test/std/utilities/utility/pairs/pairs.pair/assign_rv_pair.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/utility/pairs/pairs.pair/assign_rv_pair.pass.cpp?rev=329973&r1=329972&r2=329973&view=diff
==
--- 
libcxx/trunk/test/std/utilities/utility/pairs/pairs.pair/assign_rv_pair.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/utilities/utility/pairs/pairs.pair/assign_rv_pair.pass.cpp
 Thu Apr 12 16:56:07 2018
@@ -49,7 +49,7 @@ int CountAssign::moved = 0;
 int main()
 {
 {
-typedef std::pair, short> P;
+typedef std::pair, int> P;
 P p1(std::unique_ptr(new int(3)), 4);
 P p2;
 p2 = std::move(p1);

Modified: 
libcxx/trunk/test/std/utilities/utility/pairs/pairs.pair/const_pair_U_V.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/utility/pairs/pairs.pair/const_pair_U_V.pass.cpp?rev=329973&r1=329972&r2=329973&view=diff
==
--- 
libcxx/trunk/test/std/utilities/utility/pairs/pairs.pair/const_pair_U_V.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/utilities/utility/pairs/pairs.pair/const_pair_U_V.pass.cpp
 Thu Apr 12 16:56:07 2018
@@ -57,7 +57,7 @@ struct ImplicitT {
 int main()
 {
 {
-typedef std::pair P1;
+typedef std::pair P1;
 typedef std::pair P2;
 const P1 p1(3, 4);
 const P2 p2 = p1;
@@ -154,7 +154,7 @@ int main()
 }
 #if TEST_STD_VER > 11
 {
-typedef std::pair P1;
+typedef std::pair P1;
 typedef std::pair P2;
 constexpr P1 p1(3, 4);
 constexpr P2 p2 = p1;

Modified: 
libcxx/trunk/test/std/utilities/utility/pairs/pairs.pair/rv_pair_U_V.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/utility/pairs/pairs.pair/rv_pair_U_V.pass.cpp?rev=329973&r1=329972&r2=329973&view=diff
==
--- 
libcxx/trunk/test/std/utilities/utility/pairs/pairs.pair/rv_pair_U_V.pass.cpp 
(original)
+++ 
libcxx/trunk/test/std/utilities/utility/pairs/pairs.pair/rv_pair_U_V.pass.cpp 
Thu Apr 12 16:56:07 2018
@@ -67,7 +67,7 @@ struct ImplicitT {
 int main()
 {
 {
-typedef std::pair, short> P1;
+typedef std::pair, int> P1;
 typedef std::pair, long> P2;
 P1 p1(std::unique_ptr(), 4);
 P2 p2 = std::move(p1);


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r329978 - [libcxx] [test] Fix whitespace, NFC.

2018-04-12 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Thu Apr 12 16:56:22 2018
New Revision: 329978

URL: http://llvm.org/viewvc/llvm-project?rev=329978&view=rev
Log:
[libcxx] [test] Fix whitespace, NFC.

test/std almost always uses spaces; now it is entirely tab-free.

Modified:

libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.copy/copy.pass.cpp

libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.copy/copy_backward.pass.cpp

libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.copy/copy_if.pass.cpp

libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.copy/copy_n.pass.cpp

libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.unique/unique.pass.cpp

libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.unique/unique_pred.pass.cpp

libcxx/trunk/test/std/containers/container.adaptors/queue/queue.defn/emplace.pass.cpp
libcxx/trunk/test/std/containers/test_compare.h

libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_array_ptr.fail.cpp

libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.placement/new_ptr.fail.cpp

libcxx/trunk/test/std/language.support/support.dynamic/ptr.launder/launder.pass.cpp
libcxx/trunk/test/std/strings/string.view/types.pass.cpp
libcxx/trunk/test/std/thread/futures/futures.async/async.fail.cpp

libcxx/trunk/test/std/utilities/meta/meta.trans/meta.trans.other/remove_cvref.pass.cpp

Modified: 
libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.copy/copy.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.copy/copy.pass.cpp?rev=329978&r1=329977&r2=329978&view=diff
==
--- 
libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.copy/copy.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.copy/copy.pass.cpp
 Thu Apr 12 16:56:22 2018
@@ -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
 

Modified: 
libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.copy/copy_backward.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.copy/copy_backward.pass.cpp?rev=329978&r1=329977&r2=329978&view=diff
==
--- 
libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.copy/copy_backward.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.copy/copy_backward.pass.cpp
 Thu Apr 12 16:56:22 2018
@@ -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
 

Modified: 
libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.copy/copy_if.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.copy/copy_if.pass.cpp?rev=329978&r1=329977&r2=329978&view=diff
==
--- 
libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.copy/copy_if.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.copy/copy_if.pass.cpp
 Thu Apr 12 16:56:22 2018
@@ -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;})
+// ;
 /

[libcxx] r329976 - [libcxx] [test] Silence MSVC warning C4146.

2018-04-12 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Thu Apr 12 16:56:14 2018
New Revision: 329976

URL: http://llvm.org/viewvc/llvm-project?rev=329976&view=rev
Log:
[libcxx] [test] Silence MSVC warning C4146.

This test code triggers the MSVC warning:

"unary minus operator applied to unsigned type, result still unsigned"

Although it would be possible to change the test code to avoid
this warning, I have chosen to simply silence it.

Fixes D45594.

Modified:

libcxx/trunk/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_neg_one.pass.cpp

Modified: 
libcxx/trunk/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_neg_one.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_neg_one.pass.cpp?rev=329976&r1=329975&r2=329976&view=diff
==
--- 
libcxx/trunk/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_neg_one.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_neg_one.pass.cpp
 Thu Apr 12 16:56:14 2018
@@ -22,6 +22,10 @@
 #include 
 #include "test_iterators.h"
 
+#ifdef _MSC_VER
+#pragma warning(disable: 4146) // unary minus operator applied to unsigned 
type, result still unsigned
+#endif
+
 typedef std::num_get > F;
 
 class my_facet


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r329975 - [libcxx] [test] Fix nodiscard warnings.

2018-04-12 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Thu Apr 12 16:56:12 2018
New Revision: 329975

URL: http://llvm.org/viewvc/llvm-project?rev=329975&view=rev
Log:
[libcxx] [test] Fix nodiscard warnings.

MSVC's STL has marked to_bytes/from_bytes as nodiscard.

Fixes D45595.

Modified:

libcxx/trunk/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_err_string.pass.cpp

Modified: 
libcxx/trunk/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_err_string.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_err_string.pass.cpp?rev=329975&r1=329974&r2=329975&view=diff
==
--- 
libcxx/trunk/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_err_string.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_err_string.pass.cpp
 Thu Apr 12 16:56:12 2018
@@ -33,7 +33,7 @@ int main()
 Myconv myconv;
 try
 {
-myconv.to_bytes(L"\xDA83");
+(void)myconv.to_bytes(L"\xDA83");
 assert(false);
 }
 catch (const std::range_error&)
@@ -41,7 +41,7 @@ int main()
 }
 try
 {
-myconv.from_bytes('\xA5');
+(void)myconv.from_bytes('\xA5');
 assert(false);
 }
 catch (const std::range_error&)
@@ -56,7 +56,7 @@ int main()
 #ifndef TEST_HAS_NO_EXCEPTIONS
 try
 {
-myconv.from_bytes('\xA5');
+(void)myconv.from_bytes('\xA5');
 assert(false);
 }
 catch (const std::range_error&)


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r329979 - [libcxx] [test] Use TEST_IGNORE_NODISCARD.

2018-04-12 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Thu Apr 12 17:07:48 2018
New Revision: 329979

URL: http://llvm.org/viewvc/llvm-project?rev=329979&view=rev
Log:
[libcxx] [test] Use TEST_IGNORE_NODISCARD.

Fixes D45595.

Modified:

libcxx/trunk/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_err_string.pass.cpp

Modified: 
libcxx/trunk/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_err_string.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_err_string.pass.cpp?rev=329979&r1=329978&r2=329979&view=diff
==
--- 
libcxx/trunk/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_err_string.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_err_string.pass.cpp
 Thu Apr 12 17:07:48 2018
@@ -33,7 +33,7 @@ int main()
 Myconv myconv;
 try
 {
-(void)myconv.to_bytes(L"\xDA83");
+TEST_IGNORE_NODISCARD myconv.to_bytes(L"\xDA83");
 assert(false);
 }
 catch (const std::range_error&)
@@ -41,7 +41,7 @@ int main()
 }
 try
 {
-(void)myconv.from_bytes('\xA5');
+TEST_IGNORE_NODISCARD myconv.from_bytes('\xA5');
 assert(false);
 }
 catch (const std::range_error&)
@@ -56,7 +56,7 @@ int main()
 #ifndef TEST_HAS_NO_EXCEPTIONS
 try
 {
-(void)myconv.from_bytes('\xA5');
+TEST_IGNORE_NODISCARD myconv.from_bytes('\xA5');
 assert(false);
 }
 catch (const std::range_error&)


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r331576 - [libcxx] [test] Fix whitespace, NFC.

2018-05-04 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Fri May  4 18:40:27 2018
New Revision: 331576

URL: http://llvm.org/viewvc/llvm-project?rev=331576&view=rev
Log:
[libcxx] [test] Fix whitespace, NFC.

Strip trailing whitespace and untabify.

Modified:

libcxx/trunk/test/std/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.ops/failed.pass.cpp

Modified: 
libcxx/trunk/test/std/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.ops/failed.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.ops/failed.pass.cpp?rev=331576&r1=331575&r2=331576&view=diff
==
--- 
libcxx/trunk/test/std/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.ops/failed.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.ops/failed.pass.cpp
 Fri May  4 18:40:27 2018
@@ -19,23 +19,23 @@
 
 template  >
 struct my_streambuf : public std::basic_streambuf {
-   typedef typename std::basic_streambuf::int_type  int_type;
-   typedef typename std::basic_streambuf::char_type char_type;
-   
-   my_streambuf() {}
-   int_type sputc(char_type) { return Traits::eof(); }
-   };
+typedef typename std::basic_streambuf::int_type  int_type;
+typedef typename std::basic_streambuf::char_type char_type;
+
+my_streambuf() {}
+int_type sputc(char_type) { return Traits::eof(); }
+};
 
 int main()
 {
 {
-   my_streambuf buf;
+my_streambuf buf;
 std::ostreambuf_iterator i(&buf);
 i = 'a';
 assert(i.failed());
 }
 {
-   my_streambuf buf;
+my_streambuf buf;
 std::ostreambuf_iterator i(&buf);
 i = L'a';
 assert(i.failed());


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r331575 - [libcxx] [test] Fix MSVC x64 truncation warning.

2018-05-04 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Fri May  4 18:40:24 2018
New Revision: 331575

URL: http://llvm.org/viewvc/llvm-project?rev=331575&view=rev
Log:
[libcxx] [test] Fix MSVC x64 truncation warning.

warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of 
data

Requesting post-commit review.

Modified:

libcxx/trunk/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/streambuf.pass.cpp

Modified: 
libcxx/trunk/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/streambuf.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/streambuf.pass.cpp?rev=331575&r1=331574&r2=331575&view=diff
==
--- 
libcxx/trunk/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/streambuf.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/streambuf.pass.cpp
 Fri May  4 18:40:24 2018
@@ -50,7 +50,7 @@ protected:
 str_.resize(str_.capacity());
 base::setp(const_cast(str_.data()),
const_cast(str_.data() + str_.size()));
-base::pbump(n+1);
+base::pbump(static_cast(n+1));
 }
 return ch;
 }


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D23685: [libcxx] [test] Include the iterator header for back_inserter.

2016-09-30 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT closed this revision.
STL_MSFT added a comment.

This was checked in ages ago.


https://reviews.llvm.org/D23685



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D25141: [libcxx] [test] Remove MSVC workarounds

2016-09-30 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision.
STL_MSFT added reviewers: EricWF, mclow.lists.
STL_MSFT added a subscriber: cfe-commits.

MSVC has finally fixed the compiler bug that was warning about unreferenced 
parameters when invoking destructors, so we can remove the void casts that were 
working around the bug. Yay!


https://reviews.llvm.org/D25141

Files:
  test/support/test_allocator.h


Index: test/support/test_allocator.h
===
--- test/support/test_allocator.h
+++ test/support/test_allocator.h
@@ -88,10 +88,7 @@
 {::new(static_cast(p)) T(std::forward(val));}
 #endif
 void destroy(pointer p)
-{
-p->~T();
-((void)p); // Prevent MSVC's spurious unused warning
-}
+{p->~T();}
 friend bool operator==(const test_allocator& x, const test_allocator& y)
 {return x.data_ == y.data_;}
 friend bool operator!=(const test_allocator& x, const test_allocator& y)
@@ -291,10 +288,7 @@
 
 template
 void destroy(U* p)
-{
-p->~U();
-((void)p); // Prevent MSVC's spurious unused warning
-}
+{ p->~U(); }
 };
 
 template


Index: test/support/test_allocator.h
===
--- test/support/test_allocator.h
+++ test/support/test_allocator.h
@@ -88,10 +88,7 @@
 {::new(static_cast(p)) T(std::forward(val));}
 #endif
 void destroy(pointer p)
-{
-p->~T();
-((void)p); // Prevent MSVC's spurious unused warning
-}
+{p->~T();}
 friend bool operator==(const test_allocator& x, const test_allocator& y)
 {return x.data_ == y.data_;}
 friend bool operator!=(const test_allocator& x, const test_allocator& y)
@@ -291,10 +288,7 @@
 
 template
 void destroy(U* p)
-{
-p->~U();
-((void)p); // Prevent MSVC's spurious unused warning
-}
+{ p->~U(); }
 };
 
 template
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D22973: [libcxx] [test] Add TEST_STACK_ALLOCATOR_WORKAROUND.

2016-09-30 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT added a comment.

I know that this stack_allocator issue is a huge headache, but would it be 
possible to accept this small, non-intrusive diff upstream? This is the last 
local change that I have.


https://reviews.llvm.org/D22973



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D25154: [libc++] Fix stack_allocator

2016-10-03 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT added a comment.

stack_allocator.h is inconsistent about saying plain size_t or std::size_t.

stack_allocator.h should include type_traits for integral_constant.

stack_allocator.h refers to stack_allocator as both a class and a struct. It 
should be consistent (not just because MSVC complains).

stack_allocator provides copy assign and convert copy assign. This is 
unnecessary because it doesn't set any of POCCA/POCMA/POCS. It should probably 
be non-assignable.

For the same reason, stack_allocator probably shouldn't have a do-nothing 
swap() overload. It won't be used.

In C++11 land, stack_allocator::allocate() doesn't need "const void* = 0" 
(because allocator_traits will fill it in). Don't know if you need this for 
C++03 mode.

stack_allocator equality/inequality probably shouldn't be templated on 
differing TN/UN, as they aren't rebindable that way.

Why does test_stack_allocator.pass.cpp line 11 have a commented-out path?

There is occasional whitespace damage caused by search-and-replace, e.g. 
"std::list".

Why is test/std/containers/sequences/deque/deque.cons/size_value_alloc.pass.cpp 
84-85 gaining totally empty braces?


https://reviews.llvm.org/D25154



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D25248: [libcxx] [test] Fix shadow warnings.

2016-10-04 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision.
STL_MSFT added reviewers: EricWF, mclow.lists.
STL_MSFT added a subscriber: cfe-commits.

Fix MSVC shadow warnings in a newly added test, by renaming local variables.


https://reviews.llvm.org/D25248

Files:
  test/std/utilities/utility/forward/move.pass.cpp


Index: test/std/utilities/utility/forward/move.pass.cpp
===
--- test/std/utilities/utility/forward/move.pass.cpp
+++ test/std/utilities/utility/forward/move.pass.cpp
@@ -52,12 +52,12 @@
 
 constexpr bool test_constexpr_move() {
 #if TEST_STD_VER > 11
-int x = 42;
-const int cx = x;
-return std::move(x) == 42
-&& std::move(cx) == 42
-&& std::move(static_cast(x)) == 42
-&& std::move(static_cast(x)) == 42;
+int y = 42;
+const int cy = y;
+return std::move(y) == 42
+&& std::move(cy) == 42
+&& std::move(static_cast(y)) == 42
+&& std::move(static_cast(y)) == 42;
 #else
 return true;
 #endif
@@ -105,17 +105,17 @@
 }
 #if TEST_STD_VER > 11
 {
-constexpr int x = 42;
-static_assert(std::move(x) == 42, "");
+constexpr int y = 42;
+static_assert(std::move(y) == 42, "");
 static_assert(test_constexpr_move(), "");
 }
 #endif
 #if TEST_STD_VER == 11 && defined(_LIBCPP_VERSION)
 // Test that std::forward is constexpr in C++11. This is an extension
 // provided by both libc++ and libstdc++.
 {
-constexpr int x = 42;
-static_assert(std::move(x) == 42, "");
+constexpr int y = 42;
+static_assert(std::move(y) == 42, "");
 }
 #endif
 }


Index: test/std/utilities/utility/forward/move.pass.cpp
===
--- test/std/utilities/utility/forward/move.pass.cpp
+++ test/std/utilities/utility/forward/move.pass.cpp
@@ -52,12 +52,12 @@
 
 constexpr bool test_constexpr_move() {
 #if TEST_STD_VER > 11
-int x = 42;
-const int cx = x;
-return std::move(x) == 42
-&& std::move(cx) == 42
-&& std::move(static_cast(x)) == 42
-&& std::move(static_cast(x)) == 42;
+int y = 42;
+const int cy = y;
+return std::move(y) == 42
+&& std::move(cy) == 42
+&& std::move(static_cast(y)) == 42
+&& std::move(static_cast(y)) == 42;
 #else
 return true;
 #endif
@@ -105,17 +105,17 @@
 }
 #if TEST_STD_VER > 11
 {
-constexpr int x = 42;
-static_assert(std::move(x) == 42, "");
+constexpr int y = 42;
+static_assert(std::move(y) == 42, "");
 static_assert(test_constexpr_move(), "");
 }
 #endif
 #if TEST_STD_VER == 11 && defined(_LIBCPP_VERSION)
 // Test that std::forward is constexpr in C++11. This is an extension
 // provided by both libc++ and libstdc++.
 {
-constexpr int x = 42;
-static_assert(std::move(x) == 42, "");
+constexpr int y = 42;
+static_assert(std::move(y) == 42, "");
 }
 #endif
 }
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D25251: [libcxx] [test] Guard __has_include usage with a macro

2016-10-04 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision.
STL_MSFT added reviewers: EricWF, mclow.lists.
STL_MSFT added a subscriber: cfe-commits.

There's a macro scheme already being used for __has_feature etc. Use it for 
__has_include too, which makes MSVC happy (it doesn't support __has_include 
yet, and unguarded use explodes horribly).


https://reviews.llvm.org/D25251

Files:
  test/support/test_macros.h


Index: test/support/test_macros.h
===
--- test/support/test_macros.h
+++ test/support/test_macros.h
@@ -22,6 +22,12 @@
 #define TEST_HAS_FEATURE(X) 0
 #endif
 
+#ifdef __has_include
+#define TEST_HAS_INCLUDE(X) __has_include(X)
+#else
+#define TEST_HAS_INCLUDE(X) 0
+#endif
+
 #ifdef __has_extension
 #define TEST_HAS_EXTENSION(X) __has_extension(X)
 #else
@@ -63,7 +69,7 @@
 #endif
 
 // Attempt to deduce GCC version
-#if defined(_LIBCPP_VERSION) && __has_include()
+#if defined(_LIBCPP_VERSION) && TEST_HAS_INCLUDE()
 #include 
 #define TEST_HAS_GLIBC
 #define TEST_GLIBC_PREREQ(major, minor) __GLIBC_PREREQ(major, minor)


Index: test/support/test_macros.h
===
--- test/support/test_macros.h
+++ test/support/test_macros.h
@@ -22,6 +22,12 @@
 #define TEST_HAS_FEATURE(X) 0
 #endif
 
+#ifdef __has_include
+#define TEST_HAS_INCLUDE(X) __has_include(X)
+#else
+#define TEST_HAS_INCLUDE(X) 0
+#endif
+
 #ifdef __has_extension
 #define TEST_HAS_EXTENSION(X) __has_extension(X)
 #else
@@ -63,7 +69,7 @@
 #endif
 
 // Attempt to deduce GCC version
-#if defined(_LIBCPP_VERSION) && __has_include()
+#if defined(_LIBCPP_VERSION) && TEST_HAS_INCLUDE()
 #include 
 #define TEST_HAS_GLIBC
 #define TEST_GLIBC_PREREQ(major, minor) __GLIBC_PREREQ(major, minor)
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D25248: [libcxx] [test] Fix shadow warnings.

2016-10-07 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT added a comment.

Thanks Marshall. Can either you or Eric commit this?


https://reviews.llvm.org/D25248



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D25154: [libc++] Fix stack_allocator

2016-10-07 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT accepted this revision.
STL_MSFT added a comment.
This revision is now accepted and ready to land.

Seems plausible to me. I haven't tested this against MSVC yet, but at most I 
expect to have minor issues with space consumption (as we allocate helper 
objects and sentinel nodes, so any exactly-sized buffers may run out of room). 
In any event the existing stuff is totally broken, so I have no objections to 
you checking this in. Thanks!


https://reviews.llvm.org/D25154



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D25154: [libc++] Fix stack_allocator

2016-10-07 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT added a comment.

F2472251: msvc_warnings.txt 

- The attached patch on top of your patch fixes two simple MSVC warnings - 
unreferenced formal parameter and class/struct mismatch.

- Three tests are emitting stack consumption warnings (since MSVC /analyze 
tries to understand what's going on in the stack):

test\std\containers\sequences\deque\deque.cons\iter_iter.pass.cpp
iter_iter.pass.cpp(50) : warning C6262: Function uses '32868' bytes of stack:  
exceeds /analyze:stacksize '16384'.  Consider moving some data to heap.

test\std\containers\sequences\deque\deque.cons\size.pass.cpp
size.pass.cpp(85) : warning C6262: Function uses '800032' bytes of stack:  
exceeds /analyze:stacksize '16384'.  Consider moving some data to heap.

test\std\containers\sequences\deque\deque.cons\size_value_alloc.pass.cpp
size_value_alloc.pass.cpp(34) : warning C6262: Function uses '80044' bytes of 
stack:  exceeds /analyze:stacksize '16384'.  Consider moving some data to heap.

The 800KB consumption seems especially egregious. Changing these tests to 
dynamically allocate these huge objects will silence the warning.

- Finally, the following tests are asserting:

test\std\containers\sequences\vector\vector.capacity\reserve.pass.cpp
test\std\containers\sequences\vector\vector.capacity\resize_size.pass.cpp
test\std\containers\sequences\vector\vector.capacity\resize_size_value.pass.cpp
test\std\containers\sequences\vector\vector.cons\construct_iter_iter_alloc.pass.cpp
test\std\containers\sequences\vector\vector.cons\construct_size_value_alloc.pass.cpp
test\std\containers\sequences\vector\vector.modifiers\push_back.pass.cpp
test\std\containers\sequences\vector\vector.modifiers\push_back_rvalue.pass.cpp

This is because of the exact-space-consumption issue I feared/predicted - 
you're constructing stack_allocators with a small fixed amount of space, but 
our debug object occupies space, and that makes the allocator run out of memory.

A possible fix would be to increase the amount of space (two pointers should be 
sufficient).


https://reviews.llvm.org/D25154



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D22973: [libcxx] [test] Add TEST_STACK_ALLOCATOR_WORKAROUND.

2016-10-10 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT abandoned this revision.
STL_MSFT added a comment.

Abandoning, as this machinery has been replaced.


https://reviews.llvm.org/D22973



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D25451: [libcxx] [test] limited_allocator should be limited_allocator's best friend forever

2016-10-10 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision.
STL_MSFT added reviewers: EricWF, mclow.lists.
STL_MSFT added a subscriber: cfe-commits.

limited_allocator must grant friendship in order to be rebindable. Found by 
MSVC, which rebinds allocators in more situations than libc++ does.

This raises an interesting question as to whether libc++ should be validating 
user-defined allocators more aggressively.


https://reviews.llvm.org/D25451

Files:
  test/support/test_allocator.h


Index: test/support/test_allocator.h
===
--- test/support/test_allocator.h
+++ test/support/test_allocator.h
@@ -334,6 +334,9 @@
 {
 typedef limited_alloc_handle BuffT;
 std::shared_ptr handle_;
+
+template  friend class limited_allocator;
+
 public:
 typedef T value_type;
 typedef value_type*   pointer;


Index: test/support/test_allocator.h
===
--- test/support/test_allocator.h
+++ test/support/test_allocator.h
@@ -334,6 +334,9 @@
 {
 typedef limited_alloc_handle BuffT;
 std::shared_ptr handle_;
+
+template  friend class limited_allocator;
+
 public:
 typedef T value_type;
 typedef value_type*   pointer;
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D25483: [libcxx] [test] Fix non-Standard assumptions about how many elements are allocated

2016-10-11 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision.
STL_MSFT added reviewers: EricWF, mclow.lists.
STL_MSFT added a subscriber: cfe-commits.

The recently-added limited_allocator is much more conformant than the evil old 
stack_allocator. However, limited_allocator encodes non-Standard assumptions 
about how many allocations containers perform, which don't hold for MSVC. 
Specifically, MSVC's STL dynamically allocates sentinel nodes and "container 
proxies" (for debug mode checking), and its vector famously grows by 1.5x 
instead of 2x. I would like to retain the limited_allocator coverage, but tweak 
things so that they pass for both libc++ and MSVC.

test/std/containers/sequences/deque/deque.cons/size.pass.cpp
test/std/containers/sequences/deque/deque.cons/size_value.pass.cpp
deque is too weird. (MSVC's deque reallocates its blockmap several times while 
doing this.) Just mark the tests as LIBCPP_ONLY, the coward's way out.

test/std/containers/sequences/list/list.cons/input_iterator.pass.cpp
test/std/containers/sequences/list/list.cons/size_type.pass.cpp
test/std/containers/sequences/list/list.cons/size_value_alloc.pass.cpp
"Add 2 for implementations that dynamically allocate a sentinel node and 
container proxy."

test/std/containers/sequences/vector/vector.capacity/reserve.pass.cpp
test/std/containers/sequences/vector/vector.capacity/resize_size.pass.cpp
test/std/containers/sequences/vector/vector.capacity/resize_size_value.pass.cpp
test/std/containers/sequences/vector/vector.cons/construct_size_value.pass.cpp
"Add 1 for implementations that dynamically allocate a container proxy."

test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp
Ditto. The (InIt, InIt) ctor is unchanged at 63 elements allocated (MSVC's 1.5x 
results in fewer element allocations, enough to make room for the container 
proxy).

test/std/containers/sequences/vector/vector.modifiers/push_back.pass.cpp
test/std/containers/sequences/vector/vector.modifiers/push_back_rvalue.pass.cpp
Adjust numbers for container proxy and 1.5x growth, with the calculations in 
the comments.


https://reviews.llvm.org/D25483

Files:
  test/std/containers/sequences/deque/deque.cons/size.pass.cpp
  test/std/containers/sequences/deque/deque.cons/size_value.pass.cpp
  test/std/containers/sequences/list/list.cons/input_iterator.pass.cpp
  test/std/containers/sequences/list/list.cons/size_type.pass.cpp
  test/std/containers/sequences/list/list.cons/size_value_alloc.pass.cpp
  test/std/containers/sequences/vector/vector.capacity/reserve.pass.cpp
  test/std/containers/sequences/vector/vector.capacity/resize_size.pass.cpp
  
test/std/containers/sequences/vector/vector.capacity/resize_size_value.pass.cpp
  test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp
  test/std/containers/sequences/vector/vector.cons/construct_size_value.pass.cpp
  test/std/containers/sequences/vector/vector.modifiers/push_back.pass.cpp
  
test/std/containers/sequences/vector/vector.modifiers/push_back_rvalue.pass.cpp

Index: test/std/containers/sequences/vector/vector.modifiers/push_back_rvalue.pass.cpp
===
--- test/std/containers/sequences/vector/vector.modifiers/push_back_rvalue.pass.cpp
+++ test/std/containers/sequences/vector/vector.modifiers/push_back_rvalue.pass.cpp
@@ -50,7 +50,10 @@
 assert(c[j] == MoveOnly(j));
 }
 {
-std::vector > c;
+// libc++ needs 15 because it grows by 2x (1 + 2 + 4 + 8).
+// Use 17 for implementations that dynamically allocate a container proxy
+// and grow by 1.5x (1 for proxy + 1 + 2 + 3 + 4 + 6).
+std::vector > c;
 c.push_back(MoveOnly(0));
 assert(c.size() == 1);
 assert(is_contiguous_container_asan_correct(c));
Index: test/std/containers/sequences/vector/vector.modifiers/push_back.pass.cpp
===
--- test/std/containers/sequences/vector/vector.modifiers/push_back.pass.cpp
+++ test/std/containers/sequences/vector/vector.modifiers/push_back.pass.cpp
@@ -48,7 +48,10 @@
 assert(c[j] == j);
 }
 {
-std::vector > c;
+// libc++ needs 15 because it grows by 2x (1 + 2 + 4 + 8).
+// Use 17 for implementations that dynamically allocate a container proxy
+// and grow by 1.5x (1 for proxy + 1 + 2 + 3 + 4 + 6).
+std::vector > c;
 c.push_back(0);
 assert(c.size() == 1);
 assert(is_contiguous_container_asan_correct(c));
Index: test/std/containers/sequences/vector/vector.cons/construct_size_value.pass.cpp
===
--- test/std/containers/sequences/vector/vector.cons/construct_size_value.pass.cpp
+++ test/std/containers/sequences/vector/vector.cons/construct_size_value.pass.cpp
@@ -34,7 +34,8 @@
 int main()
 {
 test >(50, 3);
-test > >(50, 5);
+// Add 1 for implementations that dynami

[libcxx] r319994 - [libcxx] [test] Strip trailing whitespace. NFC.

2017-12-06 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Wed Dec  6 16:50:23 2017
New Revision: 319994

URL: http://llvm.org/viewvc/llvm-project?rev=319994&view=rev
Log:
[libcxx] [test] Strip trailing whitespace. NFC.

Modified:

libcxx/trunk/test/std/experimental/filesystem/class.path/path.member/path.decompose/path.decompose.pass.cpp

libcxx/trunk/test/std/strings/basic.string/string.ends_with/ends_with.ptr.pass.cpp

libcxx/trunk/test/std/strings/basic.string/string.ends_with/ends_with.string_view.pass.cpp

libcxx/trunk/test/std/strings/basic.string/string.starts_with/starts_with.string_view.pass.cpp

libcxx/trunk/test/std/utilities/meta/meta.trans/meta.trans.other/remove_cvref.pass.cpp

Modified: 
libcxx/trunk/test/std/experimental/filesystem/class.path/path.member/path.decompose/path.decompose.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/filesystem/class.path/path.member/path.decompose/path.decompose.pass.cpp?rev=319994&r1=319993&r2=319994&view=diff
==
--- 
libcxx/trunk/test/std/experimental/filesystem/class.path/path.member/path.decompose/path.decompose.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/experimental/filesystem/class.path/path.member/path.decompose/path.decompose.pass.cpp
 Wed Dec  6 16:50:23 2017
@@ -178,7 +178,7 @@ void decompFilenameTest()
 path p(TC.raw);
 assert(p == TC.raw);
 ASSERT_NOEXCEPT(p.empty());
-
+
 assert(p.filename() == TC.filename);
 assert(p.has_filename() != TC.filename.empty());
 

Modified: 
libcxx/trunk/test/std/strings/basic.string/string.ends_with/ends_with.ptr.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.ends_with/ends_with.ptr.pass.cpp?rev=319994&r1=319993&r2=319994&view=diff
==
--- 
libcxx/trunk/test/std/strings/basic.string/string.ends_with/ends_with.ptr.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/strings/basic.string/string.ends_with/ends_with.ptr.pass.cpp
 Wed Dec  6 16:50:23 2017
@@ -30,7 +30,7 @@ int main()
 //  S   s4  { s + 1, 4 };
 //  S   s5  { s, 5 };
 S  sNot { "def", 3 };
-
+
 LIBCPP_ASSERT_NOEXCEPT(s0.ends_with(""));
 
 assert ( s0.ends_with(""));

Modified: 
libcxx/trunk/test/std/strings/basic.string/string.ends_with/ends_with.string_view.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.ends_with/ends_with.string_view.pass.cpp?rev=319994&r1=319993&r2=319994&view=diff
==
--- 
libcxx/trunk/test/std/strings/basic.string/string.ends_with/ends_with.string_view.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/strings/basic.string/string.ends_with/ends_with.string_view.pass.cpp
 Wed Dec  6 16:50:23 2017
@@ -31,7 +31,7 @@ int main()
 //  S   s4  { s + 1, 4 };
 //  S   s5  { s, 5 };
 S  sNot { "def", 3 };
-
+
 SV  sv0;
 SV  sv1 { s + 4, 1 };
 SV  sv2 { s + 3, 2 };

Modified: 
libcxx/trunk/test/std/strings/basic.string/string.starts_with/starts_with.string_view.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.starts_with/starts_with.string_view.pass.cpp?rev=319994&r1=319993&r2=319994&view=diff
==
--- 
libcxx/trunk/test/std/strings/basic.string/string.starts_with/starts_with.string_view.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/strings/basic.string/string.starts_with/starts_with.string_view.pass.cpp
 Wed Dec  6 16:50:23 2017
@@ -31,7 +31,7 @@ int main()
 //  S   s4  { s, 4 };
 //  S   s5  { s, 5 };
 S  sNot { "def", 3 };
-
+
 SV  sv0;
 SV  sv1 { s, 1 };
 SV  sv2 { s, 2 };

Modified: 
libcxx/trunk/test/std/utilities/meta/meta.trans/meta.trans.other/remove_cvref.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/meta/meta.trans/meta.trans.other/remove_cvref.pass.cpp?rev=319994&r1=319993&r2=319994&view=diff
==
--- 
libcxx/trunk/test/std/utilities/meta/meta.trans/meta.trans.other/remove_cvref.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/utilities/meta/meta.trans/meta.trans.other/remove_cvref.pass.cpp
 Wed Dec  6 16:50:23 2017
@@ -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();


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r320535 - [libcxx] [test] Fix MSVC warnings, null pointer deref.

2017-12-12 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Tue Dec 12 16:51:27 2017
New Revision: 320535

URL: http://llvm.org/viewvc/llvm-project?rev=320535&view=rev
Log:
[libcxx] [test] Fix MSVC warnings, null pointer deref.

test/std/algorithms/alg.modifying.operations/alg.generate/generate_n.pass.cpp
Silence MSVC warning C4244. This is expected when passing
floating-point values for size.

test/std/utilities/template.bitset/bitset.members/to_ullong.pass.cpp
test/std/utilities/template.bitset/bitset.members/to_ulong.pass.cpp
Avoid MSVC "warning C4293: '<<': shift count negative or too big,
undefined behavior". MSVC sees (1ULL << N) and warns - being guarded
by const bool canFit is insufficient. A small change to the code
avoids the warning without the need for a pragma.

Remove a spurious printf() declaration from to_ullong.pass.cpp.

Change ULL to UL in to_ulong.pass.cpp. The ULL suffix was
probably copy-pasted.

test/std/utilities/tuple/tuple.general/ignore.pass.cpp
Use LIBCPP_STATIC_ASSERT for consistency with other files.

test/support/container_test_types.h
Fix a null pointer dereference, found by MSVC /analyze
warning C6011 "Dereferencing NULL pointer 'm_expected_args'."

Fixes D41030.

Modified:

libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.generate/generate_n.pass.cpp

libcxx/trunk/test/std/utilities/template.bitset/bitset.members/to_ullong.pass.cpp

libcxx/trunk/test/std/utilities/template.bitset/bitset.members/to_ulong.pass.cpp
libcxx/trunk/test/std/utilities/tuple/tuple.general/ignore.pass.cpp
libcxx/trunk/test/support/container_test_types.h

Modified: 
libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.generate/generate_n.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.generate/generate_n.pass.cpp?rev=320535&r1=320534&r2=320535&view=diff
==
--- 
libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.generate/generate_n.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.generate/generate_n.pass.cpp
 Tue Dec 12 16:51:27 2017
@@ -15,6 +15,10 @@
 //   void
 //   generate_n(Iter first, Size n, Generator gen);
 
+#ifdef _MSC_VER
+#pragma warning(disable: 4244) // conversion from 'const double' to 'int', 
possible loss of data
+#endif
+
 #include 
 #include 
 

Modified: 
libcxx/trunk/test/std/utilities/template.bitset/bitset.members/to_ullong.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/template.bitset/bitset.members/to_ullong.pass.cpp?rev=320535&r1=320534&r2=320535&view=diff
==
--- 
libcxx/trunk/test/std/utilities/template.bitset/bitset.members/to_ullong.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/utilities/template.bitset/bitset.members/to_ullong.pass.cpp
 Tue Dec 12 16:51:27 2017
@@ -8,7 +8,6 @@
 
//===--===//
 
 // test unsigned long long to_ullong() const;
-extern "C" int printf(const char *, ...);
 
 #include 
 #include 
@@ -40,7 +39,7 @@ void test_to_ullong()
 { // test values bigger than can fit into the bitset
 const unsigned long long val = 0x5555ULL;
 const bool canFit = N < sizeof(unsigned long long) * CHAR_BIT;
-const unsigned long long mask = canFit ? (1ULL << N) - 1 : (unsigned long 
long)(-1);
+const unsigned long long mask = canFit ? (1ULL << (canFit ? N : 0)) - 1 : 
(unsigned long long)(-1); // avoid compiler warnings
 std::bitset v(val);
 assert(v.to_ullong() == (val & mask)); // we shouldn't return bit patterns 
from outside the limits of the bitset.
 }

Modified: 
libcxx/trunk/test/std/utilities/template.bitset/bitset.members/to_ulong.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/template.bitset/bitset.members/to_ulong.pass.cpp?rev=320535&r1=320534&r2=320535&view=diff
==
--- 
libcxx/trunk/test/std/utilities/template.bitset/bitset.members/to_ulong.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/utilities/template.bitset/bitset.members/to_ulong.pass.cpp
 Tue Dec 12 16:51:27 2017
@@ -39,9 +39,9 @@ void test_to_ulong()
 }
 
 { // test values bigger than can fit into the bitset
-const unsigned long val = 0x5AA5ULL;
+const unsigned long val = 0x5AA5UL;
 const bool canFit = N < sizeof(unsigned long) * CHAR_BIT;
-const unsigned long mask = canFit ? (1ULL << N) - 1 : (unsigned long)(-1);
+const unsigned long mask = canFit ? (1UL << (canFit ? N : 0)) - 1 : 
(unsigned long)(-1); // avoid compiler warnings
 std::bitset v(val);
 assert(v.to_ulong() == (val & mask)); // we shouldn't return bit patterns 
from outside the limits of the bitset.
 }

Modified: libcxx/trunk/test/std/utilities/tuple/tuple.general/ignore.

[libcxx] r320536 - [libcxx] [test] Fix line endings, avoid unnecessary non-ASCII.

2017-12-12 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Tue Dec 12 16:51:31 2017
New Revision: 320536

URL: http://llvm.org/viewvc/llvm-project?rev=320536&view=rev
Log:
[libcxx] [test] Fix line endings, avoid unnecessary non-ASCII.

benchmarks/util_smartptr.bench.cpp
Change CRLF to LF.

test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp
Consistently comment "\u20ac" as EURO SIGN, its Unicode name, instead of the 
actual Unicode character.

test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_type.pass.cpp
Avoid non-ASCII dash.

Fixes D40991.

Modified:
libcxx/trunk/benchmarks/util_smartptr.bench.cpp

libcxx/trunk/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp

libcxx/trunk/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_type.pass.cpp

Modified: libcxx/trunk/benchmarks/util_smartptr.bench.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/benchmarks/util_smartptr.bench.cpp?rev=320536&r1=320535&r2=320536&view=diff
==
--- libcxx/trunk/benchmarks/util_smartptr.bench.cpp (original)
+++ libcxx/trunk/benchmarks/util_smartptr.bench.cpp Tue Dec 12 16:51:31 2017
@@ -1,42 +1,42 @@
-//===--===//
-//
-// 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.
-//
-//===--===//
-
-#include 
-
-#include "benchmark/benchmark_api.h"
-
-static void BM_SharedPtrCreateDestroy(benchmark::State& st) {
-  while (st.KeepRunning()) {
-auto sp = std::make_shared(42);
-benchmark::DoNotOptimize(sp.get());
-  }
-}
-BENCHMARK(BM_SharedPtrCreateDestroy);
-
-static void BM_SharedPtrIncDecRef(benchmark::State& st) {
-  auto sp = std::make_shared(42);
-  benchmark::DoNotOptimize(sp.get());
-  while (st.KeepRunning()) {
-std::shared_ptr sp2(sp);
-benchmark::ClobberMemory();
-  }
-}
-BENCHMARK(BM_SharedPtrIncDecRef);
-
-static void BM_WeakPtrIncDecRef(benchmark::State& st) {
-  auto sp = std::make_shared(42);
-  benchmark::DoNotOptimize(sp.get());
-  while (st.KeepRunning()) {
-std::weak_ptr wp(sp);
-benchmark::ClobberMemory();
-  }
-}
-BENCHMARK(BM_WeakPtrIncDecRef);
-
-BENCHMARK_MAIN()
+//===--===//
+//
+// 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.
+//
+//===--===//
+
+#include 
+
+#include "benchmark/benchmark_api.h"
+
+static void BM_SharedPtrCreateDestroy(benchmark::State& st) {
+  while (st.KeepRunning()) {
+auto sp = std::make_shared(42);
+benchmark::DoNotOptimize(sp.get());
+  }
+}
+BENCHMARK(BM_SharedPtrCreateDestroy);
+
+static void BM_SharedPtrIncDecRef(benchmark::State& st) {
+  auto sp = std::make_shared(42);
+  benchmark::DoNotOptimize(sp.get());
+  while (st.KeepRunning()) {
+std::shared_ptr sp2(sp);
+benchmark::ClobberMemory();
+  }
+}
+BENCHMARK(BM_SharedPtrIncDecRef);
+
+static void BM_WeakPtrIncDecRef(benchmark::State& st) {
+  auto sp = std::make_shared(42);
+  benchmark::DoNotOptimize(sp.get());
+  while (st.KeepRunning()) {
+std::weak_ptr wp(sp);
+benchmark::ClobberMemory();
+  }
+}
+BENCHMARK(BM_WeakPtrIncDecRef);
+
+BENCHMARK_MAIN()

Modified: 
libcxx/trunk/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp?rev=320536&r1=320535&r2=320536&view=diff
==
--- 
libcxx/trunk/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp
 Tue Dec 12 16:51:31 2017
@@ -117,7 +117,7 @@ int main()
 assert(ex == -123456789);
 }
 {   // zero, showbase
-std::string v = "0,00 \u20ac";  // €
+std::string v = "0,00 \u20ac";  // EURO SIGN
 showbase(ios);
 typedef input_iterator I;
 long double ex;
@@ -129,7 +129,7 @@ int main()
 assert(ex == 0);
 }
 {   // zero, showbase
-std::string v = "0,00 \u

[llvm] [libunwind] [libcxx] [libc++] Allow running the test suite with optimizations (PR #68753)

2023-11-17 Thread Stephan T. Lavavej via cfe-commits


@@ -87,6 +87,21 @@ def getStdFlag(cfg, std):
 return "-std=" + fallbacks[std]
 return None
 
+def getSpeedOptimizationFlag(cfg):
+if _isClang(cfg) or _isAppleClang(cfg) or _isGCC(cfg):
+return "-O3"
+elif _isMSVC(cfg):
+return "/O2"
+else:
+raise RuntimeError("Can't figure out what compiler is used in the 
configuration")
+
+def getSizeOptimizationFlag(cfg):
+if _isClang(cfg) or _isAppleClang(cfg) or _isGCC(cfg):
+return "-Os"
+elif _isMSVC(cfg):
+return "/O1"

StephanTLavavej wrote:

`/O1` versus `/O2` are better to use than the fine-grained options.

https://github.com/llvm/llvm-project/pull/68753
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r309463 - [libcxx] [test] Strip trailing whitespace, NFC.

2017-07-28 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Fri Jul 28 17:54:49 2017
New Revision: 309463

URL: http://llvm.org/viewvc/llvm-project?rev=309463&view=rev
Log:
[libcxx] [test] Strip trailing whitespace, NFC.

Modified:

libcxx/trunk/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan.pass.cpp

libcxx/trunk/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op.pass.cpp

libcxx/trunk/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op_init.pass.cpp

libcxx/trunk/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop.pass.cpp

libcxx/trunk/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop_init.pass.cpp

Modified: 
libcxx/trunk/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan.pass.cpp?rev=309463&r1=309462&r2=309463&view=diff
==
--- 
libcxx/trunk/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan.pass.cpp
 Fri Jul 28 17:54:49 2017
@@ -13,7 +13,7 @@
 // template
 // OutputIterator inclusive_scan(InputIterator first, InputIterator last,
 //   OutputIterator result, T init);
-// 
+//
 
 #include 
 #include 
@@ -26,7 +26,7 @@ void
 test(Iter1 first, Iter1 last, Iter2 rFirst, Iter2 rLast)
 {
 std::vector::value_type> v;
-
+
 //  Not in place
 std::inclusive_scan(first, last, std::back_inserter(v));
 assert(std::equal(v.begin(), v.end(), rFirst, rLast));
@@ -35,7 +35,7 @@ test(Iter1 first, Iter1 last, Iter2 rFir
 v.clear();
 v.assign(first, last);
 std::inclusive_scan(v.begin(), v.end(), v.begin());
-assert(std::equal(v.begin(), v.end(), rFirst, rLast));  
+assert(std::equal(v.begin(), v.end(), rFirst, rLast));
 }
 
 

Modified: 
libcxx/trunk/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op.pass.cpp?rev=309463&r1=309462&r2=309463&view=diff
==
--- 
libcxx/trunk/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op.pass.cpp
 Fri Jul 28 17:54:49 2017
@@ -13,7 +13,7 @@
 // template
 // OutputIterator
 // inclusive_scan(InputIterator first, InputIterator last,
-//OutputIterator result, 
+//OutputIterator result,
 //BinaryOperation binary_op); // C++17
 
 #include 
@@ -37,7 +37,7 @@ test(Iter1 first, Iter1 last, Op op, Ite
 v.clear();
 v.assign(first, last);
 std::inclusive_scan(v.begin(), v.end(), v.begin(), op);
-assert(std::equal(v.begin(), v.end(), rFirst, rLast));  
+assert(std::equal(v.begin(), v.end(), rFirst, rLast));
 }
 
 
@@ -99,7 +99,7 @@ int main()
 {
 
 basic_tests();
-
+
 //  All the iterator categories
 // test >();
 // test >();
@@ -109,4 +109,3 @@ int main()
 // test<  int*>();
 
 }
- 
\ No newline at end of file

Modified: 
libcxx/trunk/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op_init.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op_init.pass.cpp?rev=309463&r1=309462&r2=309463&view=diff
==
--- 
libcxx/trunk/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op_init.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/numerics/numeric.ops/inclusive.scan/inclusive_scan_op_init.pass.cpp
 Fri Jul 28 17:54:49 2017
@@ -13,7 +13,7 @@
 // template
 // OutputIterator
 // inclusive_scan(InputIterator first, InputIterator last,
-//OutputIterator result, 
+//OutputIterator result,
 //BinaryOperation binary_op, T init); // C++17
 
 #include 
@@ -36,7 +36,7 @@ test(Iter1 first, Iter1 last, Op op, T i
 v.clear();
 v.assign(first, last);
 std::inclusive_scan(v.begin(), v.end(), v.begin(), op, init);
-assert(std::equal(v.begin(), v.end(), rFirst, rLast));  
+assert(std::equal(v.begin(), v.end(), rFirst, rLast));
 }
 
 
@@ -115,7 +115,7 @@ int main()
 {
 
 basic_tests();
-
+
 //  All the iterator categories
 test >();
 test >();
@@ -125,4 +125,3 @@ int main()
 test<  int*>();
 
 }
- 
\ No newline at end of file

Modified: 
libcxx/trunk/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/numeric.ops/transform.inclus

[libcxx] r309466 - [libcxx] [test] In func.wrap.func.con/alloc_F.pass.cpp, fix REQUIRES whitespace. NFC.

2017-07-28 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Fri Jul 28 17:55:25 2017
New Revision: 309466

URL: http://llvm.org/viewvc/llvm-project?rev=309466&view=rev
Log:
[libcxx] [test] In func.wrap.func.con/alloc_F.pass.cpp, fix REQUIRES 
whitespace. NFC.

Modified:

libcxx/trunk/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_F.pass.cpp

Modified: 
libcxx/trunk/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_F.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_F.pass.cpp?rev=309466&r1=309465&r2=309466&view=diff
==
--- 
libcxx/trunk/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_F.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_F.pass.cpp
 Fri Jul 28 17:55:25 2017
@@ -8,7 +8,7 @@
 
//===--===//
 
 // 
-// REQUIRES: c++98 || c++03 || c++11 ||c++14
+// REQUIRES: c++98 || c++03 || c++11 || c++14
 
 // class function
 


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r309465 - [libcxx] [test] Make files consistently end with newlines, NFC.

2017-07-28 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Fri Jul 28 17:55:22 2017
New Revision: 309465

URL: http://llvm.org/viewvc/llvm-project?rev=309465&view=rev
Log:
[libcxx] [test] Make files consistently end with newlines, NFC.

Modified:
libcxx/trunk/test/libcxx/algorithms/debug_less.pass.cpp

libcxx/trunk/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_rvalue_db1.pass.cpp

libcxx/trunk/test/libcxx/experimental/filesystem/class.path/path.itr/iterator_db.pass.cpp
libcxx/trunk/test/libcxx/type_traits/lazy_metafunctions.pass.cpp

libcxx/trunk/test/libcxx/utilities/function.objects/func.require/bullet_4_5_6.pass.cpp

libcxx/trunk/test/libcxx/utilities/tuple/tuple.tuple/diagnose_reference_binding.pass.cpp

libcxx/trunk/test/std/containers/unord/unord.map/unord.map.modifiers/insert_or_assign.pass.cpp

libcxx/trunk/test/std/experimental/memory/memory.resource/memory.resource.priv/protected_members.fail.cpp

libcxx/trunk/test/std/experimental/string.view/string.view.cons/from_string1.fail.cpp
libcxx/trunk/test/std/language.support/support.dynamic/align_val_t.pass.cpp

libcxx/trunk/test/std/strings/string.view/string.view.cons/from_string1.fail.cpp

libcxx/trunk/test/std/utilities/function.objects/func.invoke/invoke_feature_test_macro.pass.cpp

libcxx/trunk/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.value/uninitialized_value_construct_n.pass.cpp

libcxx/trunk/test/std/utilities/memory/specialized.algorithms/uninitialized.move/uninitialized_move.pass.cpp

libcxx/trunk/test/std/utilities/memory/specialized.algorithms/uninitialized.move/uninitialized_move_n.pass.cpp
libcxx/trunk/test/support/test_convertible.hpp

Modified: libcxx/trunk/test/libcxx/algorithms/debug_less.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/algorithms/debug_less.pass.cpp?rev=309465&r1=309464&r2=309465&view=diff
==
--- libcxx/trunk/test/libcxx/algorithms/debug_less.pass.cpp (original)
+++ libcxx/trunk/test/libcxx/algorithms/debug_less.pass.cpp Fri Jul 28 17:55:22 
2017
@@ -164,4 +164,4 @@ void test_failing() {
 int main() {
 test_passing();
 test_failing();
-}
\ No newline at end of file
+}

Modified: 
libcxx/trunk/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_rvalue_db1.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_rvalue_db1.pass.cpp?rev=309465&r1=309464&r2=309465&view=diff
==
--- 
libcxx/trunk/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_rvalue_db1.pass.cpp
 (original)
+++ 
libcxx/trunk/test/libcxx/containers/sequences/list/list.modifiers/insert_iter_rvalue_db1.pass.cpp
 Fri Jul 28 17:55:22 2017
@@ -27,4 +27,4 @@ int main()
 std::list v2(3);
 v1.insert(v2.begin(), 4);
 assert(false);
-}
\ No newline at end of file
+}

Modified: 
libcxx/trunk/test/libcxx/experimental/filesystem/class.path/path.itr/iterator_db.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/experimental/filesystem/class.path/path.itr/iterator_db.pass.cpp?rev=309465&r1=309464&r2=309465&view=diff
==
--- 
libcxx/trunk/test/libcxx/experimental/filesystem/class.path/path.itr/iterator_db.pass.cpp
 (original)
+++ 
libcxx/trunk/test/libcxx/experimental/filesystem/class.path/path.itr/iterator_db.pass.cpp
 Fri Jul 28 17:55:22 2017
@@ -71,4 +71,4 @@ int main() {
   assert(false);
 } catch (int) {}
   }
-}
\ No newline at end of file
+}

Modified: libcxx/trunk/test/libcxx/type_traits/lazy_metafunctions.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/type_traits/lazy_metafunctions.pass.cpp?rev=309465&r1=309464&r2=309465&view=diff
==
--- libcxx/trunk/test/libcxx/type_traits/lazy_metafunctions.pass.cpp (original)
+++ libcxx/trunk/test/libcxx/type_traits/lazy_metafunctions.pass.cpp Fri Jul 28 
17:55:22 2017
@@ -134,4 +134,4 @@ int main() {
 LazyNotTest();
 LazyAndTest();
 LazyOrTest();
-}
\ No newline at end of file
+}

Modified: 
libcxx/trunk/test/libcxx/utilities/function.objects/func.require/bullet_4_5_6.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/utilities/function.objects/func.require/bullet_4_5_6.pass.cpp?rev=309465&r1=309464&r2=309465&view=diff
==
--- 
libcxx/trunk/test/libcxx/utilities/function.objects/func.require/bullet_4_5_6.pass.cpp
 (original)
+++ 
libcxx/trunk/test/libcxx/utilities/function.objects/func.require/bullet_4_5_6.pass.cpp
 Fri Jul 28 17:55:22 2017
@@ -213,4 +213,4 @@ int main() {
 TestCase::run();
 TestCase::run();
 TestCase::r

[libcxx] r309467 - [libcxx] [test] The entire file futures.shared_future/wait_until.pass.cpp was indented by 1 space. NFC.

2017-07-28 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Fri Jul 28 17:55:27 2017
New Revision: 309467

URL: http://llvm.org/viewvc/llvm-project?rev=309467&view=rev
Log:
[libcxx] [test] The entire file futures.shared_future/wait_until.pass.cpp was 
indented by 1 space. NFC.

Modified:

libcxx/trunk/test/std/thread/futures/futures.shared_future/wait_until.pass.cpp

Modified: 
libcxx/trunk/test/std/thread/futures/futures.shared_future/wait_until.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.shared_future/wait_until.pass.cpp?rev=309467&r1=309466&r2=309467&view=diff
==
--- 
libcxx/trunk/test/std/thread/futures/futures.shared_future/wait_until.pass.cpp 
(original)
+++ 
libcxx/trunk/test/std/thread/futures/futures.shared_future/wait_until.pass.cpp 
Fri Jul 28 17:55:27 2017
@@ -1,130 +1,130 @@
- 
//===--===//
- //
- // 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.
- //
- 
//===--===//
- //
- // UNSUPPORTED: libcpp-has-no-threads
- // UNSUPPORTED: c++98, c++03
-
- // 
-
- // class shared_future
-
- // template 
- //   future_status
- //   wait_until(const chrono::time_point& abs_time) const;
-
- #include 
- #include 
- #include 
-
- enum class WorkerThreadState { Uninitialized, AllowedToRun, Exiting };
- typedef std::chrono::milliseconds ms;
-
- std::atomic thread_state(WorkerThreadState::Uninitialized);
-
- void set_worker_thread_state(WorkerThreadState state)
- {
- thread_state.store(state, std::memory_order_relaxed);
- }
-
- void wait_for_worker_thread_state(WorkerThreadState state)
- {
- while (thread_state.load(std::memory_order_relaxed) != state);
- }
-
- void func1(std::promise p)
- {
- wait_for_worker_thread_state(WorkerThreadState::AllowedToRun);
- p.set_value(3);
- set_worker_thread_state(WorkerThreadState::Exiting);
- }
-
- int j = 0;
-
- void func3(std::promise p)
- {
- wait_for_worker_thread_state(WorkerThreadState::AllowedToRun);
- j = 5;
- p.set_value(j);
- set_worker_thread_state(WorkerThreadState::Exiting);
- }
-
- void func5(std::promise p)
- {
- wait_for_worker_thread_state(WorkerThreadState::AllowedToRun);
- p.set_value();
- set_worker_thread_state(WorkerThreadState::Exiting);
- }
-
- int main()
- {
- typedef std::chrono::high_resolution_clock Clock;
- {
- typedef int T;
- std::promise p;
- std::shared_future f = p.get_future();
- std::thread(func1, std::move(p)).detach();
- assert(f.valid());
- assert(f.wait_until(Clock::now() + ms(10)) == 
std::future_status::timeout);
- assert(f.valid());
-
- // allow the worker thread to produce the result and wait until the 
worker is done
- set_worker_thread_state(WorkerThreadState::AllowedToRun);
- wait_for_worker_thread_state(WorkerThreadState::Exiting);
-
- assert(f.wait_until(Clock::now() + ms(10)) == 
std::future_status::ready);
- assert(f.valid());
- Clock::time_point t0 = Clock::now();
- f.wait();
- Clock::time_point t1 = Clock::now();
- assert(f.valid());
- assert(t1-t0 < ms(5));
- }
- {
- typedef int& T;
- std::promise p;
- std::shared_future f = p.get_future();
- std::thread(func3, std::move(p)).detach();
- assert(f.valid());
- assert(f.wait_until(Clock::now() + ms(10)) == 
std::future_status::timeout);
- assert(f.valid());
-
- // allow the worker thread to produce the result and wait until the 
worker is done
- set_worker_thread_state(WorkerThreadState::AllowedToRun);
- wait_for_worker_thread_state(WorkerThreadState::Exiting);
-
- assert(f.wait_until(Clock::now() + ms(10)) == 
std::future_status::ready);
- assert(f.valid());
- Clock::time_point t0 = Clock::now();
- f.wait();
- Clock::time_point t1 = Clock::now();
- assert(f.valid());
- assert(t1-t0 < ms(5));
- }
- {
- typedef void T;
- std::promise p;
- std::shared_future f = p.get_future();
- std::thread(func5, std::move(p)).detach();
- assert(f.valid());
- assert(f.wait_until(Clock::now() + ms(10)) == 
std::future_status::timeout);
- assert(f.valid());
-
- // allow the worker thread to produce the result and wait until the 
worker is done
- set_worker_thread_state(WorkerThreadState::AllowedToRun);
- wait_for_worker_thread_state(WorkerThreadState::Exiting);
-
- assert(f.wait_until(Clock::now() + ms(10)) == 
std::future_status::ready);
- assert(f.valid());
- Clock::time_point t0 = Clo

[libcxx] r309468 - [libcxx] [test] Change comments to say C++ instead of c++. NFC.

2017-07-28 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Fri Jul 28 17:55:35 2017
New Revision: 309468

URL: http://llvm.org/viewvc/llvm-project?rev=309468&view=rev
Log:
[libcxx] [test] Change comments to say C++ instead of c++. NFC.

This makes them consistent (many comments already used uppercase).

The special REQUIRES, UNSUPPORTED, and XFAIL comments are excluded from this 
change.

Modified:
libcxx/trunk/test/std/algorithms/alg.nonmodifying/mismatch/mismatch.pass.cpp

libcxx/trunk/test/std/algorithms/alg.nonmodifying/mismatch/mismatch_pred.pass.cpp

libcxx/trunk/test/std/containers/sequences/deque/deque.special/swap_noexcept.pass.cpp

libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.spec/swap_noexcept.pass.cpp

libcxx/trunk/test/std/containers/sequences/list/list.special/swap_noexcept.pass.cpp

libcxx/trunk/test/std/containers/sequences/vector.bool/swap_noexcept.pass.cpp

libcxx/trunk/test/std/containers/sequences/vector/vector.special/swap_noexcept.pass.cpp

libcxx/trunk/test/std/experimental/language.support/support.coroutines/end.to.end/fullexpr-dtor.pass.cpp

libcxx/trunk/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.cons/default.pass.cpp

libcxx/trunk/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.cons/iter.pass.cpp

libcxx/trunk/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.cons/reverse_iterator.pass.cpp

libcxx/trunk/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.make/make_reverse_iterator.pass.cpp

libcxx/trunk/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op!=/test.pass.cpp

libcxx/trunk/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op++/post.pass.cpp

libcxx/trunk/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op++/pre.pass.cpp

libcxx/trunk/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op+/difference_type.pass.cpp

libcxx/trunk/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op-/difference_type.pass.cpp

libcxx/trunk/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op.star/op_star.pass.cpp

libcxx/trunk/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op=/reverse_iterator.pass.cpp

libcxx/trunk/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.op==/test.pass.cpp

libcxx/trunk/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opdiff/test.pass.cpp

libcxx/trunk/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opgt/test.pass.cpp

libcxx/trunk/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.opgt=/test.pass.cpp

libcxx/trunk/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.oplt/test.pass.cpp

libcxx/trunk/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.ops/reverse.iter.oplt=/test.pass.cpp

libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array14.pass.cpp

libcxx/trunk/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete14.pass.cpp
libcxx/trunk/test/std/language.support/support.types/nullptr_t.pass.cpp

libcxx/trunk/test/std/strings/basic.string/string.nonmembers/string.special/swap_noexcept.pass.cpp
libcxx/trunk/test/std/utilities/function.objects/unord.hash/pointer.pass.cpp

libcxx/trunk/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/move_convert.single.pass.cpp

libcxx/trunk/test/std/utilities/time/time.duration/time.duration.arithmetic/op_++.pass.cpp

libcxx/trunk/test/std/utilities/time/time.duration/time.duration.arithmetic/op_++int.pass.cpp

libcxx/trunk/test/std/utilities/time/time.duration/time.duration.arithmetic/op_+=.pass.cpp

Modified: 
libcxx/trunk/test/std/algorithms/alg.nonmodifying/mismatch/mismatch.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.nonmodifying/mismatch/mismatch.pass.cpp?rev=309468&r1=309467&r2=309468&view=diff
==
--- 
libcxx/trunk/test/std/algorithms/alg.nonmodifying/mismatch/mismatch.pass.cpp 
(original)
+++ 
libcxx/trunk/test/std/algorithms/alg.nonmodifying/mismatch/mismatch.pass.cpp 
Fri Jul 28 17:55:35 2017
@@ -26,7 +26,7 @@ int main()
 int ia[] = {0, 1, 2, 2, 0, 1, 2, 3};
 const unsigned sa = sizeof(ia)/sizeof(ia[0]);
 int ib[] = {0, 1, 2, 3, 0, 1, 2, 3};
-const unsigned sb = sizeof(ib)/sizeof(ib[0]); ((void)sb); // unused in 
c++11
+const unsigned sb = sizeof(ib)/sizeof(ib[0]); ((void)sb); // unused in 
C++11
 
 t

[libcxx] r310155 - [libcxx] [test] Consistently list "c++98, c++03" in chronological order. NFC.

2017-08-04 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Fri Aug  4 17:44:19 2017
New Revision: 310155

URL: http://llvm.org/viewvc/llvm-project?rev=310155&view=rev
Log:
[libcxx] [test] Consistently list "c++98, c++03" in chronological order. NFC.

Modified:
libcxx/trunk/test/std/iterators/iterator.range/begin-end.pass.cpp

libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/default.pass.cpp

libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/lock.pass.cpp

libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/lock_shared.pass.cpp

libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/try_lock.pass.cpp

libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/try_lock_shared.pass.cpp

libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/default.pass.cpp

libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/lock.pass.cpp

libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/lock_shared.pass.cpp

libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock.pass.cpp

libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_for.pass.cpp

libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_shared.pass.cpp

libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_shared_for.pass.cpp

libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_shared_until.pass.cpp

libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_until.pass.cpp

libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_until_deadlock_bug.pass.cpp

Modified: libcxx/trunk/test/std/iterators/iterator.range/begin-end.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/iterators/iterator.range/begin-end.pass.cpp?rev=310155&r1=310154&r2=310155&view=diff
==
--- libcxx/trunk/test/std/iterators/iterator.range/begin-end.pass.cpp (original)
+++ libcxx/trunk/test/std/iterators/iterator.range/begin-end.pass.cpp Fri Aug  
4 17:44:19 2017
@@ -7,7 +7,7 @@
 //
 
//===--===//
 
-// XFAIL: c++03, c++98
+// XFAIL: c++98, c++03
 
 // 
 // template  constexpr auto begin(C& c) -> decltype(c.begin());

Modified: 
libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/default.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/default.pass.cpp?rev=310155&r1=310154&r2=310155&view=diff
==
--- 
libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/default.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/default.pass.cpp
 Fri Aug  4 17:44:19 2017
@@ -8,7 +8,7 @@
 
//===--===//
 //
 // UNSUPPORTED: libcpp-has-no-threads
-// UNSUPPORTED: c++03, c++98, c++11, c++14
+// UNSUPPORTED: c++98, c++03, c++11, c++14
 
 // 
 

Modified: 
libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/lock.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/lock.pass.cpp?rev=310155&r1=310154&r2=310155&view=diff
==
--- 
libcxx/trunk/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/threa

[libcxx] r310157 - [libcxx] [test] Untabify stringstream.cons/string.pass.cpp. NFC.

2017-08-04 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Fri Aug  4 17:44:27 2017
New Revision: 310157

URL: http://llvm.org/viewvc/llvm-project?rev=310157&view=rev
Log:
[libcxx] [test] Untabify stringstream.cons/string.pass.cpp. NFC.

Modified:

libcxx/trunk/test/std/input.output/string.streams/stringstream.cons/string.pass.cpp

Modified: 
libcxx/trunk/test/std/input.output/string.streams/stringstream.cons/string.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/input.output/string.streams/stringstream.cons/string.pass.cpp?rev=310157&r1=310156&r2=310157&view=diff
==
--- 
libcxx/trunk/test/std/input.output/string.streams/stringstream.cons/string.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/input.output/string.streams/stringstream.cons/string.pass.cpp
 Fri Aug  4 17:44:27 2017
@@ -57,12 +57,12 @@ int main()
 assert(ss.str() == L"456 1236 ");
 }
 { // This is https://bugs.llvm.org/show_bug.cgi?id=33727
-   typedef std::basic_string   , 
NoDefaultAllocator > S;
-   typedef std::basic_stringbuf, 
NoDefaultAllocator > SB;
+typedef std::basic_string   , 
NoDefaultAllocator > S;
+typedef std::basic_stringbuf, 
NoDefaultAllocator > SB;
 
-   S s(NoDefaultAllocator(1));
-   SB sb(s);
-   //  This test is not required by the standard, but *where else* 
could it get the allocator?
-   assert(sb.str().get_allocator() == s.get_allocator());
+S s(NoDefaultAllocator(1));
+SB sb(s);
+//  This test is not required by the standard, but *where else* could it 
get the allocator?
+assert(sb.str().get_allocator() == s.get_allocator());
 }
 }


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r310156 - [libcxx] [test] Fix URLs in comments and make them HTTPS. NFC.

2017-08-04 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Fri Aug  4 17:44:24 2017
New Revision: 310156

URL: http://llvm.org/viewvc/llvm-project?rev=310156&view=rev
Log:
[libcxx] [test] Fix URLs in comments and make them HTTPS. NFC.

Modified:

libcxx/trunk/test/libcxx/thread/thread.condition/PR30202_notify_from_pthread_created_thread.pass.cpp
libcxx/trunk/test/std/re/re.iter/re.regiter/re.regiter.incr/post.pass.cpp
libcxx/trunk/test/std/thread/futures/futures.async/async_race.pass.cpp
libcxx/trunk/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp

libcxx/trunk/test/std/utilities/function.objects/unord.hash/non_enum.pass.cpp

libcxx/trunk/test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp
libcxx/trunk/test/std/utilities/tuple/tuple.general/tuple.smartptr.pass.cpp
libcxx/trunk/test/std/utilities/variant/variant.visit/visit.pass.cpp
libcxx/trunk/test/support/platform_support.h

Modified: 
libcxx/trunk/test/libcxx/thread/thread.condition/PR30202_notify_from_pthread_created_thread.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/thread/thread.condition/PR30202_notify_from_pthread_created_thread.pass.cpp?rev=310156&r1=310155&r2=310156&view=diff
==
--- 
libcxx/trunk/test/libcxx/thread/thread.condition/PR30202_notify_from_pthread_created_thread.pass.cpp
 (original)
+++ 
libcxx/trunk/test/libcxx/thread/thread.condition/PR30202_notify_from_pthread_created_thread.pass.cpp
 Fri Aug  4 17:44:24 2017
@@ -20,7 +20,7 @@
 //   notify_all_at_thread_exit(condition_variable& cond, unique_lock 
lk);
 
 // Test that this function works with threads that were not created by
-// std::thread. See http://llvm.org/PR30202.
+// std::thread. See: https://bugs.llvm.org/show_bug.cgi?id=30202
 
 
 #include 

Modified: 
libcxx/trunk/test/std/re/re.iter/re.regiter/re.regiter.incr/post.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/re/re.iter/re.regiter/re.regiter.incr/post.pass.cpp?rev=310156&r1=310155&r2=310156&view=diff
==
--- libcxx/trunk/test/std/re/re.iter/re.regiter/re.regiter.incr/post.pass.cpp 
(original)
+++ libcxx/trunk/test/std/re/re.iter/re.regiter/re.regiter.incr/post.pass.cpp 
Fri Aug  4 17:44:24 2017
@@ -95,7 +95,7 @@ int main()
 assert((*i2).position() == 0);
 assert((*i2).str() == "555-1234");
 }
-{ // http://llvm.org/PR33681
+{ // https://bugs.llvm.org/show_bug.cgi?id=33681
 std::regex rex(".*");
 const char foo[] = "foo";
 //  The -1 is because we don't want the implicit null from the array.

Modified: libcxx/trunk/test/std/thread/futures/futures.async/async_race.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.async/async_race.pass.cpp?rev=310156&r1=310155&r2=310156&view=diff
==
--- libcxx/trunk/test/std/thread/futures/futures.async/async_race.pass.cpp 
(original)
+++ libcxx/trunk/test/std/thread/futures/futures.async/async_race.pass.cpp Fri 
Aug  4 17:44:24 2017
@@ -21,7 +21,7 @@
 // async(launch policy, F&& f, Args&&... args);
 
 // This test is designed to cause and allow TSAN to detect the race condition
-// reported in PR23293. (http://llvm.org/PR23293).
+// reported in PR23293: https://bugs.llvm.org/show_bug.cgi?id=23293
 
 #include 
 #include 

Modified: 
libcxx/trunk/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp?rev=310156&r1=310155&r2=310156&view=diff
==
--- 
libcxx/trunk/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp 
(original)
+++ 
libcxx/trunk/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp 
Fri Aug  4 17:44:24 2017
@@ -587,7 +587,7 @@ void call_operator_noexcept_test()
 }
 
 void test_lwg2767() {
-// See http://wg21.link/LWG2767
+// See https://cplusplus.github.io/LWG/lwg-defects.html#2767
 struct Abstract { virtual void f() const = 0; };
 struct Derived : public Abstract { void f() const {} };
 struct F { bool operator()(Abstract&&) { return false; } };

Modified: 
libcxx/trunk/test/std/utilities/function.objects/unord.hash/non_enum.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/unord.hash/non_enum.pass.cpp?rev=310156&r1=310155&r2=310156&view=diff
==
--- 
libcxx/trunk/test/std/utilities/function.objects/unord.hash/non_enum.pass.cpp 
(original)
+++ 
libcxx/trunk/test/std/utilities/function.objects/unord.hash/non_enum.pass.cpp 
Fri Aug  4 17:44:24 2017
@@ -13,7 +13,7 @@
 
 //  Hashing a str

[libcxx] r310758 - [libcxx] [test] Rename _Tp to T. NFCI.

2017-08-11 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Fri Aug 11 13:53:53 2017
New Revision: 310758

URL: http://llvm.org/viewvc/llvm-project?rev=310758&view=rev
Log:
[libcxx] [test] Rename _Tp to T. NFCI.

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

Modified:

libcxx/trunk/test/std/iterators/iterator.primitives/iterator.traits/empty.pass.cpp

libcxx/trunk/test/std/language.support/support.limits/limits/numeric.limits.members/const_data_members.pass.cpp

libcxx/trunk/test/std/localization/locale.categories/category.ctype/ctype_base.pass.cpp

libcxx/trunk/test/std/localization/locale.categories/category.monetary/locale.moneypunct/types.pass.cpp

libcxx/trunk/test/std/localization/locales/locale/locale.types/locale.category/category.pass.cpp

libcxx/trunk/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp

libcxx/trunk/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop.pass.cpp

libcxx/trunk/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop_init.pass.cpp

libcxx/trunk/test/std/numerics/numeric.ops/transform.reduce/transform_reduce_iter_iter_init_bop_uop.pass.cpp

libcxx/trunk/test/std/numerics/rand/rand.adapt/rand.adapt.disc/values.pass.cpp

libcxx/trunk/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/values.pass.cpp
libcxx/trunk/test/std/numerics/rand/rand.eng/rand.eng.lcong/values.pass.cpp
libcxx/trunk/test/std/numerics/rand/rand.eng/rand.eng.mers/values.pass.cpp
libcxx/trunk/test/std/numerics/rand/rand.eng/rand.eng.sub/values.pass.cpp
libcxx/trunk/test/std/re/re.regex/re.regex.const/constants.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

libcxx/trunk/test/std/utilities/time/time.clock/time.clock.hires/consistency.pass.cpp

libcxx/trunk/test/std/utilities/time/time.clock/time.clock.steady/consistency.pass.cpp

libcxx/trunk/test/std/utilities/time/time.clock/time.clock.system/consistency.pass.cpp
libcxx/trunk/test/support/any_helpers.h
libcxx/trunk/test/support/experimental_any_helpers.h

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=310758&r1=310757&r2=310758&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:53:53 2017
@@ -20,7 +20,7 @@ struct not_an_iterator
 {
 };
 
-template 
+template 
 struct has_value_type
 {
 private:
@@ -28,7 +28,7 @@ private:
 template  static two test(...);
 template  static char test(typename _Up::value_type* = 0);
 public:
-static const bool value = sizeof(test<_Tp>(0)) == 1;
+static const bool value = sizeof(test(0)) == 1;
 };
 
 int main()

Modified: 
libcxx/trunk/test/std/language.support/support.limits/limits/numeric.limits.members/const_data_members.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/language.support/support.limits/limits/numeric.limits.members/const_data_members.pass.cpp?rev=310758&r1=310757&r2=310758&view=diff
==
--- 
libcxx/trunk/test/std/language.support/support.limits/limits/numeric.limits.members/const_data_members.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/language.support/support.limits/limits/numeric.limits.members/const_data_members.pass.cpp
 Fri Aug 11 13:53:53 2017
@@ -37,8 +37,8 @@
 round_style
 */
 
-template 
-void test(const _Tp &) {}
+template 
+void test(const T &) {}
 
 #define TEST_NUMERIC_LIMITS(type) \
   test(std::numeric_limits::is_specialized); \

Modified: 
libcxx/trunk/test/std/localization/locale.categories/category.ctype/ctype_base.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/localization/locale.categories/category.ctype/ctype_base.pass.cpp?rev=310758&r1=310757&r2=310758&view=diff
==
--- 
libcxx/trunk/test/std/localization/locale.categories/category.ctype/ctype_base.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/localization/locale.categories/category.ctype/ctype_base.pass.cpp
 Fri Aug 11 13:53:53 2017
@@ -36,8 +36,8 @@
 #include 
 #include 
 
-template 
-void test(const _Tp &) {}
+template 
+void test(const T &) {}
 
 int main()
 {


[libcxx] r310759 - [libcxx] [test] Rename __c to ch. NFCI.

2017-08-11 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Fri Aug 11 13:54:01 2017
New Revision: 310759

URL: http://llvm.org/viewvc/llvm-project?rev=310759&view=rev
Log:
[libcxx] [test] Rename __c to ch. NFCI.

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

Modified:

libcxx/trunk/test/std/input.output/iostream.format/ext.manip/put_money.pass.cpp

libcxx/trunk/test/std/input.output/iostream.format/ext.manip/put_time.pass.cpp

libcxx/trunk/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/streambuf.pass.cpp

libcxx/trunk/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_streambuf.pass.cpp

libcxx/trunk/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_streambuf_chart.pass.cpp

libcxx/trunk/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/bool.pass.cpp

libcxx/trunk/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/double.pass.cpp

libcxx/trunk/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/float.pass.cpp

libcxx/trunk/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/int.pass.cpp

libcxx/trunk/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/long.pass.cpp

libcxx/trunk/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/long_double.pass.cpp

libcxx/trunk/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/long_long.pass.cpp

libcxx/trunk/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/pointer.pass.cpp

libcxx/trunk/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/short.pass.cpp

libcxx/trunk/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_int.pass.cpp

libcxx/trunk/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_long.pass.cpp

libcxx/trunk/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_long_long.pass.cpp

libcxx/trunk/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/unsigned_short.pass.cpp

libcxx/trunk/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/CharT.pass.cpp

libcxx/trunk/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/CharT_pointer.pass.cpp

libcxx/trunk/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char.pass.cpp

libcxx/trunk/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char_pointer.pass.cpp

libcxx/trunk/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char_to_wide.pass.cpp

libcxx/trunk/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/char_to_wide_pointer.pass.cpp

libcxx/trunk/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/signed_char.pass.cpp

libcxx/trunk/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/signed_char_pointer.pass.cpp

libcxx/trunk/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/unsigned_char.pass.cpp

libcxx/trunk/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.character/unsigned_char_pointer.pass.cpp

libcxx/trunk/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/basic_ios.pass.cpp

libcxx/trunk/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/ios_base.pass.cpp

libcxx/trunk/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/ostream.pass.cpp

libcxx/trunk/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/streambuf.pass.cpp

libcxx/trunk/test/std/input.output/iostream.format/output.streams/ostream.manip/endl.pass.cpp

libcxx/trunk/test/std/input.output/iostream.format/output.streams/ostream.manip/ends.pass.cpp

libcxx/trunk/test/std/input.output/iostream.format/output.streams/ostream.rvalue/CharT_pointer.pass.cpp

libcxx/trunk/test/std/input.output/iostream.format/output.streams/ostream.unformatted/put.pass.cpp

libcxx/trunk/test/std/input.output/iostream.format/output.streams/ostream.unformatted/write.pa

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

2017-08-11 Thread Stephan T. Lavavej via cfe-commits
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  static two test(...);
-template  static char test(typename _Up::value_type* = 0);
+template  static two test(...);
+template  static char test(typename U::value_type* = 0);
 public:
 static const bool value = sizeof(test(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 
 struct is_transparent
 {
 private:
-struct __two {char __lx; char __lxx;};
-template  static __two __test(...);
-template  static char __test(typename _Up::is_transparent* = 0);
+struct two {char lx; char lxx;};
+template  static two test(...);
+template  static char test(typename U::is_transparent* = 0);
 public:
-static const bool value = sizeof(__test(0)) == 1;
+static const bool value = sizeof(test(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 
 struct is_transparent
 {
 private:
-struct __two {char __lx; char __lxx;};
-template  static __two __test(...);
-template  static char __test(typename _Up::is_transparent* = 0);
+struct two {char lx; char lxx;};
+template  static two test(...);
+template  static char test(typename U::is_transparent* = 0);
 public:
-static const bool value = sizeof(__test(0)) == 1;
+static const bool value = sizeof(test(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 
 struct is_transparent
 {
 private:
-struct __two {char __lx; char __lxx;};
-template  static __two __test(...);
-template  static char __test(typename _Up::is_transparent* = 0);
+struct two {char lx; char lxx;};
+template  static two test(...);
+template  static char test(typename U::is_transparent* = 0);
 public:
-static const bool value = sizeof(__test(0)) == 1;
+static const bool value = sizeof(test(0)) == 1;
 };
 
 

Modified: 
libcxx/trunk/test/std/utiliti

[libcxx] r310760 - [libcxx] [test] Rename __x to x. NFCI.

2017-08-11 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Fri Aug 11 13:54:06 2017
New Revision: 310760

URL: http://llvm.org/viewvc/llvm-project?rev=310760&view=rev
Log:
[libcxx] [test] Rename __x to x. NFCI.

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

Modified:

libcxx/trunk/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp

libcxx/trunk/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop.pass.cpp

libcxx/trunk/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop_init.pass.cpp

libcxx/trunk/test/std/numerics/numeric.ops/transform.reduce/transform_reduce_iter_iter_init_bop_uop.pass.cpp

Modified: 
libcxx/trunk/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp?rev=310760&r1=310759&r2=310760&view=diff
==
--- 
libcxx/trunk/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/numerics/numeric.ops/transform.exclusive.scan/transform_exclusive_scan_init_bop_uop.pass.cpp
 Fri Aug 11 13:54:06 2017
@@ -28,17 +28,17 @@
 template 
 struct identity : std::unary_function
 {
-constexpr const T& operator()(const T& __x) const { return __x;}
+constexpr const T& operator()(const T& x) const { return x;}
 };
 
 template <>
 struct identity
 {
 template 
-constexpr auto operator()(T&& __x) const
-_NOEXCEPT_(noexcept(_VSTD::forward(__x)))
--> decltype(_VSTD::forward(__x))
-{ return_VSTD::forward(__x); }
+constexpr auto operator()(T&& x) const
+_NOEXCEPT_(noexcept(_VSTD::forward(x)))
+-> decltype(_VSTD::forward(x))
+{ return_VSTD::forward(x); }
 };
 
 template 

Modified: 
libcxx/trunk/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop.pass.cpp?rev=310760&r1=310759&r2=310760&view=diff
==
--- 
libcxx/trunk/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop.pass.cpp
 Fri Aug 11 13:54:06 2017
@@ -1,3 +1,4 @@
+
 
//===--===//
 //
 // The LLVM Compiler Infrastructure
@@ -28,17 +29,17 @@
 template 
 struct identity : std::unary_function
 {
-constexpr const T& operator()(const T& __x) const { return __x;}
+constexpr const T& operator()(const T& x) const { return x;}
 };
 
 template <>
 struct identity
 {
 template 
-constexpr auto operator()(T&& __x) const
-_NOEXCEPT_(noexcept(_VSTD::forward(__x)))
--> decltype(_VSTD::forward(__x))
-{ return_VSTD::forward(__x); }
+constexpr auto operator()(T&& x) const
+_NOEXCEPT_(noexcept(_VSTD::forward(x)))
+-> decltype(_VSTD::forward(x))
+{ return_VSTD::forward(x); }
 };
 
 template 

Modified: 
libcxx/trunk/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop_init.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop_init.pass.cpp?rev=310760&r1=310759&r2=310760&view=diff
==
--- 
libcxx/trunk/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop_init.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/numerics/numeric.ops/transform.inclusive.scan/transform_inclusive_scan_bop_uop_init.pass.cpp
 Fri Aug 11 13:54:06 2017
@@ -28,17 +28,17 @@
 template 
 struct identity : std::unary_function
 {
-constexpr const T& operator()(const T& __x) const { return __x;}
+constexpr const T& operator()(const T& x) const { return x;}
 };
 
 template <>
 struct identity
 {
 template 
-constexpr auto operator()(T&& __x) const
-_NOEXCEPT_(noexcept(_VSTD::forward(__x)))
--> decltype(_VSTD::forward(__x))
-{ return_VSTD::forward(__x); }
+constexpr auto operator()(T&& x) const
+_NOEXCEPT_(noexcept(_VSTD::forward(x)))
+-> decltype(_VSTD::forward(x))
+{ return_VSTD::forward(x); }
 };
 
 template 

Modified: 
libcxx/trunk/test/std/numerics/numeric.ops/transform.reduce/transform_reduce_iter_iter_init_bop_uop.pass.cp

r311391 - [Driver] Recognize DevDiv internal builds of MSVC, with a different directory structure.

2017-08-21 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Mon Aug 21 15:19:33 2017
New Revision: 311391

URL: http://llvm.org/viewvc/llvm-project?rev=311391&view=rev
Log:
[Driver] Recognize DevDiv internal builds of MSVC, with a different directory 
structure.

This is a reasonably non-intrusive change, which I've verified
works for both x86 and x64 DevDiv-internal builds.

The idea is to change `bool IsVS2017OrNewer` into a 3-state
`ToolsetLayout VSLayout`. Either a build is DevDiv-internal,
released VS 2017 or newer, or released VS 2015 or older. When looking at
the directory structure, if instead of `"VC"` we see `"x86ret"`, `"x86chk"`,
`"amd64ret"`, or `"amd64chk"`, we recognize this as a DevDiv-internal build.

After we get past the directory structure validation, we use this knowledge
to regenerate paths appropriately. `llvmArchToDevDivInternalArch()` knows how
we use `"i386"` subdirectories, and `MSVCToolChain::getSubDirectoryPath()`
uses that. It also knows that DevDiv-internal builds have an `"inc"`
subdirectory instead of `"include"`.

This may still not be the "right" fix in any sense, but I believe that it's
non-intrusive in the sense that if the special directory names aren't found,
no codepaths are affected. (`ToolsetLayout::OlderVS` and
`ToolsetLayout::VS2017OrNewer` correspond to `IsVS2017OrNewer` being `false`
or `true`, respectively.) I searched for all references to `IsVS2017OrNewer`,
which are places where Clang cares about VS's directory structure, and the
only one that isn't being patched is some logic to deal with
cross-compilation. I'm fine with that not working for DevDiv-internal builds
for the moment (we typically test the native compilers), so I added a comment.

Fixes D36860.

Modified:
cfe/trunk/lib/Driver/ToolChains/MSVC.cpp
cfe/trunk/lib/Driver/ToolChains/MSVC.h

Modified: cfe/trunk/lib/Driver/ToolChains/MSVC.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/MSVC.cpp?rev=311391&r1=311390&r2=311391&view=diff
==
--- cfe/trunk/lib/Driver/ToolChains/MSVC.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/MSVC.cpp Mon Aug 21 15:19:33 2017
@@ -76,7 +76,7 @@ static bool getSystemRegistryString(cons
 
 // Check various environment variables to try and find a toolchain.
 static bool findVCToolChainViaEnvironment(std::string &Path,
-  bool &IsVS2017OrNewer) {
+  MSVCToolChain::ToolsetLayout 
&VSLayout) {
   // These variables are typically set by vcvarsall.bat
   // when launching a developer command prompt.
   if (llvm::Optional VCToolsInstallDir =
@@ -84,7 +84,7 @@ static bool findVCToolChainViaEnvironmen
 // This is only set by newer Visual Studios, and it leads straight to
 // the toolchain directory.
 Path = std::move(*VCToolsInstallDir);
-IsVS2017OrNewer = true;
+VSLayout = MSVCToolChain::ToolsetLayout::VS2017OrNewer;
 return true;
   }
   if (llvm::Optional VCInstallDir =
@@ -94,7 +94,7 @@ static bool findVCToolChainViaEnvironmen
 // so this check has to appear second.
 // In older Visual Studios, the VC directory is the toolchain.
 Path = std::move(*VCInstallDir);
-IsVS2017OrNewer = false;
+VSLayout = MSVCToolChain::ToolsetLayout::OlderVS;
 return true;
   }
 
@@ -134,9 +134,16 @@ static bool findVCToolChainViaEnvironmen
   }
   if (IsBin) {
 llvm::StringRef ParentPath = llvm::sys::path::parent_path(TestPath);
-if (llvm::sys::path::filename(ParentPath) == "VC") {
+llvm::StringRef ParentFilename = llvm::sys::path::filename(ParentPath);
+if (ParentFilename == "VC") {
   Path = ParentPath;
-  IsVS2017OrNewer = false;
+  VSLayout = MSVCToolChain::ToolsetLayout::OlderVS;
+  return true;
+}
+if (ParentFilename == "x86ret" || ParentFilename == "x86chk"
+  || ParentFilename == "amd64ret" || ParentFilename == "amd64chk") {
+  Path = ParentPath;
+  VSLayout = MSVCToolChain::ToolsetLayout::DevDivInternal;
   return true;
 }
 
@@ -165,7 +172,7 @@ static bool findVCToolChainViaEnvironmen
   ToolChainPath = llvm::sys::path::parent_path(ToolChainPath);
 
 Path = ToolChainPath;
-IsVS2017OrNewer = true;
+VSLayout = MSVCToolChain::ToolsetLayout::VS2017OrNewer;
 return true;
   }
 
@@ -181,7 +188,7 @@ static bool findVCToolChainViaEnvironmen
 // This is the preferred way to discover new Visual Studios, as they're no
 // longer listed in the registry.
 static bool findVCToolChainViaSetupConfig(std::string &Path,
-  bool &IsVS2017OrNewer) {
+  MSVCToolChain::ToolsetLayout 
&VSLayout) {
 #if !defined(USE_MSVC_SETUP_API)
   return false;
 #else
@@ -263,7 +270,7 @@ static bool findVCToolChainViaSetupConfi
 return false;
 
   Path = ToolchainPath.st

[libcxx] r311705 - [libcxx] [test] Update for C++17 feature removals.

2017-08-24 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Thu Aug 24 14:24:08 2017
New Revision: 311705

URL: http://llvm.org/viewvc/llvm-project?rev=311705&view=rev
Log:
[libcxx] [test] Update for C++17 feature removals.

test/std/containers/Emplaceable.h
test/std/containers/NotConstructible.h
test/support/counting_predicates.hpp
Replace unary_function/binary_function inheritance with typedefs.

test/std/depr/depr.function.objects/depr.base/binary_function.pass.cpp
test/std/depr/depr.function.objects/depr.base/unary_function.pass.cpp
test/std/utilities/function.objects/func.require/binary_function.pass.cpp
test/std/utilities/function.objects/func.require/unary_function.pass.cpp
Mark these tests as requiring 98/03/11/14 because 17 removed 
unary_function/binary_function.

test/std/thread/futures/futures.task/futures.task.members/ctor_func_alloc.pass.cpp
test/std/thread/futures/futures.task/futures.task.nonmembers/uses_allocator.pass.cpp
Mark these tests as requiring 11/14 because 17 removed packaged_task allocator 
support.

test/std/utilities/function.objects/func.wrap/func.wrap.func/derive_from.pass.cpp
This test doesn't need to be skipped in C++17 mode. Only the construction of
std::function from an allocator needs to be skipped in C++17 mode.

test/std/utilities/function.objects/refwrap/refwrap.access/conversion.pass.cpp
test/std/utilities/function.objects/refwrap/refwrap.assign/copy_assign.pass.cpp
test/std/utilities/function.objects/refwrap/refwrap.const/copy_ctor.pass.cpp
test/std/utilities/function.objects/refwrap/refwrap.const/type_ctor.pass.cpp
When testing these reference_wrapper features, unary_function inheritance is 
totally irrelevant.

test/std/utilities/function.objects/refwrap/weak_result.pass.cpp
Define and use my_unary_function/my_binary_function to test the weak result 
type machinery
(which is still present in C++17, although deprecated).

test/support/msvc_stdlib_force_include.hpp
Now we can test C++17 strictly, without enabling removed features.

Fixes D36503.

Modified:
libcxx/trunk/test/std/containers/Emplaceable.h
libcxx/trunk/test/std/containers/NotConstructible.h

libcxx/trunk/test/std/depr/depr.function.objects/depr.base/binary_function.pass.cpp

libcxx/trunk/test/std/depr/depr.function.objects/depr.base/unary_function.pass.cpp

libcxx/trunk/test/std/thread/futures/futures.task/futures.task.members/ctor_func_alloc.pass.cpp

libcxx/trunk/test/std/thread/futures/futures.task/futures.task.nonmembers/uses_allocator.pass.cpp

libcxx/trunk/test/std/utilities/function.objects/func.require/binary_function.pass.cpp

libcxx/trunk/test/std/utilities/function.objects/func.require/unary_function.pass.cpp

libcxx/trunk/test/std/utilities/function.objects/func.wrap/func.wrap.func/derive_from.pass.cpp

libcxx/trunk/test/std/utilities/function.objects/refwrap/refwrap.access/conversion.pass.cpp

libcxx/trunk/test/std/utilities/function.objects/refwrap/refwrap.assign/copy_assign.pass.cpp

libcxx/trunk/test/std/utilities/function.objects/refwrap/refwrap.const/copy_ctor.pass.cpp

libcxx/trunk/test/std/utilities/function.objects/refwrap/refwrap.const/type_ctor.pass.cpp

libcxx/trunk/test/std/utilities/function.objects/refwrap/weak_result.pass.cpp
libcxx/trunk/test/support/counting_predicates.hpp
libcxx/trunk/test/support/msvc_stdlib_force_include.hpp

Modified: libcxx/trunk/test/std/containers/Emplaceable.h
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/Emplaceable.h?rev=311705&r1=311704&r2=311705&view=diff
==
--- libcxx/trunk/test/std/containers/Emplaceable.h (original)
+++ libcxx/trunk/test/std/containers/Emplaceable.h Thu Aug 24 14:24:08 2017
@@ -45,8 +45,10 @@ namespace std {
 
 template <>
 struct hash
-: public std::unary_function
 {
+typedef Emplaceable argument_type;
+typedef std::size_t result_type;
+
 std::size_t operator()(const Emplaceable& x) const {return x.get();}
 };
 

Modified: libcxx/trunk/test/std/containers/NotConstructible.h
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/NotConstructible.h?rev=311705&r1=311704&r2=311705&view=diff
==
--- libcxx/trunk/test/std/containers/NotConstructible.h (original)
+++ libcxx/trunk/test/std/containers/NotConstructible.h Thu Aug 24 14:24:08 2017
@@ -29,8 +29,10 @@ namespace std
 
 template <>
 struct hash
-: public std::unary_function
 {
+typedef NotConstructible argument_type;
+typedef std::size_t result_type;
+
 std::size_t operator()(const NotConstructible&) const {return 0;}
 };
 

Modified: 
libcxx/trunk/test/std/depr/depr.function.objects/depr.base/binary_function.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/depr/depr.function.objects/depr.base/binary_function.pass.cpp?rev=311705&r1=311704&r2=311705&view=diff
==

[clang] 3a7a224 - [www] More HTTPS and outdated link fixes.

2019-11-08 Thread Stephan T. Lavavej via cfe-commits

Author: Stephan T. Lavavej
Date: 2019-11-08T14:41:27-08:00
New Revision: 3a7a22445e806c08f80cf6d83d1760f7ff732ed0

URL: 
https://github.com/llvm/llvm-project/commit/3a7a22445e806c08f80cf6d83d1760f7ff732ed0
DIFF: 
https://github.com/llvm/llvm-project/commit/3a7a22445e806c08f80cf6d83d1760f7ff732ed0.diff

LOG: [www] More HTTPS and outdated link fixes.

Resolves D69981.

Added: 


Modified: 
clang/www/UniversalDriver.html
clang/www/analyzer/available_checks.html
llvm/docs/_templates/layout.html
polly/www/contributors.html
polly/www/index.html
polly/www/performance.html
polly/www/publications.html

Removed: 




diff  --git a/clang/www/UniversalDriver.html b/clang/www/UniversalDriver.html
index bd316e642dc5..a6759f0aa34c 100755
--- a/clang/www/UniversalDriver.html
+++ b/clang/www/UniversalDriver.html
@@ -64,7 +64,7 @@ Existing Solutions and Related Work
 problem by supporting -arch. Apple also provides a tool chain 
which
 supports https://en.wikipedia.org/wiki/Universal_binary";>universal
 binaries and object files which may include data for multiple
-architectures. See http://developer.apple.com/mac/library/technotes/tn2005/tn2137.html";>TN2137
+architectures. See https://developer.apple.com/library/archive/technotes/tn2005/tn2137.html";>TN2137
 for an example of how this is used.
 
   Many operating systems and environments solve the problem by installing
@@ -77,7 +77,7 @@ Existing Solutions and Related Work
 wiki page for their work to support the ARM EABI provide an interesting
 glimpse into how related issues impact the operating system 
distribution.
 
-  http://icculus.org/fatelf/";>FatELF is a proposal for 
bringing
+  https://icculus.org/fatelf/";>FatELF is a proposal for 
bringing
 Mac OS X like "Universal Binary" support to ELF based platforms.
 
 

diff  --git a/clang/www/analyzer/available_checks.html 
b/clang/www/analyzer/available_checks.html
index 2775743fb849..12e66f11b118 100644
--- a/clang/www/analyzer/available_checks.html
+++ b/clang/www/analyzer/available_checks.html
@@ -28,7 +28,7 @@ Available Checkers
 Writeups with examples of some of the bugs that the analyzer finds
 
 http://www.mobileorchard.com/bug-finding-with-clang-5-resources-to-get-you-started/";>Bug
 Finding With Clang: 5 Resources To Get You Started
-http://fruitstandsoftware.com/blog/index.php/2008/08/finding-memory-leaks-with-the-llvmclang-static-analyzer/#comment-2";>Finding
 Memory Leaks With The LLVM/Clang Static Analyzer
+https://fruitstandsoftware.mrrooni.com/blog/blog/2008/08/04/finding-memory-leaks-with-the-llvmclang-static-analyzer/";>Finding
 Memory Leaks With The LLVM/Clang Static Analyzer
 https://weblog.rogueamoeba.com/2008/07/14/the-clang-static-analyzer/";>Under
 the Microscope - The Clang Static Analyzer
 https://www.mikeash.com/pyblog/friday-qa-2009-03-06-using-the-clang-static-analyzer.html";>Mike
 Ash - Using the Clang Static Analyzer
 

diff  --git a/llvm/docs/_templates/layout.html 
b/llvm/docs/_templates/layout.html
index de5db5caf14e..45051a66fb39 100644
--- a/llvm/docs/_templates/layout.html
+++ b/llvm/docs/_templates/layout.html
@@ -8,6 +8,6 @@
 {% endblock %}
 
 {% block rootrellink %}
-  http://llvm.org/";>LLVM Home | 
+  https://llvm.org/";>LLVM Home | 
   Documentation»
 {% endblock %}

diff  --git a/polly/www/contributors.html b/polly/www/contributors.html
index de15d01f0fb5..a06daa9c1c3d 100644
--- a/polly/www/contributors.html
+++ b/polly/www/contributors.html
@@ -37,7 +37,7 @@ Tobias Grosser
 http://research.google.com/university/relations/fellowship_recipients.html";>
 Google Europe Fellowship in Efficient Computing).
 
-Website: http://www.grosser.es";>www.grosser.es
+Website: https://www.grosser.es";>www.grosser.es
 
 
 Andreas Simbürger
@@ -45,8 +45,8 @@ Andreas Simbürger
 Andreas works on the profiling infrastructure during his PhD at University of
 Passau.
 
-Website: http://www.infosun.fim.uni-passau.de/cl/staff/simbuerger/";>
-http://www.infosun.fim.uni-passau.de/cl/staff/simbuerger/
+Website: https://www.infosun.fim.uni-passau.de/cl/staff/simbuerger/";>
+https://www.infosun.fim.uni-passau.de/cl/staff/simbuerger/
 Hongbin Zheng
 Hongbin Zheng is one of the two Co-founders of Polly. He was funded as a
 Google Summer of Code Student 2010 and implemented parts of the Polly frontends

diff  --git a/polly/www/index.html b/polly/www/index.html
index f7eab7d8c887..ab1f0c9abe9c 100644
--- a/polly/www/index.html
+++ b/polly/www/index.html
@@ -115,7 +115,7 @@ AST Generation Paper published in TOPLAS
   program optimization.
 
 
-   http://www.grosser.es#pub-polyhedral-AST-generation";>
+   https://www.grosser.es#pub-polyhedral-AST-generation";>
Polyhedral AST generation is more than scanning polyhedra
 Tobias Grosser, Sven Verdoolaege, Albert Cohen
 ACM Transations on Programming Languages and Systems (TOPLAS), 37(4),
@@ -33

[libcxx] r328264 - [libcxx] [test] Strip trailing whitespace. NFC.

2018-03-22 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Thu Mar 22 15:59:02 2018
New Revision: 328264

URL: http://llvm.org/viewvc/llvm-project?rev=328264&view=rev
Log:
[libcxx] [test] Strip trailing whitespace. NFC.

Modified:

libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/clear_and_shrink_db1.pass.cpp
libcxx/trunk/test/std/language.support/support.types/max_align_t.pass.cpp

libcxx/trunk/test/std/utilities/memory/default.allocator/allocator.ctor.pass.cpp

Modified: 
libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/clear_and_shrink_db1.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/clear_and_shrink_db1.pass.cpp?rev=328264&r1=328263&r2=328264&view=diff
==
--- 
libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/clear_and_shrink_db1.pass.cpp
 (original)
+++ 
libcxx/trunk/test/libcxx/strings/basic.string/string.modifiers/clear_and_shrink_db1.pass.cpp
 Thu Mar 22 15:59:02 2018
@@ -25,12 +25,12 @@ int main()
 
 assert(l.__invariants());
 assert(s.__invariants());
-
+
 s.__clear_and_shrink();
 assert(s.__invariants());
 assert(s.size() == 0);
 
-{ 
+{
 std::string::size_type cap = l.capacity();
 l.__clear_and_shrink();
 assert(l.__invariants());

Modified: 
libcxx/trunk/test/std/language.support/support.types/max_align_t.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/language.support/support.types/max_align_t.pass.cpp?rev=328264&r1=328263&r2=328264&view=diff
==
--- libcxx/trunk/test/std/language.support/support.types/max_align_t.pass.cpp 
(original)
+++ libcxx/trunk/test/std/language.support/support.types/max_align_t.pass.cpp 
Thu Mar 22 15:59:02 2018
@@ -10,7 +10,7 @@
 #include 
 #include 
 
-// max_align_t is a trivial standard-layout type whose alignment requirement 
+// max_align_t is a trivial standard-layout type whose alignment requirement
 //   is at least as great as that of every scalar type
 
 #include 

Modified: 
libcxx/trunk/test/std/utilities/memory/default.allocator/allocator.ctor.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/memory/default.allocator/allocator.ctor.pass.cpp?rev=328264&r1=328263&r2=328264&view=diff
==
--- 
libcxx/trunk/test/std/utilities/memory/default.allocator/allocator.ctor.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/utilities/memory/default.allocator/allocator.ctor.pass.cpp
 Thu Mar 22 15:59:02 2018
@@ -46,5 +46,5 @@ int main()
 constexpr AL a3{a2};
 (void) a3;
 }
-
+
 }


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r289734 - [libcxx] [test] Fix MSVC x64 truncation warnings with 32-bit allocator size_type/difference_type.

2016-12-14 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Wed Dec 14 16:46:46 2016
New Revision: 289734

URL: http://llvm.org/viewvc/llvm-project?rev=289734&view=rev
Log:
[libcxx] [test] Fix MSVC x64 truncation warnings with 32-bit allocator 
size_type/difference_type.

test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_container_alloc.pass.cpp
test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_container_alloc.pass.cpp
Iterate with C::size_type because that's what operator[] takes.

test/std/containers/sequences/vector/contiguous.pass.cpp
test/std/strings/basic.string/string.require/contiguous.pass.cpp
Add static_cast because that's what the iterator's 
operator+ takes.

Fixes D2.

Modified:

libcxx/trunk/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_container_alloc.pass.cpp

libcxx/trunk/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_container_alloc.pass.cpp
libcxx/trunk/test/std/containers/sequences/vector/contiguous.pass.cpp

libcxx/trunk/test/std/strings/basic.string/string.require/contiguous.pass.cpp

Modified: 
libcxx/trunk/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_container_alloc.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_container_alloc.pass.cpp?rev=289734&r1=289733&r2=289734&view=diff
==
--- 
libcxx/trunk/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_container_alloc.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/containers/container.adaptors/queue/queue.cons.alloc/ctor_container_alloc.pass.cpp
 Wed Dec 14 16:46:46 2016
@@ -50,7 +50,7 @@ int main()
 test q(d, test_allocator(4));
 assert(q.get_allocator() == test_allocator(4));
 assert(q.size() == 5);
-for (std::size_t i = 0; i < d.size(); ++i)
+for (C::size_type i = 0; i < d.size(); ++i)
 {
 assert(q.front() == d[i]);
 q.pop();

Modified: 
libcxx/trunk/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_container_alloc.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_container_alloc.pass.cpp?rev=289734&r1=289733&r2=289734&view=diff
==
--- 
libcxx/trunk/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_container_alloc.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/containers/container.adaptors/stack/stack.cons.alloc/ctor_container_alloc.pass.cpp
 Wed Dec 14 16:46:46 2016
@@ -50,7 +50,7 @@ int main()
 test q(d, test_allocator(4));
 assert(q.get_allocator() == test_allocator(4));
 assert(q.size() == 5);
-for (std::size_t i = 0; i < d.size(); ++i)
+for (C::size_type i = 0; i < d.size(); ++i)
 {
 assert(q.top() == d[d.size() - i - 1]);
 q.pop();

Modified: libcxx/trunk/test/std/containers/sequences/vector/contiguous.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/vector/contiguous.pass.cpp?rev=289734&r1=289733&r2=289734&view=diff
==
--- libcxx/trunk/test/std/containers/sequences/vector/contiguous.pass.cpp 
(original)
+++ libcxx/trunk/test/std/containers/sequences/vector/contiguous.pass.cpp Wed 
Dec 14 16:46:46 2016
@@ -21,7 +21,7 @@ template 
 void test_contiguous ( const C &c )
 {
 for ( size_t i = 0; i < c.size(); ++i )
-assert ( *(c.begin() + i) == *(std::addressof(*c.begin()) + i));
+assert ( *(c.begin() + static_cast(i)) == 
*(std::addressof(*c.begin()) + i));
 }
 
 int main()

Modified: 
libcxx/trunk/test/std/strings/basic.string/string.require/contiguous.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.require/contiguous.pass.cpp?rev=289734&r1=289733&r2=289734&view=diff
==
--- 
libcxx/trunk/test/std/strings/basic.string/string.require/contiguous.pass.cpp 
(original)
+++ 
libcxx/trunk/test/std/strings/basic.string/string.require/contiguous.pass.cpp 
Wed Dec 14 16:46:46 2016
@@ -22,7 +22,7 @@ template 
 void test_contiguous ( const C &c )
 {
 for ( size_t i = 0; i < c.size(); ++i )
-assert ( *(c.begin() + i) == *(std::addressof(*c.begin()) + i));
+assert ( *(c.begin() + static_cast(i)) == 
*(std::addressof(*c.begin()) + i));
 }
 
 int main()


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r290921 - [libcxx] [test] Fix recently introduced warnings emitted by MSVC.

2017-01-03 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Tue Jan  3 18:53:31 2017
New Revision: 290921

URL: http://llvm.org/viewvc/llvm-project?rev=290921&view=rev
Log:
[libcxx] [test] Fix recently introduced warnings emitted by MSVC.

These tests were using malloc()'s return value without checking for null,
which MSVC's /analyze rightly warns about. Asserting that the pointer is
non-null both expresses the test's intention and silences the warning.

Fixes D27785.

Modified:

libcxx/trunk/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_const_lvalue_pair.pass.cpp

libcxx/trunk/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_piecewise.pass.cpp

libcxx/trunk/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_rvalue.pass.cpp

libcxx/trunk/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_values.pass.cpp

Modified: 
libcxx/trunk/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_const_lvalue_pair.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_const_lvalue_pair.pass.cpp?rev=290921&r1=290920&r2=290921&view=diff
==
--- 
libcxx/trunk/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_const_lvalue_pair.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_const_lvalue_pair.pass.cpp
 Tue Jan  3 18:53:31 2017
@@ -42,6 +42,7 @@ void test_no_inner_alloc()
 using SA = std::scoped_allocator_adaptor;
 static_assert(std::uses_allocator >::value, 
"");
 Pair * ptr = (Pair*)std::malloc(sizeof(Pair));
+assert(ptr != nullptr);
 Alloc CA(P);
 SA A(CA);
 const PairIn in(x, std::move(y));
@@ -68,6 +69,7 @@ void test_no_inner_alloc()
 using SA = std::scoped_allocator_adaptor;
 static_assert(std::uses_allocator >::value, 
"");
 Pair * ptr = (Pair*)std::malloc(sizeof(Pair));
+assert(ptr != nullptr);
 Alloc CA(P);
 SA A(CA);
 const PairIn in(x, y);
@@ -104,6 +106,7 @@ void test_with_inner_alloc()
 static_assert(!std::uses_allocator::value, "");
 static_assert(std::uses_allocator::value, "");
 Pair * ptr = (Pair*)std::malloc(sizeof(Pair));
+assert(ptr != nullptr);
 Outer O(POuter);
 Inner I(PInner);
 SA A(O, I);
@@ -134,6 +137,7 @@ void test_with_inner_alloc()
 static_assert(!std::uses_allocator::value, "");
 static_assert(std::uses_allocator::value, "");
 Pair * ptr = (Pair*)std::malloc(sizeof(Pair));
+assert(ptr != nullptr);
 Outer O(POuter);
 Inner I(PInner);
 SA A(O, I);

Modified: 
libcxx/trunk/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_piecewise.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_piecewise.pass.cpp?rev=290921&r1=290920&r2=290921&view=diff
==
--- 
libcxx/trunk/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_piecewise.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_piecewise.pass.cpp
 Tue Jan  3 18:53:31 2017
@@ -42,6 +42,7 @@ void test_no_inner_alloc()
 using SA = std::scoped_allocator_adaptor;
 static_assert(std::uses_allocator >::value, 
"");
 Pair * ptr = (Pair*)std::malloc(sizeof(Pair));
+assert(ptr != nullptr);
 Alloc CA(P);
 SA A(CA);
 A.construct(ptr, std::piecewise_construct,
@@ -68,6 +69,7 @@ void test_no_inner_alloc()
 using SA = std::scoped_allocator_adaptor;
 static_assert(std::uses_allocator >::value, 
"");
 Pair * ptr = (Pair*)std::malloc(sizeof(Pair));
+assert(ptr != nullptr);
 Alloc CA(P);
 SA A(CA);
 A.construct(ptr, std::piecewise_construct,
@@ -104,6 +106,7 @@ void test_with_inner_alloc()
 static_assert(!std::uses_allocator::value, "");
 static_assert(std::uses_allocator::value, "");
 Pair * ptr = (Pair*)std::malloc(sizeof(Pair));
+assert(ptr != nullptr);
 Outer O(POuter);
 Inner I(PInner);
 SA A(O, I);
@@ -134,6 +137,7 @@ void test_with_inner_alloc()
 static_assert(!std::uses_allocator::value, "");
 static_assert(std::uses_allocator::value, "");
 Pair * ptr = (Pair*)std::malloc(sizeof(Pair));
+assert(ptr != nullptr);
 Outer O(POuter);
 Inner I(PInner);
 SA A(O, I);

Modified: 
libcxx/trunk/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_rvalue.pass.cpp

[libcxx] r290922 - [libcxx] [test] Strip trailing whitespace.

2017-01-03 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Tue Jan  3 18:53:41 2017
New Revision: 290922

URL: http://llvm.org/viewvc/llvm-project?rev=290922&view=rev
Log:
[libcxx] [test] Strip trailing whitespace.

Fixes D27786.

Modified:

libcxx/trunk/test/std/experimental/utilities/meta/meta.detect/detected_or.pass.cpp

libcxx/trunk/test/std/experimental/utilities/meta/meta.detect/detected_t.pass.cpp

libcxx/trunk/test/std/experimental/utilities/meta/meta.detect/is_detected.pass.cpp

libcxx/trunk/test/std/experimental/utilities/meta/meta.detect/is_detected_convertible.pass.cpp

libcxx/trunk/test/std/experimental/utilities/meta/meta.detect/is_detected_exact.pass.cpp

Modified: 
libcxx/trunk/test/std/experimental/utilities/meta/meta.detect/detected_or.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/utilities/meta/meta.detect/detected_or.pass.cpp?rev=290922&r1=290921&r2=290922&view=diff
==
--- 
libcxx/trunk/test/std/experimental/utilities/meta/meta.detect/detected_or.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/experimental/utilities/meta/meta.detect/detected_or.pass.cpp
 Tue Jan  3 18:53:41 2017
@@ -19,7 +19,7 @@ namespace ex = std::experimental;
 
 template 
   using hasFoo = typename T::Foo;
-  
+
 struct yesFoo {
 using Foo = int;
 };

Modified: 
libcxx/trunk/test/std/experimental/utilities/meta/meta.detect/detected_t.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/utilities/meta/meta.detect/detected_t.pass.cpp?rev=290922&r1=290921&r2=290922&view=diff
==
--- 
libcxx/trunk/test/std/experimental/utilities/meta/meta.detect/detected_t.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/experimental/utilities/meta/meta.detect/detected_t.pass.cpp
 Tue Jan  3 18:53:41 2017
@@ -19,7 +19,7 @@ namespace ex = std::experimental;
 
 template 
   using callFoo = decltype(std::declval().Foo());
-  
+
 struct yesFoo {
 int Foo() { return 0; }
 };

Modified: 
libcxx/trunk/test/std/experimental/utilities/meta/meta.detect/is_detected.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/utilities/meta/meta.detect/is_detected.pass.cpp?rev=290922&r1=290921&r2=290922&view=diff
==
--- 
libcxx/trunk/test/std/experimental/utilities/meta/meta.detect/is_detected.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/experimental/utilities/meta/meta.detect/is_detected.pass.cpp
 Tue Jan  3 18:53:41 2017
@@ -19,7 +19,7 @@ namespace ex = std::experimental;
 
 template 
   using copy_assign_t = decltype(std::declval() = std::declval());
-  
+
 struct not_assignable {
 not_assignable & operator=(const not_assignable&) = delete;
 };

Modified: 
libcxx/trunk/test/std/experimental/utilities/meta/meta.detect/is_detected_convertible.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/utilities/meta/meta.detect/is_detected_convertible.pass.cpp?rev=290922&r1=290921&r2=290922&view=diff
==
--- 
libcxx/trunk/test/std/experimental/utilities/meta/meta.detect/is_detected_convertible.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/experimental/utilities/meta/meta.detect/is_detected_convertible.pass.cpp
 Tue Jan  3 18:53:41 2017
@@ -19,7 +19,7 @@ namespace ex = std::experimental;
 
 template 
   using callFoo = decltype(std::declval().Foo());
-  
+
 struct yesFoo {
 int Foo() { return 0; }
 };

Modified: 
libcxx/trunk/test/std/experimental/utilities/meta/meta.detect/is_detected_exact.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/utilities/meta/meta.detect/is_detected_exact.pass.cpp?rev=290922&r1=290921&r2=290922&view=diff
==
--- 
libcxx/trunk/test/std/experimental/utilities/meta/meta.detect/is_detected_exact.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/experimental/utilities/meta/meta.detect/is_detected_exact.pass.cpp
 Tue Jan  3 18:53:41 2017
@@ -19,7 +19,7 @@ namespace ex = std::experimental;
 
 template 
   using callFoo = decltype(std::declval().Foo());
-  
+
 struct yesFoo {
 int Foo() { return 0; }
 };


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r291322 - [libcxx] [test] Strip trailing whitespace. NFC, no code review.

2017-01-06 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Fri Jan  6 19:12:15 2017
New Revision: 291322

URL: http://llvm.org/viewvc/llvm-project?rev=291322&view=rev
Log:
[libcxx] [test] Strip trailing whitespace. NFC, no code review.

Modified:
libcxx/trunk/test/std/containers/sequences/array/iterators.pass.cpp
libcxx/trunk/test/std/iterators/iterator.range/begin-end.pass.cpp

libcxx/trunk/test/std/utilities/time/time.duration/time.duration.arithmetic/op_mod=duration.pass.cpp

libcxx/trunk/test/std/utilities/time/time.duration/time.duration.arithmetic/op_mod=rep.pass.cpp

libcxx/trunk/test/std/utilities/time/time.duration/time.duration.arithmetic/op_times=.pass.cpp

Modified: libcxx/trunk/test/std/containers/sequences/array/iterators.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/array/iterators.pass.cpp?rev=291322&r1=291321&r2=291322&view=diff
==
--- libcxx/trunk/test/std/containers/sequences/array/iterators.pass.cpp 
(original)
+++ libcxx/trunk/test/std/containers/sequences/array/iterators.pass.cpp Fri Jan 
 6 19:12:15 2017
@@ -132,10 +132,10 @@ int main()
 static_assert ( std::rbegin(c)  != std::rend(c), "");
 static_assert ( std::cbegin(c)  != std::cend(c), "");
 static_assert ( std::crbegin(c) != std::crend(c), "");
-
+
 static_assert ( *c.begin()  == 0, "");
 static_assert ( *c.rbegin()  == 4, "");
-
+
 static_assert ( *std::begin(c)   == 0, "" );
 static_assert ( *std::cbegin(c)  == 0, "" );
 static_assert ( *std::rbegin(c)  == 4, "" );

Modified: libcxx/trunk/test/std/iterators/iterator.range/begin-end.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/iterators/iterator.range/begin-end.pass.cpp?rev=291322&r1=291321&r2=291322&view=diff
==
--- libcxx/trunk/test/std/iterators/iterator.range/begin-end.pass.cpp (original)
+++ libcxx/trunk/test/std/iterators/iterator.range/begin-end.pass.cpp Fri Jan  
6 19:12:15 2017
@@ -179,10 +179,10 @@ int main(){
 static_assert ( std::rbegin(c)  != std::rend(c), "");
 static_assert ( std::cbegin(c)  != std::cend(c), "");
 static_assert ( std::crbegin(c) != std::crend(c), "");
-
+
 static_assert ( *c.begin()  == 0, "");
 static_assert ( *c.rbegin()  == 4, "");
-
+
 static_assert ( *std::begin(c)   == 0, "" );
 static_assert ( *std::cbegin(c)  == 0, "" );
 static_assert ( *std::rbegin(c)  == 4, "" );
@@ -191,7 +191,7 @@ int main(){
 
 {
 static constexpr const int c[] = {0,1,2,3,4};
-
+
 static_assert ( *std::begin(c)   == 0, "" );
 static_assert ( *std::cbegin(c)  == 0, "" );
 static_assert ( *std::rbegin(c)  == 4, "" );

Modified: 
libcxx/trunk/test/std/utilities/time/time.duration/time.duration.arithmetic/op_mod=duration.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/time/time.duration/time.duration.arithmetic/op_mod%3Dduration.pass.cpp?rev=291322&r1=291321&r2=291322&view=diff
==
--- 
libcxx/trunk/test/std/utilities/time/time.duration/time.duration.arithmetic/op_mod=duration.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/utilities/time/time.duration/time.duration.arithmetic/op_mod=duration.pass.cpp
 Fri Jan  6 19:12:15 2017
@@ -38,7 +38,7 @@ int main()
 us1 %= std::chrono::milliseconds(3);
 assert(us1.count() == 2);
 }
-
+
 #if TEST_STD_VER > 14
 static_assert(test_constexpr(), "");
 #endif

Modified: 
libcxx/trunk/test/std/utilities/time/time.duration/time.duration.arithmetic/op_mod=rep.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/time/time.duration/time.duration.arithmetic/op_mod%3Drep.pass.cpp?rev=291322&r1=291321&r2=291322&view=diff
==
--- 
libcxx/trunk/test/std/utilities/time/time.duration/time.duration.arithmetic/op_mod=rep.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/utilities/time/time.duration/time.duration.arithmetic/op_mod=rep.pass.cpp
 Fri Jan  6 19:12:15 2017
@@ -34,7 +34,7 @@ int main()
 us %= 3;
 assert(us.count() == 2);
 }
-
+
 #if TEST_STD_VER > 14
 static_assert(test_constexpr(), "");
 #endif

Modified: 
libcxx/trunk/test/std/utilities/time/time.duration/time.duration.arithmetic/op_times=.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/time/time.duration/time.duration.arithmetic/op_times%3D.pass.cpp?rev=291322&r1=291321&r2=291322&view=diff
==
--- 
libcxx/trunk/test/std/utilities/time/time.duration/time.duration.arithmetic/op_times=.pass.cpp
 (original)
+++ 
libcxx/trunk/

[PATCH] D23685: [libcxx] [test] Include the iterator header for back_inserter.

2016-08-18 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision.
STL_MSFT added reviewers: EricWF, mclow.lists.
STL_MSFT added a subscriber: cfe-commits.

Code was recently added to this test that uses std::back_inserter. Therefore, 
the header  must be included. (MSVC's STL demands this, as we don't 
otherwise drag in back_inserter.)

https://reviews.llvm.org/D23685

Files:
  test/std/containers/associative/map/map.cons/copy_assign.pass.cpp

Index: test/std/containers/associative/map/map.cons/copy_assign.pass.cpp
===
--- test/std/containers/associative/map/map.cons/copy_assign.pass.cpp
+++ test/std/containers/associative/map/map.cons/copy_assign.pass.cpp
@@ -17,6 +17,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 


Index: test/std/containers/associative/map/map.cons/copy_assign.pass.cpp
===
--- test/std/containers/associative/map/map.cons/copy_assign.pass.cpp
+++ test/std/containers/associative/map/map.cons/copy_assign.pass.cpp
@@ -17,6 +17,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r300079 - [libcxx] [test] Avoid Clang's -Wunused-const-variable in is_constructible.pass.cpp.

2017-04-12 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Wed Apr 12 12:16:38 2017
New Revision: 300079

URL: http://llvm.org/viewvc/llvm-project?rev=300079&view=rev
Log:
[libcxx] [test] Avoid Clang's -Wunused-const-variable in 
is_constructible.pass.cpp.

This happens when using Clang with MSVC's STL, so there are no actual uses of 
this variable.

Fixes D31966.

Modified:

libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp

Modified: 
libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp?rev=300079&r1=300078&r2=300079&view=diff
==
--- 
libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp
 Wed Apr 12 12:16:38 2017
@@ -251,6 +251,7 @@ int main()
 LIBCPP_STATIC_ASSERT(
 clang_disallows_valid_static_cast_bug !=
 std::__libcpp_is_constructible>::value, "");
+((void)clang_disallows_valid_static_cast_bug); // Prevent unused warning
 #else
 static_assert(clang_disallows_valid_static_cast_bug == false, "");
 LIBCPP_STATIC_ASSERT(std::__libcpp_is_constructible>::value, "");


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r292281 - [libcxx] [test] Don't ask whether Incomplete& can be assigned to.

2017-01-17 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Tue Jan 17 16:24:45 2017
New Revision: 292281

URL: http://llvm.org/viewvc/llvm-project?rev=292281&view=rev
Log:
[libcxx] [test] Don't ask whether Incomplete& can be assigned to.

This is the subject of an active NB comment. Regardless of what the Working
Paper currently says, asking this question is morally wrong, because the
answer can change when the type is completed. C1XX now detects such
precondition violations and complains about them; perhaps Clang should too.

Fixes D28591.

Modified:

libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp

Modified: 
libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp?rev=292281&r1=292280&r2=292281&view=diff
==
--- 
libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_assignable.pass.cpp
 Tue Jan 17 16:24:45 2017
@@ -82,5 +82,4 @@ int main()
 
 //  pointer to incomplete template type
test_is_assignable*&, X*> ();
-test_is_not_assignable();
 }


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r292432 - [libcxx] [test] Fix MSVC warnings C4127 and C6326 about constants.

2017-01-18 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Wed Jan 18 14:09:56 2017
New Revision: 292432

URL: http://llvm.org/viewvc/llvm-project?rev=292432&view=rev
Log:
[libcxx] [test] Fix MSVC warnings C4127 and C6326 about constants.

MSVC has compiler warnings C4127 "conditional expression is constant" (enabled
by /W4) and C6326 "Potential comparison of a constant with another constant"
(enabled by /analyze). They're potentially useful, although they're slightly
annoying to library devs who know what they're doing. In the latest version of
the compiler, C4127 is suppressed when the compiler sees simple tests like
"if (name_of_thing)", so extracting comparison expressions into named
constants is a workaround. At the same time, using std::integral_constant
avoids C6326, which doesn't look at template arguments.

test/std/containers/sequences/vector.bool/emplace.pass.cpp
Replace 1 == 1 with true, which is the same as far as the library is concerned.

Fixes D28837.

Modified:
libcxx/trunk/test/std/containers/sequences/vector.bool/emplace.pass.cpp

libcxx/trunk/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minus1.pass.cpp
libcxx/trunk/test/std/utilities/function.objects/unord.hash/enum.pass.cpp

libcxx/trunk/test/std/utilities/function.objects/unord.hash/integral.pass.cpp
libcxx/trunk/test/std/utilities/template.bitset/bitset.members/all.pass.cpp
libcxx/trunk/test/std/utilities/template.bitset/bitset.members/any.pass.cpp

libcxx/trunk/test/std/utilities/template.bitset/bitset.members/index.pass.cpp

libcxx/trunk/test/std/utilities/template.bitset/bitset.members/index_const.pass.cpp
libcxx/trunk/test/std/utilities/template.bitset/bitset.members/none.pass.cpp

libcxx/trunk/test/std/utilities/template.bitset/bitset.members/op_eq_eq.pass.cpp

libcxx/trunk/test/std/utilities/template.bitset/bitset.members/to_ullong.pass.cpp

libcxx/trunk/test/std/utilities/template.bitset/bitset.members/to_ulong.pass.cpp

Modified: 
libcxx/trunk/test/std/containers/sequences/vector.bool/emplace.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/vector.bool/emplace.pass.cpp?rev=292432&r1=292431&r2=292432&view=diff
==
--- libcxx/trunk/test/std/containers/sequences/vector.bool/emplace.pass.cpp 
(original)
+++ libcxx/trunk/test/std/containers/sequences/vector.bool/emplace.pass.cpp Wed 
Jan 18 14:09:56 2017
@@ -34,7 +34,7 @@ int main()
 assert(c.front() == false);
 assert(c.back() == true);
 
-i = c.emplace(c.cbegin()+1, 1 == 1);
+i = c.emplace(c.cbegin()+1, true);
 assert(i == c.begin()+1);
 assert(c.size() == 3);
 assert(c.front() == false);
@@ -56,7 +56,7 @@ int main()
 assert(c.front() == false);
 assert(c.back() == true);
 
-i = c.emplace(c.cbegin()+1, 1 == 1);
+i = c.emplace(c.cbegin()+1, true);
 assert(i == c.begin()+1);
 assert(c.size() == 3);
 assert(c.size() == 3);

Modified: 
libcxx/trunk/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minus1.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minus1.pass.cpp?rev=292432&r1=292431&r2=292432&view=diff
==
--- 
libcxx/trunk/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minus1.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minus1.pass.cpp
 Wed Jan 18 14:09:56 2017
@@ -23,6 +23,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -66,11 +67,15 @@ int main()
 test_octal("17");
 test_octal< int64_t>("17");
 test_octal("17");
-if (sizeof(long) == sizeof(int64_t)) {
+
+const bool long_is_64 = std::integral_constant::value; // avoid compiler warnings
+const bool long_long_is_64 = std::integral_constant::value; // avoid compiler warnings
+
+if (long_is_64) {
 test_octal< unsigned long>("17");
 test_octal<  long>("17");
 }
-if (sizeof(long long) == sizeof(int64_t)) {
+if (long_long_is_64) {
 test_octal< unsigned long long>("17");
 test_octal<  long long>("17");
 }
@@ -81,11 +86,11 @@ int main()
 test_dec< int32_t>(  "-1");
 test_dec("18446744073709551615");
 test_dec< int64_t>(  "-1");
-if (sizeof(long) == sizeof(int64_t)) {
+if (long_is_64) {
 test_dec("18446744073709551615");
 test_dec< 

[libcxx] r292434 - [libcxx] [test] Fix comment typos, strip trailing whitespace.

2017-01-18 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Wed Jan 18 14:10:25 2017
New Revision: 292434

URL: http://llvm.org/viewvc/llvm-project?rev=292434&view=rev
Log:
[libcxx] [test] Fix comment typos, strip trailing whitespace.

No functional change, no code review.

Modified:
libcxx/trunk/test/std/containers/associative/map/incomplete_type.pass.cpp

libcxx/trunk/test/std/containers/associative/multimap/incomplete_type.pass.cpp

libcxx/trunk/test/std/containers/associative/multiset/incomplete_type.pass.cpp
libcxx/trunk/test/std/containers/associative/set/incomplete_type.pass.cpp
libcxx/trunk/test/std/containers/sequences/array/at.pass.cpp
libcxx/trunk/test/std/containers/sequences/array/front_back.pass.cpp
libcxx/trunk/test/std/containers/sequences/array/indexing.pass.cpp
libcxx/trunk/test/std/containers/sequences/list/incomplete_type.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.map/incomplete_type.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.multimap/incomplete.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.multiset/incomplete.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.set/incomplete.pass.cpp

libcxx/trunk/test/std/experimental/filesystem/class.path/path.member/path.append.pass.cpp

libcxx/trunk/test/std/experimental/filesystem/class.path/path.member/path.assign/source.pass.cpp

libcxx/trunk/test/std/experimental/filesystem/class.path/path.member/path.concat.pass.cpp
libcxx/trunk/test/std/experimental/filesystem/class.path/synop.pass.cpp

libcxx/trunk/test/std/experimental/filesystem/class.rec.dir.itr/rec.dir.itr.members/increment.pass.cpp

libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.absolute/absolute.pass.cpp

libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.permissions/permissions.pass.cpp

libcxx/trunk/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_types.pass.cpp

libcxx/trunk/test/std/experimental/string.view/string.view.access/at.pass.cpp

libcxx/trunk/test/std/experimental/utilities/tuple/tuple.apply/extended_types.pass.cpp

libcxx/trunk/test/std/input.output/iostream.format/quoted.manip/quoted_char.fail.cpp

libcxx/trunk/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/copy.pass.cpp

libcxx/trunk/test/std/iterators/stream.iterators/istream.iterator/istream.iterator.cons/default.pass.cpp

libcxx/trunk/test/std/iterators/stream.iterators/istream.iterator/types.pass.cpp

libcxx/trunk/test/std/localization/locale.categories/category.monetary/locale.moneypunct/locale.moneypunct.members/negative_sign.pass.cpp

libcxx/trunk/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp

libcxx/trunk/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp
libcxx/trunk/test/std/strings/string.view/string.view.access/at.pass.cpp

libcxx/trunk/test/std/strings/string.view/string_view.literals/literal.pass.cpp

libcxx/trunk/test/std/thread/thread.condition/thread.condition.condvarany/wait_terminates.sh.cpp

libcxx/trunk/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp

libcxx/trunk/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_nullptr.pass.cpp

libcxx/trunk/test/std/utilities/memory/unique.ptr/unique.ptr.single/unique.ptr.single.ctor/default.pass.cpp

libcxx/trunk/test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp

libcxx/trunk/test/std/utilities/meta/meta.unary/meta.unary.prop/is_literal_type.pass.cpp

libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR22806_constrain_tuple_like_ctor.pass.cpp

libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/default.pass.cpp

libcxx/trunk/test/std/utilities/utility/pairs/pairs.pair/default-sfinae.pass.cpp
libcxx/trunk/test/std/utilities/utility/pairs/pairs.pair/default.pass.cpp
libcxx/trunk/test/support/constexpr_char_traits.hpp
libcxx/trunk/test/support/container_test_types.h
libcxx/trunk/test/support/controlled_allocators.hpp
libcxx/trunk/test/support/filesystem_test_helper.hpp
libcxx/trunk/test/support/platform_support.h
libcxx/trunk/test/support/test_memory_resource.hpp

Modified: 
libcxx/trunk/test/std/containers/associative/map/incomplete_type.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/associative/map/incomplete_type.pass.cpp?rev=292434&r1=292433&r2=292434&view=diff
==
--- libcxx/trunk/test/std/containers/associative/map/incomplete_type.pass.cpp 
(original)
+++ libcxx/trunk/test/std/containers/associative/map/incomplete_type.pass.cpp 
Wed Jan 18 14:10:25 2017
@@ -9,7 +9,7 @@
 
 // 
 
-// Check that std::map and it's iterators can be inst

[libcxx] r292443 - [libcxx] [test] Add msvc_stdlib_force_include.hpp.

2017-01-18 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Wed Jan 18 16:19:14 2017
New Revision: 292443

URL: http://llvm.org/viewvc/llvm-project?rev=292443&view=rev
Log:
[libcxx] [test] Add msvc_stdlib_force_include.hpp.

No functional change; nothing includes this, instead our test harness
injects it via the /FI compiler option.

No code review; blessed in advance by EricWF.

Added:
libcxx/trunk/test/support/msvc_stdlib_force_include.hpp

Added: libcxx/trunk/test/support/msvc_stdlib_force_include.hpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/support/msvc_stdlib_force_include.hpp?rev=292443&view=auto
==
--- libcxx/trunk/test/support/msvc_stdlib_force_include.hpp (added)
+++ libcxx/trunk/test/support/msvc_stdlib_force_include.hpp Wed Jan 18 16:19:14 
2017
@@ -0,0 +1,79 @@
+//===--===//
+//
+// 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.
+//
+//===--===//
+
+#ifndef SUPPORT_MSVC_STDLIB_FORCE_INCLUDE_HPP
+#define SUPPORT_MSVC_STDLIB_FORCE_INCLUDE_HPP
+
+
+// This header is force-included when running MSVC's compiler and standard 
library with libc++'s tests.
+
+
+// Avoid assertion dialogs.
+#define _CRT_SECURE_INVALID_PARAMETER(EXPR) ::abort()
+
+#include 
+#include 
+
+struct AssertionDialogAvoider {
+AssertionDialogAvoider() {
+_CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE);
+_CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);
+
+_CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE);
+_CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR);
+}
+};
+
+const AssertionDialogAvoider assertion_dialog_avoider{};
+
+
+// Simulate feature-test macros.
+#define __has_feature(X) _MSVC_HAS_FEATURE_ ## X
+#define _MSVC_HAS_FEATURE_cxx_exceptions1
+#define _MSVC_HAS_FEATURE_cxx_rtti  1
+#define _MSVC_HAS_FEATURE_address_sanitizer 0
+#define _MSVC_HAS_FEATURE_memory_sanitizer  0
+#define _MSVC_HAS_FEATURE_thread_sanitizer  0
+
+
+// atomic_is_lock_free.pass.cpp needs this VS 2015 Update 2 fix.
+#define _ENABLE_ATOMIC_ALIGNMENT_FIX
+
+
+// Enable features that /std:c++latest removes by default.
+#define _HAS_AUTO_PTR_ETC  1
+#define _HAS_FUNCTION_ASSIGN   1
+#define _HAS_OLD_IOSTREAMS_MEMBERS 1
+
+
+// MSVC doesn't have __int128_t.
+#define _LIBCPP_HAS_NO_INT128
+
+
+// MSVC has quick_exit() and at_quick_exit().
+#define _LIBCPP_HAS_QUICK_EXIT
+
+
+// MSVC's STL partially supports C++17.
+#define TEST_STD_VER 17
+
+
+// Silence warnings about raw pointers and other unchecked iterators.
+#define _SCL_SECURE_NO_WARNINGS
+
+
+// Silence compiler warnings.
+#pragma warning(disable: 4180) // qualifier applied to function type has no 
meaning; ignored
+#pragma warning(disable: 4521) // multiple copy constructors specified
+#pragma warning(disable: 4702) // unreachable code
+#pragma warning(disable: 6294) // Ill-defined for-loop:  initial condition 
does not satisfy test.  Loop body not executed.
+#pragma warning(disable: 28251) // Inconsistent annotation for 'new': this 
instance has no annotations.
+
+
+#endif // SUPPORT_MSVC_STDLIB_FORCE_INCLUDE_HPP


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r294155 - [libcxx] [test] Fix Clang -Wunused-local-typedef, part 2/3.

2017-02-05 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Sun Feb  5 16:47:41 2017
New Revision: 294155

URL: http://llvm.org/viewvc/llvm-project?rev=294155&view=rev
Log:
[libcxx] [test] Fix Clang -Wunused-local-typedef, part 2/3.

These typedefs were completely unused.

Fixes D29136.

Modified:
libcxx/trunk/test/std/containers/sequences/deque/deque.cons/size.pass.cpp
libcxx/trunk/test/std/containers/sequences/list/list.cons/size_type.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.multimap/bucket_count.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.multimap/load_factor.pass.cpp

libcxx/trunk/test/std/containers/unord/unord.multimap/max_bucket_count.pass.cpp

libcxx/trunk/test/std/containers/unord/unord.multimap/max_load_factor.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.multimap/swap_member.pass.cpp

libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.swap/swap_non_member.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.multiset/bucket_count.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.multiset/load_factor.pass.cpp

libcxx/trunk/test/std/containers/unord/unord.multiset/max_load_factor.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.multiset/swap_member.pass.cpp

libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_non_member.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.set/bucket_count.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.set/load_factor.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.set/max_load_factor.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.set/swap_member.pass.cpp

libcxx/trunk/test/std/containers/unord/unord.set/unord.set.swap/swap_non_member.pass.cpp

libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/atan.pass.cpp

libcxx/trunk/test/std/numerics/complex.number/complex.transcendentals/tan.pass.cpp

libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.cauchy/eval.pass.cpp

libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.chisq/eval.pass.cpp

libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.f/eval.pass.cpp

libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.norm/rand.dist.norm.normal/eval.pass.cpp

libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.exp/eval.pass.cpp

libcxx/trunk/test/std/numerics/rand/rand.dis/rand.dist.pois/rand.dist.pois.weibull/eval.pass.cpp
libcxx/trunk/test/std/strings/basic.string/string.cons/iter_alloc.pass.cpp

libcxx/trunk/test/std/strings/basic.string/string.cons/pointer_alloc.pass.cpp

libcxx/trunk/test/std/strings/basic.string/string.cons/pointer_size_alloc.pass.cpp

libcxx/trunk/test/std/strings/basic.string/string.cons/size_char_alloc.pass.cpp
libcxx/trunk/test/std/strings/basic.string/string.cons/substr.pass.cpp

libcxx/trunk/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_const_lvalue_pair.pass.cpp

libcxx/trunk/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_piecewise.pass.cpp

libcxx/trunk/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_rvalue.pass.cpp

libcxx/trunk/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_pair_values.pass.cpp

libcxx/trunk/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_type.pass.cpp

libcxx/trunk/test/std/utilities/optional/optional.object/optional.object.ctor/U.pass.cpp

Modified: 
libcxx/trunk/test/std/containers/sequences/deque/deque.cons/size.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/deque/deque.cons/size.pass.cpp?rev=294155&r1=294154&r2=294155&view=diff
==
--- libcxx/trunk/test/std/containers/sequences/deque/deque.cons/size.pass.cpp 
(original)
+++ libcxx/trunk/test/std/containers/sequences/deque/deque.cons/size.pass.cpp 
Sun Feb  5 16:47:41 2017
@@ -68,7 +68,6 @@ test3(unsigned n, Allocator const &alloc
 {
 #if TEST_STD_VER > 11
 typedef std::deque C;
-typedef typename C::const_iterator const_iterator;
 {
 C d(n, alloc);
 assert(d.size() == n);

Modified: 
libcxx/trunk/test/std/containers/sequences/list/list.cons/size_type.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/sequences/list/list.cons/size_type.pass.cpp?rev=294155&r1=294154&r2=294155&view=diff
==
--- 
libcxx/trunk/test/std/containers/sequences/list/list.cons/size_type.pass.cpp 
(original)
+++ 
libcxx/trunk/test/std/containers/sequences/list/list.cons/size_type.pass.cpp 
Sun Feb  5 16:47:41 2017
@@ -25,7 +25,6 @@ test3(unsigned n, Allocator const &alloc
 {
 #if TEST_STD_VER > 11
 typedef std::list C;
-typedef typenam

[libcxx] r294154 - [libcxx] [test] Fix Clang -Wunused-local-typedef, part 1/3.

2017-02-05 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Sun Feb  5 16:47:09 2017
New Revision: 294154

URL: http://llvm.org/viewvc/llvm-project?rev=294154&view=rev
Log:
[libcxx] [test] Fix Clang -Wunused-local-typedef, part 1/3.

Guard typedefs and static_asserts with _LIBCPP_VERSION.

test/std/containers/sequences/vector.bool/move_assign_noexcept.pass.cpp
test/std/containers/sequences/vector.bool/move_noexcept.pass.cpp
test/std/containers/sequences/vector.bool/swap_noexcept.pass.cpp
Additionally deal with conditional compilation.

test/std/containers/associative/map/map.cons/move_noexcept.pass.cpp
test/std/containers/associative/multimap/multimap.cons/move_noexcept.pass.cpp
Additionally deal with typedefs used by other typedefs.

Fixes D29135.

Modified:

libcxx/trunk/test/std/containers/associative/map/map.cons/default_noexcept.pass.cpp

libcxx/trunk/test/std/containers/associative/map/map.cons/dtor_noexcept.pass.cpp

libcxx/trunk/test/std/containers/associative/map/map.cons/move_assign_noexcept.pass.cpp

libcxx/trunk/test/std/containers/associative/map/map.cons/move_noexcept.pass.cpp

libcxx/trunk/test/std/containers/associative/map/map.special/swap_noexcept.pass.cpp

libcxx/trunk/test/std/containers/associative/multimap/multimap.cons/default_noexcept.pass.cpp

libcxx/trunk/test/std/containers/associative/multimap/multimap.cons/dtor_noexcept.pass.cpp

libcxx/trunk/test/std/containers/associative/multimap/multimap.cons/move_assign_noexcept.pass.cpp

libcxx/trunk/test/std/containers/associative/multimap/multimap.cons/move_noexcept.pass.cpp

libcxx/trunk/test/std/containers/associative/multimap/multimap.special/swap_noexcept.pass.cpp

libcxx/trunk/test/std/containers/associative/multiset/multiset.cons/default_noexcept.pass.cpp

libcxx/trunk/test/std/containers/associative/multiset/multiset.cons/dtor_noexcept.pass.cpp

libcxx/trunk/test/std/containers/associative/multiset/multiset.cons/move_assign_noexcept.pass.cpp

libcxx/trunk/test/std/containers/associative/multiset/multiset.cons/move_noexcept.pass.cpp

libcxx/trunk/test/std/containers/associative/multiset/multiset.special/swap_noexcept.pass.cpp

libcxx/trunk/test/std/containers/associative/set/set.cons/default_noexcept.pass.cpp

libcxx/trunk/test/std/containers/associative/set/set.cons/dtor_noexcept.pass.cpp

libcxx/trunk/test/std/containers/associative/set/set.cons/move_assign_noexcept.pass.cpp

libcxx/trunk/test/std/containers/associative/set/set.cons/move_noexcept.pass.cpp

libcxx/trunk/test/std/containers/associative/set/set.special/swap_noexcept.pass.cpp

libcxx/trunk/test/std/containers/container.adaptors/priority.queue/priqueue.cons/default_noexcept.pass.cpp

libcxx/trunk/test/std/containers/container.adaptors/queue/queue.cons/default_noexcept.pass.cpp

libcxx/trunk/test/std/containers/container.adaptors/queue/queue.cons/move_noexcept.pass.cpp

libcxx/trunk/test/std/containers/container.adaptors/stack/stack.cons/default_noexcept.pass.cpp

libcxx/trunk/test/std/containers/container.adaptors/stack/stack.cons/move_noexcept.pass.cpp

libcxx/trunk/test/std/containers/sequences/deque/deque.cons/default_noexcept.pass.cpp

libcxx/trunk/test/std/containers/sequences/deque/deque.cons/dtor_noexcept.pass.cpp

libcxx/trunk/test/std/containers/sequences/deque/deque.cons/move_assign_noexcept.pass.cpp

libcxx/trunk/test/std/containers/sequences/deque/deque.cons/move_noexcept.pass.cpp

libcxx/trunk/test/std/containers/sequences/deque/deque.special/swap_noexcept.pass.cpp

libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.cons/default_noexcept.pass.cpp

libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.cons/dtor_noexcept.pass.cpp

libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.cons/move_assign_noexcept.pass.cpp

libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.cons/move_noexcept.pass.cpp

libcxx/trunk/test/std/containers/sequences/forwardlist/forwardlist.spec/swap_noexcept.pass.cpp

libcxx/trunk/test/std/containers/sequences/list/list.cons/default_noexcept.pass.cpp

libcxx/trunk/test/std/containers/sequences/list/list.cons/dtor_noexcept.pass.cpp

libcxx/trunk/test/std/containers/sequences/list/list.cons/move_assign_noexcept.pass.cpp

libcxx/trunk/test/std/containers/sequences/list/list.cons/move_noexcept.pass.cpp

libcxx/trunk/test/std/containers/sequences/list/list.special/swap_noexcept.pass.cpp

libcxx/trunk/test/std/containers/sequences/vector.bool/default_noexcept.pass.cpp

libcxx/trunk/test/std/containers/sequences/vector.bool/dtor_noexcept.pass.cpp

libcxx/trunk/test/std/containers/sequences/vector.bool/move_assign_noexcept.pass.cpp

libcxx/trunk/test/std/containers/sequences/vector.bool/move_noexcept.pass.cpp

libcxx/trunk/test/std/containers/sequences/vector.bool/swap_noexcept.pass.cpp

libcxx/trunk/test/std/containers/sequences/vector/ve

[libcxx] r294158 - [libcxx] [test] Fix Clang -Wpessimizing-move "moving a temporary object prevents copy elision".

2017-02-05 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Sun Feb  5 16:48:07 2017
New Revision: 294158

URL: http://llvm.org/viewvc/llvm-project?rev=294158&view=rev
Log:
[libcxx] [test] Fix Clang -Wpessimizing-move "moving a temporary object 
prevents copy elision".

N4618 30.6.6 [futures.unique_future]/12 declares "shared_future share() 
noexcept;".

Fixes D29139.

Modified:
libcxx/trunk/test/std/thread/futures/futures.unique_future/share.pass.cpp

Modified: 
libcxx/trunk/test/std/thread/futures/futures.unique_future/share.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.unique_future/share.pass.cpp?rev=294158&r1=294157&r2=294158&view=diff
==
--- libcxx/trunk/test/std/thread/futures/futures.unique_future/share.pass.cpp 
(original)
+++ libcxx/trunk/test/std/thread/futures/futures.unique_future/share.pass.cpp 
Sun Feb  5 16:48:07 2017
@@ -26,7 +26,7 @@ int main()
 std::promise p;
 std::future f0 = p.get_future();
 static_assert( noexcept(f0.share()), "");
-std::shared_future f = std::move(f0.share());
+std::shared_future f = f0.share();
 assert(!f0.valid());
 assert(f.valid());
 }
@@ -34,7 +34,7 @@ int main()
 typedef int T;
 std::future f0;
 static_assert( noexcept(f0.share()), "");
-std::shared_future f = std::move(f0.share());
+std::shared_future f = f0.share();
 assert(!f0.valid());
 assert(!f.valid());
 }
@@ -43,7 +43,7 @@ int main()
 std::promise p;
 std::future f0 = p.get_future();
 static_assert( noexcept(f0.share()), "");
-std::shared_future f = std::move(f0.share());
+std::shared_future f = f0.share();
 assert(!f0.valid());
 assert(f.valid());
 }
@@ -51,7 +51,7 @@ int main()
 typedef int& T;
 std::future f0;
 static_assert( noexcept(f0.share()), "");
-std::shared_future f = std::move(f0.share());
+std::shared_future f = f0.share();
 assert(!f0.valid());
 assert(!f.valid());
 }
@@ -60,7 +60,7 @@ int main()
 std::promise p;
 std::future f0 = p.get_future();
 static_assert( noexcept(f0.share()), "");
-std::shared_future f = std::move(f0.share());
+std::shared_future f = f0.share();
 assert(!f0.valid());
 assert(f.valid());
 }
@@ -68,7 +68,7 @@ int main()
 typedef void T;
 std::future f0;
 static_assert( noexcept(f0.share()), "");
-std::shared_future f = std::move(f0.share());
+std::shared_future f = f0.share();
 assert(!f0.valid());
 assert(!f.valid());
 }


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r294157 - [libcxx] [test] Fix Clang -Wdeprecated-declarations with MSVC's CRT.

2017-02-05 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Sun Feb  5 16:48:02 2017
New Revision: 294157

URL: http://llvm.org/viewvc/llvm-project?rev=294157&view=rev
Log:
[libcxx] [test] Fix Clang -Wdeprecated-declarations with MSVC's CRT.

libcxx's tests use various C Standard Library functions that have been
marked by MSVC's CRT as deprecated by Microsoft (not by ISO).

libcxx's usage is cromulent (just checking with decltype to see if the functions
are being dragged in by various headers as required by the Standard), so
defining _CRT_SECURE_NO_WARNINGS will silence the warnings in a targeted manner.
This needs to be defined before including any CRT headers.

Also, make this file prettier.

Fixes D29138.

Modified:
libcxx/trunk/test/support/msvc_stdlib_force_include.hpp

Modified: libcxx/trunk/test/support/msvc_stdlib_force_include.hpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/support/msvc_stdlib_force_include.hpp?rev=294157&r1=294156&r2=294157&view=diff
==
--- libcxx/trunk/test/support/msvc_stdlib_force_include.hpp (original)
+++ libcxx/trunk/test/support/msvc_stdlib_force_include.hpp Sun Feb  5 16:48:02 
2017
@@ -13,6 +13,9 @@
 // This header is force-included when running the libc++ tests against the
 // MSVC standard library.
 
+// Silence warnings about CRT machinery.
+#define _CRT_SECURE_NO_WARNINGS
+
 // Avoid assertion dialogs.
 #define _CRT_SECURE_INVALID_PARAMETER(EXPR) ::abort()
 
@@ -20,7 +23,7 @@
 #include 
 
 #if defined(_LIBCPP_VERSION)
-#error This header may not be used when targeting libc++
+#error This header may not be used when targeting libc++
 #endif
 
 struct AssertionDialogAvoider {
@@ -35,27 +38,24 @@ struct AssertionDialogAvoider {
 
 const AssertionDialogAvoider assertion_dialog_avoider{};
 
-
 // MSVC frontend only configurations
 #if !defined(__clang__)
+#define TEST_STD_VER 17
 
-#define TEST_STD_VER 17
-
-// Simulate feature-test macros.
-#define __has_feature(X) _MSVC_HAS_FEATURE_ ## X
-#define _MSVC_HAS_FEATURE_cxx_exceptions1
-#define _MSVC_HAS_FEATURE_cxx_rtti  1
-#define _MSVC_HAS_FEATURE_address_sanitizer 0
-#define _MSVC_HAS_FEATURE_memory_sanitizer  0
-#define _MSVC_HAS_FEATURE_thread_sanitizer  0
-
-// Silence compiler warnings.
-#pragma warning(disable: 4180) // qualifier applied to function type has no 
meaning; ignored
-#pragma warning(disable: 4521) // multiple copy constructors specified
-#pragma warning(disable: 4702) // unreachable code
-#pragma warning(disable: 6294) // Ill-defined for-loop:  initial condition 
does not satisfy test.  Loop body not executed.
-#pragma warning(disable: 28251) // Inconsistent annotation for 'new': this 
instance has no annotations.
-
+// Simulate feature-test macros.
+#define __has_feature(X) _MSVC_HAS_FEATURE_ ## X
+#define _MSVC_HAS_FEATURE_cxx_exceptions1
+#define _MSVC_HAS_FEATURE_cxx_rtti  1
+#define _MSVC_HAS_FEATURE_address_sanitizer 0
+#define _MSVC_HAS_FEATURE_memory_sanitizer  0
+#define _MSVC_HAS_FEATURE_thread_sanitizer  0
+
+// Silence compiler warnings.
+#pragma warning(disable: 4180) // qualifier applied to function type has 
no meaning; ignored
+#pragma warning(disable: 4521) // multiple copy constructors specified
+#pragma warning(disable: 4702) // unreachable code
+#pragma warning(disable: 6294) // Ill-defined for-loop:  initial condition 
does not satisfy test.  Loop body not executed.
+#pragma warning(disable: 28251) // Inconsistent annotation for 'new': this 
instance has no annotations.
 #endif // !defined(__clang__)
 
 // MSVC doesn't have __int128_t.


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r294156 - [libcxx] [test] Fix Clang -Wunused-local-typedef, part 3/3.

2017-02-05 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Sun Feb  5 16:47:54 2017
New Revision: 294156

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

test/std/strings/string.classes/typedefs.pass.cpp
Actually test what basic_string's typedefs stand for.

test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp
NotDerived and ND were completely unused.

test/std/utilities/utility/pairs/pairs.pair/default.pass.cpp
P2 was mistakenly not being used. Yes, that's
right: -Wunused-local-typedef CAUGHT A MISTAKE! AMAZING!

Fixes D29137.

Modified:
libcxx/trunk/test/std/strings/string.classes/typedefs.pass.cpp

libcxx/trunk/test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp
libcxx/trunk/test/std/utilities/utility/pairs/pairs.pair/default.pass.cpp

Modified: libcxx/trunk/test/std/strings/string.classes/typedefs.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/string.classes/typedefs.pass.cpp?rev=294156&r1=294155&r2=294156&view=diff
==
--- libcxx/trunk/test/std/strings/string.classes/typedefs.pass.cpp (original)
+++ libcxx/trunk/test/std/strings/string.classes/typedefs.pass.cpp Sun Feb  5 
16:47:54 2017
@@ -18,13 +18,14 @@
 // typedef basic_string wstring;
 
 #include 
+#include 
 
 int main()
 {
-typedef std::string test1;
-typedef std::wstring test2;
+static_assert((std::is_same 
>::value), "");
+static_assert((std::is_same 
>::value), "");
 #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
-typedef std::u16string test3;
-typedef std::u32string test4;
+static_assert((std::is_same 
>::value), "");
+static_assert((std::is_same 
>::value), "");
 #endif  // _LIBCPP_HAS_NO_UNICODE_CHARS
 }

Modified: 
libcxx/trunk/test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp?rev=294156&r1=294155&r2=294156&view=diff
==
--- 
libcxx/trunk/test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp
 Sun Feb  5 16:47:54 2017
@@ -26,7 +26,6 @@ struct wat
 
 struct F {};
 struct FD : public F {};
-struct NotDerived {};
 
 template 
 void test_result_of_imp()
@@ -43,7 +42,6 @@ void test_result_of_imp()
 
 int main()
 {
-typedef NotDerived ND;
 {
 typedef char F::*PMD;
 test_result_of_imp();

Modified: 
libcxx/trunk/test/std/utilities/utility/pairs/pairs.pair/default.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/utility/pairs/pairs.pair/default.pass.cpp?rev=294156&r1=294155&r2=294156&view=diff
==
--- libcxx/trunk/test/std/utilities/utility/pairs/pairs.pair/default.pass.cpp 
(original)
+++ libcxx/trunk/test/std/utilities/utility/pairs/pairs.pair/default.pass.cpp 
Sun Feb  5 16:47:54 2017
@@ -49,7 +49,7 @@ int main()
 using P = std::pair;
 static_assert(!std::is_default_constructible::value, "");
 using P2 = std::pair;
-static_assert(!std::is_default_constructible::value, "");
+static_assert(!std::is_default_constructible::value, "");
 }
 #endif
 }


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r294159 - [libcxx] [test] Avoid MSVC's non-Standard ABI in underlying_type.pass.cpp.

2017-02-05 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Sun Feb  5 16:48:13 2017
New Revision: 294159

URL: http://llvm.org/viewvc/llvm-project?rev=294159&view=rev
Log:
[libcxx] [test] Avoid MSVC's non-Standard ABI in underlying_type.pass.cpp.

When compiled with Clang for Windows, this was emitting "enumerator value
evaluates to 4294967295, which cannot be narrowed to type 'int' 
[-Wc++11-narrowing]".

The test should more strenuously avoid poking this ABI deficiency (and it
already has coverage for explicitly specified underlying types).

Fixes D29140.

Modified:

libcxx/trunk/test/std/utilities/meta/meta.trans/meta.trans.other/underlying_type.pass.cpp

Modified: 
libcxx/trunk/test/std/utilities/meta/meta.trans/meta.trans.other/underlying_type.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/meta/meta.trans/meta.trans.other/underlying_type.pass.cpp?rev=294159&r1=294158&r2=294159&view=diff
==
--- 
libcxx/trunk/test/std/utilities/meta/meta.trans/meta.trans.other/underlying_type.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/utilities/meta/meta.trans/meta.trans.other/underlying_type.pass.cpp
 Sun Feb  5 16:48:13 2017
@@ -17,24 +17,32 @@
 #include "test_macros.h"
 
 enum E { V = INT_MIN };
-enum F { W = UINT_MAX };
 
-int main()
-{
 #if !defined(_WIN32) || defined(__MINGW32__)
-typedef unsigned ExpectUnsigned;
+#define TEST_UNSIGNED_UNDERLYING_TYPE 1
 #else
-typedef int ExpectUnsigned; // MSVC's ABI doesn't follow the Standard
+#define TEST_UNSIGNED_UNDERLYING_TYPE 0 // MSVC's ABI doesn't follow the 
Standard
 #endif
+
+#if TEST_UNSIGNED_UNDERLYING_TYPE
+enum F { W = UINT_MAX };
+#endif // TEST_UNSIGNED_UNDERLYING_TYPE
+
+int main()
+{
 static_assert((std::is_same::type, int>::value),
   "E has the wrong underlying type");
-static_assert((std::is_same::type, 
ExpectUnsigned>::value),
+#if TEST_UNSIGNED_UNDERLYING_TYPE
+static_assert((std::is_same::type, 
unsigned>::value),
   "F has the wrong underlying type");
+#endif // TEST_UNSIGNED_UNDERLYING_TYPE
 
 #if TEST_STD_VER > 11
 static_assert((std::is_same, int>::value), "");
-static_assert((std::is_same, 
ExpectUnsigned>::value), "");
-#endif
+#if TEST_UNSIGNED_UNDERLYING_TYPE
+static_assert((std::is_same, unsigned>::value), 
"");
+#endif // TEST_UNSIGNED_UNDERLYING_TYPE
+#endif // TEST_STD_VER > 11
 
 #if TEST_STD_VER >= 11
 enum G : char { };
@@ -43,6 +51,6 @@ int main()
   "G has the wrong underlying type");
 #if TEST_STD_VER > 11
 static_assert((std::is_same, char>::value), "");
-#endif
+#endif // TEST_STD_VER > 11
 #endif // TEST_STD_VER >= 11
 }


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r294160 - [libcxx] [test] Fix comment typos.

2017-02-05 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Sun Feb  5 16:48:20 2017
New Revision: 294160

URL: http://llvm.org/viewvc/llvm-project?rev=294160&view=rev
Log:
[libcxx] [test] Fix comment typos.

No functional change, no code review.

Modified:

libcxx/trunk/test/libcxx/utilities/function.objects/func.require/invoke_helpers.h

libcxx/trunk/test/std/experimental/filesystem/fs.filesystem.synopsis/file_time_type.pass.cpp

libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.pass.cpp
libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc.pass.cpp

Modified: 
libcxx/trunk/test/libcxx/utilities/function.objects/func.require/invoke_helpers.h
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/utilities/function.objects/func.require/invoke_helpers.h?rev=294160&r1=294159&r2=294160&view=diff
==
--- 
libcxx/trunk/test/libcxx/utilities/function.objects/func.require/invoke_helpers.h
 (original)
+++ 
libcxx/trunk/test/libcxx/utilities/function.objects/func.require/invoke_helpers.h
 Sun Feb  5 16:48:20 2017
@@ -129,7 +129,7 @@ private:
 };
 
 
//==
-// DerivedFromBase - A type that derives from it's template argument 'Base'
+// DerivedFromBase - A type that derives from its template argument 'Base'
 template 
 struct DerivedFromType : public Base {
 DerivedFromType() : Base() {}
@@ -138,7 +138,7 @@ struct DerivedFromType : public Base {
 };
 
 
//==
-// DerefToType - A type that dereferences to it's template argument 'To'.
+// DerefToType - A type that dereferences to its template argument 'To'.
 //   The cv-ref qualifiers of the 'DerefToType' object do not propagate
 //   to the resulting 'To' object.
 template 
@@ -154,7 +154,7 @@ struct DerefToType {
 };
 
 
//==
-// DerefPropToType - A type that dereferences to it's template argument 'To'.
+// DerefPropToType - A type that dereferences to its template argument 'To'.
 //   The cv-ref qualifiers of the 'DerefPropToType' object propagate
 //   to the resulting 'To' object.
 template 

Modified: 
libcxx/trunk/test/std/experimental/filesystem/fs.filesystem.synopsis/file_time_type.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/filesystem/fs.filesystem.synopsis/file_time_type.pass.cpp?rev=294160&r1=294159&r2=294160&view=diff
==
--- 
libcxx/trunk/test/std/experimental/filesystem/fs.filesystem.synopsis/file_time_type.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/experimental/filesystem/fs.filesystem.synopsis/file_time_type.pass.cpp
 Sun Feb  5 16:48:20 2017
@@ -18,8 +18,8 @@
 #include 
 
 // system_clock is used because it meets the requirements of TrivialClock,
-// and it's resolution and range of system_clock should match the operating
-// systems file time type.
+// and the resolution and range of system_clock should match the operating
+// system's file time type.
 typedef std::chrono::system_clock  ExpectedClock;
 typedef std::chrono::time_point ExpectedTimePoint;
 

Modified: 
libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.pass.cpp?rev=294160&r1=294159&r2=294160&view=diff
==
--- 
libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.pass.cpp
 Sun Feb  5 16:48:20 2017
@@ -66,7 +66,7 @@ constexpr bool do_constexpr_test(Tuple&&
 return std::make_from_tuple(std::forward(tup)).args == tup;
 }
 
-// Needed by do_forwarding_test() since it compare pairs of different types.
+// Needed by do_forwarding_test() since it compares pairs of different types.
 template 
 inline bool operator==(const std::pair& lhs, const std::pair& 
rhs) {
 return lhs.first == rhs.first && lhs.second == rhs.second;

Modified: 
libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc.pass.cpp?rev=294160&r1=294159&r2=294160&view=diff
==
--- 
libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc.pass.cpp 
(original)
+++ 
libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/alloc.pass.cpp 
Sun Feb  5 16:48:20 2017
@@ -96,7 +96,7 @@ int main()
 }
 {
 // Test that the uses-allocator default constructor does not evaluate
-/

[libcxx] r294161 - [libcxx] [test] Strip trailing whitespace.

2017-02-05 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Sun Feb  5 16:48:27 2017
New Revision: 294161

URL: http://llvm.org/viewvc/llvm-project?rev=294161&view=rev
Log:
[libcxx] [test] Strip trailing whitespace.

No functional change, no code review.

Modified:
libcxx/trunk/test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp
libcxx/trunk/test/std/utilities/optional/optional.nullopt/nullopt_t.fail.cpp
libcxx/trunk/test/std/utilities/optional/optional.nullopt/nullopt_t.pass.cpp

Modified: 
libcxx/trunk/test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp?rev=294161&r1=294160&r2=294161&view=diff
==
--- libcxx/trunk/test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp 
(original)
+++ libcxx/trunk/test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp 
Sun Feb  5 16:48:27 2017
@@ -112,15 +112,15 @@ int main()
 typedef std::basic_string, A> S;
const char * p1 = "This is my first string";
const char * p2 = "This is my second string";
-   
+
 alloc_imp imp1;
 alloc_imp imp2;
S s1(p1, A(&imp1));
S s2(p2, A(&imp2));
-   
+
assert(s1 == p1);
assert(s2 == p2);
-   
+
imp2.deactivate();
test_assign(s1, s2);
assert(s1 == p1);

Modified: 
libcxx/trunk/test/std/utilities/optional/optional.nullopt/nullopt_t.fail.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/optional/optional.nullopt/nullopt_t.fail.cpp?rev=294161&r1=294160&r2=294161&view=diff
==
--- 
libcxx/trunk/test/std/utilities/optional/optional.nullopt/nullopt_t.fail.cpp 
(original)
+++ 
libcxx/trunk/test/std/utilities/optional/optional.nullopt/nullopt_t.fail.cpp 
Sun Feb  5 16:48:27 2017
@@ -15,7 +15,7 @@
 
 // [optional.nullopt]/2:
 //   Type nullopt_t shall not have a default constructor or an 
initializer-list constructor.
-//   It shall not be an aggregate and shall be a literal type. 
+//   It shall not be an aggregate and shall be a literal type.
 //   Constant nullopt shall be initialized with an argument of literal type.
 
 #include 

Modified: 
libcxx/trunk/test/std/utilities/optional/optional.nullopt/nullopt_t.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/optional/optional.nullopt/nullopt_t.pass.cpp?rev=294161&r1=294160&r2=294161&view=diff
==
--- 
libcxx/trunk/test/std/utilities/optional/optional.nullopt/nullopt_t.pass.cpp 
(original)
+++ 
libcxx/trunk/test/std/utilities/optional/optional.nullopt/nullopt_t.pass.cpp 
Sun Feb  5 16:48:27 2017
@@ -15,7 +15,7 @@
 
 // [optional.nullopt]/2:
 //   Type nullopt_t shall not have a default constructor or an 
initializer-list constructor.
-//   It shall not be an aggregate and shall be a literal type. 
+//   It shall not be an aggregate and shall be a literal type.
 //   Constant nullopt shall be initialized with an argument of literal type.
 
 #include 


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r308533 - [libcxx] [test] Fix MSVC warning C4067 "unexpected tokens following preprocessor directive - expected a newline".

2017-07-19 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Wed Jul 19 15:02:25 2017
New Revision: 308533

URL: http://llvm.org/viewvc/llvm-project?rev=308533&view=rev
Log:
[libcxx] [test] Fix MSVC warning C4067 "unexpected tokens following 
preprocessor directive - expected a newline".

Also fixes Clang/LLVM 4.0 (for Windows) error "function-like macro 
'TEST_GLIBC_PREREQ' is not defined".

Fixes D34535.

Modified:

libcxx/trunk/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp

Modified: 
libcxx/trunk/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp?rev=308533&r1=308532&r2=308533&view=diff
==
--- 
libcxx/trunk/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp
 Wed Jul 19 15:02:25 2017
@@ -117,7 +117,13 @@ int main()
 // GLIBC <= 2.23 uses currency_symbol=""
 // GLIBC >= 2.24 uses currency_symbol=""
 // See also: 
http://www.fileformat.info/info/unicode/char/20bd/index.htm
-#if defined(TEST_GLIBC_PREREQ) && TEST_GLIBC_PREREQ(2, 24)
+#if defined(TEST_GLIBC_PREREQ)
+#if TEST_GLIBC_PREREQ(2, 24)
+#define TEST_GLIBC_2_24_CURRENCY_SYMBOL
+#endif
+#endif
+
+#if defined(TEST_GLIBC_2_24_CURRENCY_SYMBOL)
 assert(f.curr_symbol() == " \u20BD");
 #else
 assert(f.curr_symbol() == " \xD1\x80\xD1\x83\xD0\xB1");
@@ -129,7 +135,7 @@ int main()
 }
 {
 Fwf f(LOCALE_ru_RU_UTF_8, 1);
-#if defined(TEST_GLIBC_PREREQ) && TEST_GLIBC_PREREQ(2, 24)
+#if defined(TEST_GLIBC_2_24_CURRENCY_SYMBOL)
 assert(f.curr_symbol() == L" \u20BD");
 #else
 assert(f.curr_symbol() == L" \x440\x443\x431");


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r308532 - [libcxx] [test] Fix MSVC warning C4242 "conversion from 'int' to 'const char', possible loss of data".

2017-07-19 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Wed Jul 19 15:02:22 2017
New Revision: 308532

URL: http://llvm.org/viewvc/llvm-project?rev=308532&view=rev
Log:
[libcxx] [test] Fix MSVC warning C4242 "conversion from 'int' to 'const char', 
possible loss of data".

Fixes D34534.

Modified:

libcxx/trunk/test/std/input.output/iostream.format/ext.manip/put_money.pass.cpp

libcxx/trunk/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/streambuf.pass.cpp

Modified: 
libcxx/trunk/test/std/input.output/iostream.format/ext.manip/put_money.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/input.output/iostream.format/ext.manip/put_money.pass.cpp?rev=308532&r1=308531&r2=308532&view=diff
==
--- 
libcxx/trunk/test/std/input.output/iostream.format/ext.manip/put_money.pass.cpp 
(original)
+++ 
libcxx/trunk/test/std/input.output/iostream.format/ext.manip/put_money.pass.cpp 
Wed Jul 19 15:02:22 2017
@@ -40,7 +40,7 @@ protected:
 if (__c != base::traits_type::eof())
 {
 int n = str_.size();
-str_.push_back(__c);
+str_.push_back(static_cast(__c));
 str_.resize(str_.capacity());
 base::setp(const_cast(str_.data()),
const_cast(str_.data() + str_.size()));

Modified: 
libcxx/trunk/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/streambuf.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/streambuf.pass.cpp?rev=308532&r1=308531&r2=308532&view=diff
==
--- 
libcxx/trunk/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/streambuf.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/streambuf.pass.cpp
 Wed Jul 19 15:02:22 2017
@@ -46,7 +46,7 @@ protected:
 if (__c != base::traits_type::eof())
 {
 int n = str_.size();
-str_.push_back(__c);
+str_.push_back(static_cast(__c));
 str_.resize(str_.capacity());
 base::setp(const_cast(str_.data()),
const_cast(str_.data() + str_.size()));


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r308535 - [libcxx] [test] Update msvc_stdlib_force_include.hpp.

2017-07-19 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Wed Jul 19 15:02:33 2017
New Revision: 308535

URL: http://llvm.org/viewvc/llvm-project?rev=308535&view=rev
Log:
[libcxx] [test] Update msvc_stdlib_force_include.hpp.

MSVC's STL is replacing _HAS_FUNCTION_ASSIGN with 
_HAS_FUNCTION_ALLOCATOR_SUPPORT,
and is adding _HAS_UNEXPECTED.

Modified:
libcxx/trunk/test/support/msvc_stdlib_force_include.hpp

Modified: libcxx/trunk/test/support/msvc_stdlib_force_include.hpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/support/msvc_stdlib_force_include.hpp?rev=308535&r1=308534&r2=308535&view=diff
==
--- libcxx/trunk/test/support/msvc_stdlib_force_include.hpp (original)
+++ libcxx/trunk/test/support/msvc_stdlib_force_include.hpp Wed Jul 19 15:02:33 
2017
@@ -70,9 +70,10 @@ const AssertionDialogAvoider assertion_d
 #define _ENABLE_ATOMIC_ALIGNMENT_FIX
 
 // Enable features that /std:c++latest removes by default.
-#define _HAS_AUTO_PTR_ETC  1
-#define _HAS_FUNCTION_ASSIGN   1
-#define _HAS_OLD_IOSTREAMS_MEMBERS 1
+#define _HAS_AUTO_PTR_ETC   1
+#define _HAS_FUNCTION_ALLOCATOR_SUPPORT 1
+#define _HAS_OLD_IOSTREAMS_MEMBERS  1
+#define _HAS_UNEXPECTED 1
 
 // Silence warnings about raw pointers and other unchecked iterators.
 #define _SCL_SECURE_NO_WARNINGS


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2017-07-19 Thread Stephan T. Lavavej via cfe-commits
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 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 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 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 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/tr

[libcxx] r309322 - [libcxx] [test] Remove an unused local typedef in enable_shared_from_this.pass.cpp.

2017-07-27 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Thu Jul 27 14:16:37 2017
New Revision: 309322

URL: http://llvm.org/viewvc/llvm-project?rev=309322&view=rev
Log:
[libcxx] [test] Remove an unused local typedef in 
enable_shared_from_this.pass.cpp.

Trivial change, committed without review.

Modified:

libcxx/trunk/test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp

Modified: 
libcxx/trunk/test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp?rev=309322&r1=309321&r2=309322&view=diff
==
--- 
libcxx/trunk/test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/utilities/memory/util.smartptr/util.smartptr.enab/enable_shared_from_this.pass.cpp
 Thu Jul 27 14:16:37 2017
@@ -80,7 +80,6 @@ int main()
 }
 {
   typedef std::shared_ptr APtr;
-  typedef std::weak_ptr WeakAPtr;
   APtr a1 = std::make_shared();
   assert(a1.use_count() == 1);
 }


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D26624: [libcxx] [test] Fix bucket_count() assumptions.

2016-11-14 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision.
STL_MSFT added reviewers: EricWF, mclow.lists.
STL_MSFT added a subscriber: cfe-commits.

[libcxx] [test] Fix bucket_count() assumptions.

With a max_load_factor of 1.0, the only guarantee is that
bucket_count() >= size(). (Note: setting max_load_factor without
rehashing isn't supposed to affect this, because setting
max_load_factor is currently specified to be constant time.)


https://reviews.llvm.org/D26624

Files:
  test/std/containers/unord/unord.map/swap_member.pass.cpp
  test/std/containers/unord/unord.map/unord.map.swap/swap_non_member.pass.cpp
  test/std/containers/unord/unord.multimap/swap_member.pass.cpp
  
test/std/containers/unord/unord.multimap/unord.multimap.swap/swap_non_member.pass.cpp
  test/std/containers/unord/unord.multiset/swap_member.pass.cpp
  
test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_non_member.pass.cpp
  test/std/containers/unord/unord.set/swap_member.pass.cpp
  test/std/containers/unord/unord.set/unord.set.swap/swap_non_member.pass.cpp

Index: test/std/containers/unord/unord.set/unord.set.swap/swap_non_member.pass.cpp
===
--- test/std/containers/unord/unord.set/unord.set.swap/swap_non_member.pass.cpp
+++ test/std/containers/unord/unord.set/unord.set.swap/swap_non_member.pass.cpp
@@ -77,7 +77,7 @@
 c2.max_load_factor(2);
 swap(c1, c2);
 
-assert(c1.bucket_count() >= 11);
+assert(c1.bucket_count() >= 8);
 assert(c1.size() == 8);
 assert(*c1.find(10) == 10);
 assert(*c1.find(20) == 20);
@@ -132,7 +132,7 @@
 assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
 assert(c1.max_load_factor() == 2);
 
-assert(c2.bucket_count() >= 5);
+assert(c2.bucket_count() >= 4);
 assert(c2.size() == 4);
 assert(c2.count(1) == 1);
 assert(c2.count(2) == 1);
@@ -176,7 +176,7 @@
 c2.max_load_factor(2);
 swap(c1, c2);
 
-assert(c1.bucket_count() >= 11);
+assert(c1.bucket_count() >= 8);
 assert(c1.size() == 8);
 assert(*c1.find(10) == 10);
 assert(*c1.find(20) == 20);
@@ -193,7 +193,7 @@
 assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
 assert(c1.max_load_factor() == 2);
 
-assert(c2.bucket_count() >= 5);
+assert(c2.bucket_count() >= 4);
 assert(c2.size() == 4);
 assert(c2.count(1) == 1);
 assert(c2.count(2) == 1);
@@ -258,7 +258,7 @@
 c2.max_load_factor(2);
 swap(c1, c2);
 
-assert(c1.bucket_count() >= 11);
+assert(c1.bucket_count() >= 8);
 assert(c1.size() == 8);
 assert(*c1.find(10) == 10);
 assert(*c1.find(20) == 20);
@@ -313,7 +313,7 @@
 assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
 assert(c1.max_load_factor() == 2);
 
-assert(c2.bucket_count() >= 5);
+assert(c2.bucket_count() >= 4);
 assert(c2.size() == 4);
 assert(c2.count(1) == 1);
 assert(c2.count(2) == 1);
@@ -357,7 +357,7 @@
 c2.max_load_factor(2);
 swap(c1, c2);
 
-assert(c1.bucket_count() >= 11);
+assert(c1.bucket_count() >= 8);
 assert(c1.size() == 8);
 assert(*c1.find(10) == 10);
 assert(*c1.find(20) == 20);
@@ -374,7 +374,7 @@
 assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
 assert(c1.max_load_factor() == 2);
 
-assert(c2.bucket_count() >= 5);
+assert(c2.bucket_count() >= 4);
 assert(c2.size() == 4);
 assert(c2.count(1) == 1);
 assert(c2.count(2) == 1);
@@ -439,7 +439,7 @@
 c2.max_load_factor(2);
 swap(c1, c2);
 
-assert(c1.bucket_count() >= 11);
+assert(c1.bucket_count() >= 8);
 assert(c1.size() == 8);
 assert(*c1.find(10) == 10);
 assert(*c1.find(20) == 20);
@@ -494,7 +494,7 @@
 assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
 assert(c1.max_load_factor() == 2);
 
-assert(c2.bucket_count() >= 5);
+assert(c2.bucket_count() >= 4);
 assert(c2.size() == 4);
 assert(c2.count(1) == 1);
 assert(c2.count(2) == 1);
@@ -538,7 +538,7 @@
 c2.max_load_factor(2);
 swap(c1, c2);
 
-assert(c1.bucket_count() >= 11);
+assert(c1.bucket_count() >= 8);
 assert(c1.size() == 8);
 assert(*c1.find(10) == 10);
 assert(*c1.find(20) == 20);
@@ -555,7 +555,7 @@
 assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
 assert(c1.max_load_factor() == 2);
 
-assert(c2.bucket_count() >= 5);
+assert(c2.bucket_count() >= 4);
 assert(c2.size() == 4);
 assert(c2.count(1) == 1);
 assert(c2.count(2) == 1);
Index: test/std/containers/unord/unord.set/swap_member.pass.cpp
===
-

[PATCH] D26625: [libcxx] [test] future_error::what() is implementation-defined.

2016-11-14 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision.
STL_MSFT added reviewers: EricWF, mclow.lists.
STL_MSFT added a subscriber: cfe-commits.

[libcxx] [test] future_error::what() is implementation-defined.


https://reviews.llvm.org/D26625

Files:
  test/std/thread/futures/futures.future_error/what.pass.cpp


Index: test/std/thread/futures/futures.future_error/what.pass.cpp
===
--- test/std/thread/futures/futures.future_error/what.pass.cpp
+++ test/std/thread/futures/futures.future_error/what.pass.cpp
@@ -26,25 +26,27 @@
 #include 
 #include 
 
+#include "test_macros.h"
+
 int main()
 {
 {
 std::future_error 
f(std::make_error_code(std::future_errc::broken_promise));
-assert(std::strcmp(f.what(), "The associated promise has been 
destructed prior "
+LIBCPP_ASSERT(std::strcmp(f.what(), "The associated promise has been 
destructed prior "
   "to the associated state becoming ready.") == 0);
 }
 {
 std::future_error 
f(std::make_error_code(std::future_errc::future_already_retrieved));
-assert(std::strcmp(f.what(), "The future has already been retrieved 
from "
+LIBCPP_ASSERT(std::strcmp(f.what(), "The future has already been 
retrieved from "
   "the promise or packaged_task.") == 0);
 }
 {
 std::future_error 
f(std::make_error_code(std::future_errc::promise_already_satisfied));
-assert(std::strcmp(f.what(), "The state of the promise has already 
been set.") == 0);
+LIBCPP_ASSERT(std::strcmp(f.what(), "The state of the promise has 
already been set.") == 0);
 }
 {
 std::future_error f(std::make_error_code(std::future_errc::no_state));
-assert(std::strcmp(f.what(), "Operation not permitted on an object 
without "
+LIBCPP_ASSERT(std::strcmp(f.what(), "Operation not permitted on an 
object without "
   "an associated state.") == 0);
 }
 }


Index: test/std/thread/futures/futures.future_error/what.pass.cpp
===
--- test/std/thread/futures/futures.future_error/what.pass.cpp
+++ test/std/thread/futures/futures.future_error/what.pass.cpp
@@ -26,25 +26,27 @@
 #include 
 #include 
 
+#include "test_macros.h"
+
 int main()
 {
 {
 std::future_error f(std::make_error_code(std::future_errc::broken_promise));
-assert(std::strcmp(f.what(), "The associated promise has been destructed prior "
+LIBCPP_ASSERT(std::strcmp(f.what(), "The associated promise has been destructed prior "
   "to the associated state becoming ready.") == 0);
 }
 {
 std::future_error f(std::make_error_code(std::future_errc::future_already_retrieved));
-assert(std::strcmp(f.what(), "The future has already been retrieved from "
+LIBCPP_ASSERT(std::strcmp(f.what(), "The future has already been retrieved from "
   "the promise or packaged_task.") == 0);
 }
 {
 std::future_error f(std::make_error_code(std::future_errc::promise_already_satisfied));
-assert(std::strcmp(f.what(), "The state of the promise has already been set.") == 0);
+LIBCPP_ASSERT(std::strcmp(f.what(), "The state of the promise has already been set.") == 0);
 }
 {
 std::future_error f(std::make_error_code(std::future_errc::no_state));
-assert(std::strcmp(f.what(), "Operation not permitted on an object without "
+LIBCPP_ASSERT(std::strcmp(f.what(), "Operation not permitted on an object without "
   "an associated state.") == 0);
 }
 }
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D26626: [libcxx] [test] Fix an improper assumption about Null Forward Iterators.

2016-11-14 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision.
STL_MSFT added reviewers: EricWF, mclow.lists.
STL_MSFT added a subscriber: cfe-commits.

[libcxx] [test] Fix an improper assumption about Null Forward Iterators.

Value-initialized iterators still can't be compared to those with parents.


https://reviews.llvm.org/D26626

Files:
  test/std/containers/sequences/list/iterators.pass.cpp


Index: test/std/containers/sequences/list/iterators.pass.cpp
===
--- test/std/containers/sequences/list/iterators.pass.cpp
+++ test/std/containers/sequences/list/iterators.pass.cpp
@@ -138,7 +138,6 @@
 #endif
 #if TEST_STD_VER > 11
 {
-std::list c;
 std::list::iterator ii1{}, ii2{};
 std::list::iterator ii4 = ii1;
 std::list::const_iterator cii{};
@@ -151,9 +150,6 @@
 assert ( (cii == ii1 ));
 assert (!(ii1 != cii ));
 assert (!(cii != ii1 ));
-
-assert ( ii1 != c.cbegin());
-assert ( cii != c.begin());
 }
 #endif
 


Index: test/std/containers/sequences/list/iterators.pass.cpp
===
--- test/std/containers/sequences/list/iterators.pass.cpp
+++ test/std/containers/sequences/list/iterators.pass.cpp
@@ -138,7 +138,6 @@
 #endif
 #if TEST_STD_VER > 11
 {
-std::list c;
 std::list::iterator ii1{}, ii2{};
 std::list::iterator ii4 = ii1;
 std::list::const_iterator cii{};
@@ -151,9 +150,6 @@
 assert ( (cii == ii1 ));
 assert (!(ii1 != cii ));
 assert (!(cii != ii1 ));
-
-assert ( ii1 != c.cbegin());
-assert ( cii != c.begin());
 }
 #endif
 
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D26623: [libcxx] [test] Swapping non-equal non-POCS allocators is UB.

2016-11-14 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision.
STL_MSFT added reviewers: EricWF, mclow.lists.
STL_MSFT added a subscriber: cfe-commits.

[libcxx] [test] Swapping non-equal non-POCS allocators is UB.

test_allocator is a non-POCS allocator. Instead of swapping containers
with A(1) and A(2), which triggers undefined behavior,
swapping A(3) with A(3) is conformant.

test/std/containers/sequences/vector/vector.special/swap.pass.cpp
Remove "#ifndef _LIBCPP_DEBUG_LEVEL" and a comment about
the now-fixed undefined behavior.


https://reviews.llvm.org/D26623

Files:
  test/std/containers/associative/map/map.special/non_member_swap.pass.cpp
  
test/std/containers/associative/multimap/multimap.special/non_member_swap.pass.cpp
  
test/std/containers/associative/multiset/multiset.special/non_member_swap.pass.cpp
  test/std/containers/associative/set/set.special/non_member_swap.pass.cpp
  test/std/containers/sequences/deque/deque.special/swap.pass.cpp
  
test/std/containers/sequences/forwardlist/forwardlist.spec/member_swap.pass.cpp
  
test/std/containers/sequences/forwardlist/forwardlist.spec/non_member_swap.pass.cpp
  test/std/containers/sequences/vector.bool/swap.pass.cpp
  test/std/containers/sequences/vector/vector.special/swap.pass.cpp
  test/std/containers/unord/unord.map/swap_member.pass.cpp
  test/std/containers/unord/unord.map/unord.map.swap/swap_non_member.pass.cpp
  test/std/containers/unord/unord.multimap/swap_member.pass.cpp
  
test/std/containers/unord/unord.multimap/unord.multimap.swap/swap_non_member.pass.cpp
  test/std/containers/unord/unord.multiset/swap_member.pass.cpp
  
test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_non_member.pass.cpp
  test/std/containers/unord/unord.set/swap_member.pass.cpp
  test/std/containers/unord/unord.set/unord.set.swap/swap_non_member.pass.cpp

Index: test/std/containers/unord/unord.set/unord.set.swap/swap_non_member.pass.cpp
===
--- test/std/containers/unord/unord.set/unord.set.swap/swap_non_member.pass.cpp
+++ test/std/containers/unord/unord.set/unord.set.swap/swap_non_member.pass.cpp
@@ -32,25 +32,25 @@
 typedef test_allocator Alloc;
 typedef std::unordered_set C;
 typedef int P;
-C c1(0, Hash(1), Compare(1), Alloc(1));
-C c2(0, Hash(2), Compare(2), Alloc(2));
+C c1(0, Hash(1), Compare(1), Alloc(3));
+C c2(0, Hash(2), Compare(2), Alloc(3));
 c2.max_load_factor(2);
 swap(c1, c2);
 
 LIBCPP_ASSERT(c1.bucket_count() == 0);
 assert(c1.size() == 0);
 assert(c1.hash_function() == Hash(2));
 assert(c1.key_eq() == Compare(2));
-assert(c1.get_allocator() == Alloc(1));
+assert(c1.get_allocator() == Alloc(3));
 assert(std::distance(c1.begin(), c1.end()) == c1.size());
 assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
 assert(c1.max_load_factor() == 2);
 
 LIBCPP_ASSERT(c2.bucket_count() == 0);
 assert(c2.size() == 0);
 assert(c2.hash_function() == Hash(1));
 assert(c2.key_eq() == Compare(1));
-assert(c2.get_allocator() == Alloc(2));
+assert(c2.get_allocator() == Alloc(3));
 assert(std::distance(c2.begin(), c2.end()) == c2.size());
 assert(std::distance(c2.cbegin(), c2.cend()) == c2.size());
 assert(c2.max_load_factor() == 1);
@@ -72,8 +72,8 @@
 P(70),
 P(80)
 };
-C c1(0, Hash(1), Compare(1), Alloc(1));
-C c2(std::begin(a2), std::end(a2), 0, Hash(2), Compare(2), Alloc(2));
+C c1(0, Hash(1), Compare(1), Alloc(3));
+C c2(std::begin(a2), std::end(a2), 0, Hash(2), Compare(2), Alloc(3));
 c2.max_load_factor(2);
 swap(c1, c2);
 
@@ -89,16 +89,16 @@
 assert(*c1.find(80) == 80);
 assert(c1.hash_function() == Hash(2));
 assert(c1.key_eq() == Compare(2));
-assert(c1.get_allocator() == Alloc(1));
+assert(c1.get_allocator() == Alloc(3));
 assert(std::distance(c1.begin(), c1.end()) == c1.size());
 assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
 assert(c1.max_load_factor() == 2);
 
 LIBCPP_ASSERT(c2.bucket_count() == 0);
 assert(c2.size() == 0);
 assert(c2.hash_function() == Hash(1));
 assert(c2.key_eq() == Compare(1));
-assert(c2.get_allocator() == Alloc(2));
+assert(c2.get_allocator() == Alloc(3));
 assert(std::distance(c2.begin(), c2.end()) == c2.size());
 assert(std::distance(c2.cbegin(), c2.cend()) == c2.size());
 assert(c2.max_load_factor() == 1);
@@ -118,16 +118,16 @@
 P(1),
 P(2)
 };
-C c1(std::begin(a1), std::end(a1), 0, Hash(1), Compare(1), Alloc(1));
-C c2(0, Hash(2), Compare(2), Alloc(2));
+C c1(std::begin(a1), std::end(a1), 0, Hash(1), Compare(1), Alloc(3));
+C c2(0, Hash(2), Compare(2), Alloc(3));
 

[PATCH] D26627: [libcxx] [test] Fix ordering assumptions in unordered container tests.

2016-11-14 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision.
STL_MSFT added reviewers: EricWF, mclow.lists.
STL_MSFT added a subscriber: cfe-commits.

[libcxx] [test] Fix ordering assumptions in unordered container tests.


https://reviews.llvm.org/D26627

Files:
  
test/std/containers/unord/unord.multimap/unord.multimap.modifiers/emplace_hint.pass.cpp
  
test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_move.pass.cpp
  
test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_alloc.pass.cpp

Index: test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_alloc.pass.cpp
===
--- test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_alloc.pass.cpp
+++ test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_alloc.pass.cpp
@@ -146,18 +146,10 @@
 C c(std::move(c0), A());
 assert(c.bucket_count() >= 7);
 assert(c.size() == 6);
-C::const_iterator i = c.cbegin();
-assert(*i == 4);
-++i;
-assert(*i == 3);
-++i;
-assert(*i == 2);
-++i;
-assert(*i == 2);
-++i;
-assert(*i == 1);
-++i;
-assert(*i == 1);
+assert(c.count(1) == 2);
+assert(c.count(2) == 2);
+assert(c.count(3) == 1);
+assert(c.count(4) == 1);
 assert(c.hash_function() == test_hash >(8));
 assert(c.key_eq() == test_compare >(9));
 assert(c.get_allocator() == A());
Index: test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_move.pass.cpp
===
--- test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_move.pass.cpp
+++ test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_move.pass.cpp
@@ -204,18 +204,10 @@
 c = std::move(c0);
 LIBCPP_ASSERT(c.bucket_count() == 7);
 assert(c.size() == 6);
-C::const_iterator i = c.cbegin();
-assert(*i == 4);
-++i;
-assert(*i == 3);
-++i;
-assert(*i == 2);
-++i;
-assert(*i == 2);
-++i;
-assert(*i == 1);
-++i;
-assert(*i == 1);
+assert(c.count(1) == 2);
+assert(c.count(2) == 2);
+assert(c.count(3) == 1);
+assert(c.count(4) == 1);
 assert(c.hash_function() == test_hash >(8));
 assert(c.key_eq() == test_compare >(9));
 assert(c.get_allocator() == A());
Index: test/std/containers/unord/unord.multimap/unord.multimap.modifiers/emplace_hint.pass.cpp
===
--- test/std/containers/unord/unord.multimap/unord.multimap.modifiers/emplace_hint.pass.cpp
+++ test/std/containers/unord/unord.multimap/unord.multimap.modifiers/emplace_hint.pass.cpp
@@ -25,6 +25,7 @@
 
 #include "../../../Emplaceable.h"
 #include "min_allocator.h"
+#include "test_macros.h"
 
 int main()
 {
@@ -44,20 +45,20 @@
 assert(c.size() == 2);
 assert(r->first == 3);
 assert(r->second == Emplaceable(5, 6));
-assert(r == next(c.begin()));
+LIBCPP_ASSERT(r == next(c.begin()));
 
 r = c.emplace_hint(r, std::piecewise_construct, std::forward_as_tuple(3),
 std::forward_as_tuple(6, 7));
 assert(c.size() == 3);
 assert(r->first == 3);
 assert(r->second == Emplaceable(6, 7));
-assert(r == next(c.begin()));
+LIBCPP_ASSERT(r == next(c.begin()));
 r = c.begin();
 assert(r->first == 3);
-assert(r->second == Emplaceable());
+LIBCPP_ASSERT(r->second == Emplaceable());
 r = next(r, 2);
 assert(r->first == 3);
-assert(r->second == Emplaceable(5, 6));
+LIBCPP_ASSERT(r->second == Emplaceable(5, 6));
 }
 #if TEST_STD_VER >= 11
 {
@@ -76,20 +77,20 @@
 assert(c.size() == 2);
 assert(r->first == 3);
 assert(r->second == Emplaceable(5, 6));
-assert(r == next(c.begin()));
+LIBCPP_ASSERT(r == next(c.begin()));
 
 r = c.emplace_hint(r, std::piecewise_construct, std::forward_as_tuple(3),
 std::forward_as_tuple(6, 7));
 assert(c.size() == 3);
 assert(r->first == 3);
 assert(r->second == Emplaceable(6, 7));
-assert(r == next(c.begin()));
+LIBCPP_ASSERT(r == next(c.begin()));
 r = c.begin();
 assert(r->first == 3);
-assert(r->second == Emplaceable());
+LIBCPP_ASSERT(r->second == Emplaceable());
 r = next(r, 2);
 assert(r->first == 3);
-assert(r->second == Emplaceable(5, 6));
+LIBCPP_ASSERT(r->second == Emplaceable(5, 6));
 }
 #endif
 #if _LIBCPP_DEBUG >= 1
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/c

[libcxx] r286982 - [libcxx] [test] D26624: Fix bucket_count() assumptions.

2016-11-15 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Tue Nov 15 11:00:24 2016
New Revision: 286982

URL: http://llvm.org/viewvc/llvm-project?rev=286982&view=rev
Log:
[libcxx] [test] D26624: Fix bucket_count() assumptions.

With a max_load_factor of 1.0, the only guarantee is that
bucket_count() >= size(). (Note: setting max_load_factor without
rehashing isn't supposed to affect this, because setting
max_load_factor is currently specified to be constant time.)

Modified:
libcxx/trunk/test/std/containers/unord/unord.map/swap_member.pass.cpp

libcxx/trunk/test/std/containers/unord/unord.map/unord.map.swap/swap_non_member.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.multimap/swap_member.pass.cpp

libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.swap/swap_non_member.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.multiset/swap_member.pass.cpp

libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_non_member.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.set/swap_member.pass.cpp

libcxx/trunk/test/std/containers/unord/unord.set/unord.set.swap/swap_non_member.pass.cpp

Modified: libcxx/trunk/test/std/containers/unord/unord.map/swap_member.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.map/swap_member.pass.cpp?rev=286982&r1=286981&r2=286982&view=diff
==
--- libcxx/trunk/test/std/containers/unord/unord.map/swap_member.pass.cpp 
(original)
+++ libcxx/trunk/test/std/containers/unord/unord.map/swap_member.pass.cpp Tue 
Nov 15 11:00:24 2016
@@ -77,7 +77,7 @@ int main()
 c2.max_load_factor(2);
 c1.swap(c2);
 
-assert(c1.bucket_count() >= 11);
+assert(c1.bucket_count() >= 8);
 assert(c1.size() == 8);
 assert(c1.at(10) == "ten");
 assert(c1.at(20) == "twenty");
@@ -132,7 +132,7 @@ int main()
 assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
 assert(c1.max_load_factor() == 2);
 
-assert(c2.bucket_count() >= 5);
+assert(c2.bucket_count() >= 4);
 assert(c2.size() == 4);
 assert(c2.at(1) == "one");
 assert(c2.at(2) == "two");
@@ -176,7 +176,7 @@ int main()
 c2.max_load_factor(2);
 c1.swap(c2);
 
-assert(c1.bucket_count() >= 11);
+assert(c1.bucket_count() >= 8);
 assert(c1.size() == 8);
 assert(c1.at(10) == "ten");
 assert(c1.at(20) == "twenty");
@@ -193,7 +193,7 @@ int main()
 assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
 assert(c1.max_load_factor() == 2);
 
-assert(c2.bucket_count() >= 5);
+assert(c2.bucket_count() >= 4);
 assert(c2.size() == 4);
 assert(c2.at(1) == "one");
 assert(c2.at(2) == "two");
@@ -257,7 +257,7 @@ int main()
 c2.max_load_factor(2);
 c1.swap(c2);
 
-assert(c1.bucket_count() >= 11);
+assert(c1.bucket_count() >= 8);
 assert(c1.size() == 8);
 assert(c1.at(10) == "ten");
 assert(c1.at(20) == "twenty");
@@ -312,7 +312,7 @@ int main()
 assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
 assert(c1.max_load_factor() == 2);
 
-assert(c2.bucket_count() >= 5);
+assert(c2.bucket_count() >= 4);
 assert(c2.size() == 4);
 assert(c2.at(1) == "one");
 assert(c2.at(2) == "two");
@@ -356,7 +356,7 @@ int main()
 c2.max_load_factor(2);
 c1.swap(c2);
 
-assert(c1.bucket_count() >= 11);
+assert(c1.bucket_count() >= 8);
 assert(c1.size() == 8);
 assert(c1.at(10) == "ten");
 assert(c1.at(20) == "twenty");
@@ -373,7 +373,7 @@ int main()
 assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
 assert(c1.max_load_factor() == 2);
 
-assert(c2.bucket_count() >= 5);
+assert(c2.bucket_count() >= 4);
 assert(c2.size() == 4);
 assert(c2.at(1) == "one");
 assert(c2.at(2) == "two");
@@ -437,7 +437,7 @@ int main()
 c2.max_load_factor(2);
 c1.swap(c2);
 
-assert(c1.bucket_count() >= 11);
+assert(c1.bucket_count() >= 8);
 assert(c1.size() == 8);
 assert(c1.at(10) == "ten");
 assert(c1.at(20) == "twenty");
@@ -492,7 +492,7 @@ int main()
 assert(std::distance(c1.cbegin(), c1.cend()) == c1.size());
 assert(c1.max_load_factor() == 2);
 
-assert(c2.bucket_count() >= 5);
+assert(c2.bucket_count() >= 4);
 assert(c2.size() == 4);
 assert(c2.at(1) == "one");
 assert(c2.at(2) == "two");
@@ -536,7 +536,7 @@ int main()
 c2.max_load_factor(2);
 c1.swap(c2);
 
-assert(c1.bucket_count() >= 11);
+assert(c1.bucket_count() >= 8);
 assert(c1.size() == 8);
 assert(c1.at(10) == "ten");
 assert(c1.at(20) == "twenty");
@@ -553,7 

[libcxx] r286983 - [libcxx] [test] D26625: future_error::what() is implementation-defined.

2016-11-15 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Tue Nov 15 11:00:32 2016
New Revision: 286983

URL: http://llvm.org/viewvc/llvm-project?rev=286983&view=rev
Log:
[libcxx] [test] D26625: future_error::what() is implementation-defined.

Modified:
libcxx/trunk/test/std/thread/futures/futures.future_error/what.pass.cpp

Modified: 
libcxx/trunk/test/std/thread/futures/futures.future_error/what.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/thread/futures/futures.future_error/what.pass.cpp?rev=286983&r1=286982&r2=286983&view=diff
==
--- libcxx/trunk/test/std/thread/futures/futures.future_error/what.pass.cpp 
(original)
+++ libcxx/trunk/test/std/thread/futures/futures.future_error/what.pass.cpp Tue 
Nov 15 11:00:32 2016
@@ -26,25 +26,27 @@
 #include 
 #include 
 
+#include "test_macros.h"
+
 int main()
 {
 {
 std::future_error 
f(std::make_error_code(std::future_errc::broken_promise));
-assert(std::strcmp(f.what(), "The associated promise has been 
destructed prior "
+LIBCPP_ASSERT(std::strcmp(f.what(), "The associated promise has been 
destructed prior "
   "to the associated state becoming ready.") == 0);
 }
 {
 std::future_error 
f(std::make_error_code(std::future_errc::future_already_retrieved));
-assert(std::strcmp(f.what(), "The future has already been retrieved 
from "
+LIBCPP_ASSERT(std::strcmp(f.what(), "The future has already been 
retrieved from "
   "the promise or packaged_task.") == 0);
 }
 {
 std::future_error 
f(std::make_error_code(std::future_errc::promise_already_satisfied));
-assert(std::strcmp(f.what(), "The state of the promise has already 
been set.") == 0);
+LIBCPP_ASSERT(std::strcmp(f.what(), "The state of the promise has 
already been set.") == 0);
 }
 {
 std::future_error f(std::make_error_code(std::future_errc::no_state));
-assert(std::strcmp(f.what(), "Operation not permitted on an object 
without "
+LIBCPP_ASSERT(std::strcmp(f.what(), "Operation not permitted on an 
object without "
   "an associated state.") == 0);
 }
 }


___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] r286984 - [libcxx] [test] D26627: Fix ordering assumptions in unordered container tests.

2016-11-15 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft
Date: Tue Nov 15 11:00:38 2016
New Revision: 286984

URL: http://llvm.org/viewvc/llvm-project?rev=286984&view=rev
Log:
[libcxx] [test] D26627: Fix ordering assumptions in unordered container tests.

Modified:

libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/emplace_hint.pass.cpp

libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_move.pass.cpp

libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_alloc.pass.cpp

Modified: 
libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/emplace_hint.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/emplace_hint.pass.cpp?rev=286984&r1=286983&r2=286984&view=diff
==
--- 
libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/emplace_hint.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/emplace_hint.pass.cpp
 Tue Nov 15 11:00:38 2016
@@ -25,6 +25,7 @@
 
 #include "../../../Emplaceable.h"
 #include "min_allocator.h"
+#include "test_macros.h"
 
 int main()
 {
@@ -44,20 +45,20 @@ int main()
 assert(c.size() == 2);
 assert(r->first == 3);
 assert(r->second == Emplaceable(5, 6));
-assert(r == next(c.begin()));
+LIBCPP_ASSERT(r == next(c.begin()));
 
 r = c.emplace_hint(r, std::piecewise_construct, 
std::forward_as_tuple(3),
 
std::forward_as_tuple(6, 7));
 assert(c.size() == 3);
 assert(r->first == 3);
 assert(r->second == Emplaceable(6, 7));
-assert(r == next(c.begin()));
+LIBCPP_ASSERT(r == next(c.begin()));
 r = c.begin();
 assert(r->first == 3);
-assert(r->second == Emplaceable());
+LIBCPP_ASSERT(r->second == Emplaceable());
 r = next(r, 2);
 assert(r->first == 3);
-assert(r->second == Emplaceable(5, 6));
+LIBCPP_ASSERT(r->second == Emplaceable(5, 6));
 }
 #if TEST_STD_VER >= 11
 {
@@ -76,20 +77,20 @@ int main()
 assert(c.size() == 2);
 assert(r->first == 3);
 assert(r->second == Emplaceable(5, 6));
-assert(r == next(c.begin()));
+LIBCPP_ASSERT(r == next(c.begin()));
 
 r = c.emplace_hint(r, std::piecewise_construct, 
std::forward_as_tuple(3),
 
std::forward_as_tuple(6, 7));
 assert(c.size() == 3);
 assert(r->first == 3);
 assert(r->second == Emplaceable(6, 7));
-assert(r == next(c.begin()));
+LIBCPP_ASSERT(r == next(c.begin()));
 r = c.begin();
 assert(r->first == 3);
-assert(r->second == Emplaceable());
+LIBCPP_ASSERT(r->second == Emplaceable());
 r = next(r, 2);
 assert(r->first == 3);
-assert(r->second == Emplaceable(5, 6));
+LIBCPP_ASSERT(r->second == Emplaceable(5, 6));
 }
 #endif
 #if _LIBCPP_DEBUG >= 1

Modified: 
libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_move.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_move.pass.cpp?rev=286984&r1=286983&r2=286984&view=diff
==
--- 
libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_move.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_move.pass.cpp
 Tue Nov 15 11:00:38 2016
@@ -204,18 +204,10 @@ int main()
 c = std::move(c0);
 LIBCPP_ASSERT(c.bucket_count() == 7);
 assert(c.size() == 6);
-C::const_iterator i = c.cbegin();
-assert(*i == 4);
-++i;
-assert(*i == 3);
-++i;
-assert(*i == 2);
-++i;
-assert(*i == 2);
-++i;
-assert(*i == 1);
-++i;
-assert(*i == 1);
+assert(c.count(1) == 2);
+assert(c.count(2) == 2);
+assert(c.count(3) == 1);
+assert(c.count(4) == 1);
 assert(c.hash_function() == test_hash >(8));
 assert(c.key_eq() == test_compare >(9));
 assert(c.get_allocator() == A());

Modified: 
libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_alloc.pass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_alloc.pass.cpp?rev=286984&r1=286983&r2=286984&view=diff
==
--- 
libcxx/trunk/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_alloc.pass.cpp
 (original)
+++ 
libcxx/trunk/test/std/cont

[PATCH] D26625: [libcxx] [test] future_error::what() is implementation-defined.

2016-11-15 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT closed this revision.
STL_MSFT added a comment.

r286983, thanks.


https://reviews.llvm.org/D26625



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D26627: [libcxx] [test] Fix ordering assumptions in unordered container tests.

2016-11-15 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT closed this revision.
STL_MSFT added a comment.

r286984, thanks.


https://reviews.llvm.org/D26627



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D26624: [libcxx] [test] Fix bucket_count() assumptions.

2016-11-15 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT closed this revision.
STL_MSFT added a comment.

r286982, thanks.


https://reviews.llvm.org/D26624



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D26812: [libcxx] [test] In random tests, use real static_asserts and silence a warning.

2016-11-17 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision.
STL_MSFT added reviewers: EricWF, mclow.lists.
STL_MSFT added a subscriber: cfe-commits.

[libcxx] [test] In random tests, use real static_asserts and silence a warning.

One test triggers MSVC's warning C4310 "cast truncates constant value".
The code is valid, and yet the warning is valid, so I'm silencing it
through push-disable-pop.


https://reviews.llvm.org/D26812

Files:
  test/std/numerics/rand/rand.adapt/rand.adapt.disc/values.pass.cpp
  test/std/numerics/rand/rand.adapt/rand.adapt.ibits/values.pass.cpp
  test/std/numerics/rand/rand.adapt/rand.adapt.shuf/values.pass.cpp
  test/std/numerics/rand/rand.eng/rand.eng.lcong/values.pass.cpp
  test/std/numerics/rand/rand.eng/rand.eng.mers/values.pass.cpp
  test/std/numerics/rand/rand.eng/rand.eng.sub/values.pass.cpp

Index: test/std/numerics/rand/rand.eng/rand.eng.sub/values.pass.cpp
===
--- test/std/numerics/rand/rand.eng/rand.eng.sub/values.pass.cpp
+++ test/std/numerics/rand/rand.eng/rand.eng.sub/values.pass.cpp
@@ -38,8 +38,8 @@
 static_assert((E::word_size == 24), "");
 static_assert((E::short_lag == 10), "");
 static_assert((E::long_lag == 24), "");
-/*static_*/assert((E::min() == 0)/*, ""*/);
-/*static_*/assert((E::max() == 0xFF)/*, ""*/);
+static_assert((E::min() == 0), "");
+static_assert((E::max() == 0xFF), "");
 static_assert((E::default_seed == 19780503u), "");
 where(E::word_size);
 where(E::short_lag);
@@ -54,8 +54,8 @@
 static_assert((E::word_size == 48), "");
 static_assert((E::short_lag == 5), "");
 static_assert((E::long_lag == 12), "");
-/*static_*/assert((E::min() == 0)/*, ""*/);
-/*static_*/assert((E::max() == 0xull)/*, ""*/);
+static_assert((E::min() == 0), "");
+static_assert((E::max() == 0xull), "");
 static_assert((E::default_seed == 19780503u), "");
 where(E::word_size);
 where(E::short_lag);
Index: test/std/numerics/rand/rand.eng/rand.eng.mers/values.pass.cpp
===
--- test/std/numerics/rand/rand.eng/rand.eng.mers/values.pass.cpp
+++ test/std/numerics/rand/rand.eng/rand.eng.mers/values.pass.cpp
@@ -60,8 +60,8 @@
 static_assert((E::tempering_c == 0xefc6), "");
 static_assert((E::tempering_l == 18), "");
 static_assert((E::initialization_multiplier == 1812433253), "");
-/*static_*/assert((E::min() == 0)/*, ""*/);
-/*static_*/assert((E::max() == 0x)/*, ""*/);
+static_assert((E::min() == 0), "");
+static_assert((E::max() == 0x), "");
 static_assert((E::default_seed == 5489u), "");
 where(E::word_size);
 where(E::state_size);
@@ -96,8 +96,8 @@
 static_assert((E::tempering_c == 0xfff7eee0ull), "");
 static_assert((E::tempering_l == 43), "");
 static_assert((E::initialization_multiplier == 6364136223846793005ull), "");
-/*static_*/assert((E::min() == 0)/*, ""*/);
-/*static_*/assert((E::max() == 0xull)/*, ""*/);
+static_assert((E::min() == 0), "");
+static_assert((E::max() == 0xull), "");
 static_assert((E::default_seed == 5489u), "");
 where(E::word_size);
 where(E::state_size);
Index: test/std/numerics/rand/rand.eng/rand.eng.lcong/values.pass.cpp
===
--- test/std/numerics/rand/rand.eng/rand.eng.lcong/values.pass.cpp
+++ test/std/numerics/rand/rand.eng/rand.eng.lcong/values.pass.cpp
@@ -37,8 +37,19 @@
 static_assert((LCE::multiplier == a), "");
 static_assert((LCE::increment == c), "");
 static_assert((LCE::modulus == m), "");
-/*static_*/assert((LCE::min() == (c == 0u ? 1u: 0u))/*, ""*/);
-/*static_*/assert((LCE::max() == result_type(m - 1u))/*, ""*/);
+static_assert((LCE::min() == (c == 0u ? 1u: 0u)), "");
+
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable: 4310) // cast truncates constant value
+#endif // _MSC_VER
+
+static_assert((LCE::max() == result_type(m - 1u)), "");
+
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif // _MSC_VER
+
 static_assert((LCE::default_seed == 1), "");
 where(LCE::multiplier);
 where(LCE::increment);
Index: test/std/numerics/rand/rand.adapt/rand.adapt.shuf/values.pass.cpp
===
--- test/std/numerics/rand/rand.adapt/rand.adapt.shuf/values.pass.cpp
+++ test/std/numerics/rand/rand.adapt/rand.adapt.shuf/values.pass.cpp
@@ -33,8 +33,8 @@
 {
 typedef std::knuth_b E;
 static_assert(E::table_size == 256, "");
-/*static_*/assert((E::min() == 1)/*, ""*/);
-/*static_*/assert((E::max() == 2147483646)/*, ""*/);
+static_assert((E::min() == 1), "");
+static_assert((E::max() == 2147483646), "");
 where(E::table_size);
 }
 
Index: test/std/numerics/rand/rand.adapt/rand.adapt.ibits/values.pass.cpp
===

[PATCH] D26813: [libcxx] [test] allocator is non-Standard.

2016-11-17 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision.
STL_MSFT added reviewers: EricWF, mclow.lists.
STL_MSFT added a subscriber: cfe-commits.

[libcxx] [test] allocator is non-Standard.

N4582 17.6.3.5 [allocator.requirements] says that allocators are given
cv-unqualified object types, and N4582 20.9.9 [default.allocator]
implies that allocator is ill-formed (due to colliding
address() overloads). Therefore, tests for allocator
should be marked as libcxx-specific (if not removed outright).


https://reviews.llvm.org/D26813

Files:
  
test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp
  test/std/utilities/memory/default.allocator/allocator_types.pass.cpp


Index: test/std/utilities/memory/default.allocator/allocator_types.pass.cpp
===
--- test/std/utilities/memory/default.allocator/allocator_types.pass.cpp
+++ test/std/utilities/memory/default.allocator/allocator_types.pass.cpp
@@ -32,6 +32,8 @@
 #include 
 #include 
 
+#include "test_macros.h"
+
 int main()
 {
 static_assert((std::is_same::size_type, 
std::size_t>::value), "");
@@ -45,7 +47,7 @@
 std::allocator >::value), "");
 
 static_assert((std::is_same::is_always_equal, 
std::true_type>::value), "");
-static_assert((std::is_same::is_always_equal, 
std::true_type>::value), "");
+LIBCPP_STATIC_ASSERT((std::is_same::is_always_equal, std::true_type>::value), "");
 
 std::allocator a;
 std::allocator a2 = a;
Index: 
test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp
===
--- 
test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp
+++ 
test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp
@@ -16,6 +16,8 @@
 #include 
 #include 
 
+#include "test_macros.h"
+
 template 
 void test_max(size_t count)
 {
@@ -27,23 +29,19 @@
 }
 }
 
-int main()
+template 
+void test()
 {
-{  // Bug 26812 -- allocating too large
-typedef double T;
-std::allocator a;
-test_max (a.max_size() + 1);// just barely too large
-test_max (a.max_size() * 2);// significantly too 
large
-test_max (((size_t) -1) / sizeof(T) + 1);   // multiply will 
overflow
-test_max ((size_t) -1); // way too large
-}
+// Bug 26812 -- allocating too large
+std::allocator a;
+test_max (a.max_size() + 1);// just barely too large
+test_max (a.max_size() * 2);// significantly too large
+test_max (((size_t) -1) / sizeof(T) + 1);   // multiply will overflow
+test_max ((size_t) -1); // way too large
+}
 
-{
-typedef const double T;
-std::allocator a;
-test_max (a.max_size() + 1);// just barely too large
-test_max (a.max_size() * 2);// significantly too 
large
-test_max (((size_t) -1) / sizeof(T) + 1);   // multiply will 
overflow
-test_max ((size_t) -1); // way too large
-}
+int main()
+{
+test();
+LIBCPP_ONLY(test());
 }


Index: test/std/utilities/memory/default.allocator/allocator_types.pass.cpp
===
--- test/std/utilities/memory/default.allocator/allocator_types.pass.cpp
+++ test/std/utilities/memory/default.allocator/allocator_types.pass.cpp
@@ -32,6 +32,8 @@
 #include 
 #include 
 
+#include "test_macros.h"
+
 int main()
 {
 static_assert((std::is_same::size_type, std::size_t>::value), "");
@@ -45,7 +47,7 @@
 std::allocator >::value), "");
 
 static_assert((std::is_same::is_always_equal, std::true_type>::value), "");
-static_assert((std::is_same::is_always_equal, std::true_type>::value), "");
+LIBCPP_STATIC_ASSERT((std::is_same::is_always_equal, std::true_type>::value), "");
 
 std::allocator a;
 std::allocator a2 = a;
Index: test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp
===
--- test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp
+++ test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp
@@ -16,6 +16,8 @@
 #include 
 #include 
 
+#include "test_macros.h"
+
 template 
 void test_max(size_t count)
 {
@@ -27,23 +29,19 @@
 }
 }
 
-int main()
+template 
+void test()
 {
-{  // Bug 26812 -- allocating too large
-typedef double T;
-std::allocator a;
-test_max (a.max_size() + 1);// just barely too large
-test_max (a.max_size() * 2);// significantly too large
-test_max (((size_t) -1) / sizeof(T) + 1);   // multiply will overflow
-test_max ((size_t) -1);  

[PATCH] D26814: [libcxx] [test] Change ifstream constructor tests to handle read-only files.

2016-11-17 Thread Stephan T. Lavavej via cfe-commits
STL_MSFT created this revision.
STL_MSFT added reviewers: EricWF, mclow.lists.
STL_MSFT added a subscriber: cfe-commits.
Herald added a subscriber: aemerson.

[libcxx] [test] Change ifstream constructor tests to handle read-only files.

Certain source control systems like to set the read-only bit on their files,
which interferes with opening "test.dat" for both input and output.
Fortunately, we can work around this without losing test coverage.
Now, the ifstream.cons tests harmlessly ignore failures to open files for
input and output simultaneously. The ofstream.cons tests are creating writable
files (not checked into source control), where the ifstream tests will succeed.


https://reviews.llvm.org/D26814

Files:
  test/std/input.output/file.streams/fstreams/ifstream.cons/pointer.pass.cpp
  test/std/input.output/file.streams/fstreams/ifstream.cons/string.pass.cpp
  test/std/input.output/file.streams/fstreams/ofstream.cons/pointer.pass.cpp
  test/std/input.output/file.streams/fstreams/ofstream.cons/string.pass.cpp

Index: test/std/input.output/file.streams/fstreams/ofstream.cons/string.pass.cpp
===
--- test/std/input.output/file.streams/fstreams/ofstream.cons/string.pass.cpp
+++ test/std/input.output/file.streams/fstreams/ofstream.cons/string.pass.cpp
@@ -31,6 +31,12 @@
 fs >> x;
 assert(x == 3.25);
 }
+{
+std::ifstream fs(temp, std::ios_base::out);
+double x = 0;
+fs >> x;
+assert(x == 3.25);
+}
 std::remove(temp.c_str());
 {
 std::wofstream fs(temp);
@@ -42,5 +48,11 @@
 fs >> x;
 assert(x == 3.25);
 }
+{
+std::wifstream fs(temp, std::ios_base::out);
+double x = 0;
+fs >> x;
+assert(x == 3.25);
+}
 std::remove(temp.c_str());
 }
Index: test/std/input.output/file.streams/fstreams/ofstream.cons/pointer.pass.cpp
===
--- test/std/input.output/file.streams/fstreams/ofstream.cons/pointer.pass.cpp
+++ test/std/input.output/file.streams/fstreams/ofstream.cons/pointer.pass.cpp
@@ -31,6 +31,12 @@
 fs >> x;
 assert(x == 3.25);
 }
+{
+std::ifstream fs(temp.c_str(), std::ios_base::out);
+double x = 0;
+fs >> x;
+assert(x == 3.25);
+}
 std::remove(temp.c_str());
 {
 std::wofstream fs(temp.c_str());
@@ -42,5 +48,11 @@
 fs >> x;
 assert(x == 3.25);
 }
+{
+std::wifstream fs(temp.c_str(), std::ios_base::out);
+double x = 0;
+fs >> x;
+assert(x == 3.25);
+}
 std::remove(temp.c_str());
 }
Index: test/std/input.output/file.streams/fstreams/ifstream.cons/string.pass.cpp
===
--- test/std/input.output/file.streams/fstreams/ifstream.cons/string.pass.cpp
+++ test/std/input.output/file.streams/fstreams/ifstream.cons/string.pass.cpp
@@ -27,9 +27,13 @@
 }
 {
 std::ifstream fs(std::string("test.dat"), std::ios_base::out);
-double x = 0;
-fs >> x;
-assert(x == 3.25);
+
+if (fs) // "test.dat" might be read-only.
+{ // See also: test/std/input.output/file.streams/fstreams/ofstream.cons/string.pass.cpp
+double x = 0;
+fs >> x;
+assert(x == 3.25);
+}
 }
 {
 std::wifstream fs(std::string("test.dat"));
@@ -39,8 +43,12 @@
 }
 {
 std::wifstream fs(std::string("test.dat"), std::ios_base::out);
-double x = 0;
-fs >> x;
-assert(x == 3.25);
+
+if (fs) // "test.dat" might be read-only.
+{ // See also: test/std/input.output/file.streams/fstreams/ofstream.cons/string.pass.cpp
+double x = 0;
+fs >> x;
+assert(x == 3.25);
+}
 }
 }
Index: test/std/input.output/file.streams/fstreams/ifstream.cons/pointer.pass.cpp
===
--- test/std/input.output/file.streams/fstreams/ifstream.cons/pointer.pass.cpp
+++ test/std/input.output/file.streams/fstreams/ifstream.cons/pointer.pass.cpp
@@ -27,9 +27,13 @@
 }
 {
 std::ifstream fs("test.dat", std::ios_base::out);
-double x = 0;
-fs >> x;
-assert(x == 3.25);
+
+if (fs) // "test.dat" might be read-only.
+{ // See also: test/std/input.output/file.streams/fstreams/ofstream.cons/pointer.pass.cpp
+double x = 0;
+fs >> x;
+assert(x == 3.25);
+}
 }
 {
 std::wifstream fs("test.dat");
@@ -39,8 +43,12 @@
 }
 {
 std::wifstream fs("test.dat", std::ios_base::out);
-double x = 0;
-fs >> x;
-assert(x == 3.25);
+
+if (fs) // "test.dat" might be read-only.
+{ // See also: test/std/input.output/file.streams/fstreams/ofstream.cons/

  1   2   3   >