From owner-svn-src-all@freebsd.org Wed Apr 26 19:24:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53621D51CBD; Wed, 26 Apr 2017 19:24:36 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0EB64A4B; Wed, 26 Apr 2017 19:24:35 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3QJOZQD030514; Wed, 26 Apr 2017 19:24:35 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3QJOVgJ030479; Wed, 26 Apr 2017 19:24:31 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201704261924.v3QJOVgJ030479@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 26 Apr 2017 19:24:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r317451 - in vendor/libc++/dist: . include test/libcxx/atomics test/libcxx/language.support/support.dynamic test/libcxx/localization/locales/locale.convenience/conversions/conversions.s... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Apr 2017 19:24:36 -0000 Author: dim Date: Wed Apr 26 19:24:31 2017 New Revision: 317451 URL: https://svnweb.freebsd.org/changeset/base/317451 Log: Vendor import of libc++ trunk r301441: https://llvm.org/svn/llvm-project/libcxx/trunk@301441 Modified: vendor/libc++/dist/CMakeLists.txt vendor/libc++/dist/include/atomic vendor/libc++/dist/include/math.h vendor/libc++/dist/include/mutex vendor/libc++/dist/test/libcxx/atomics/diagnose_invalid_memory_order.fail.cpp vendor/libc++/dist/test/libcxx/language.support/support.dynamic/new_faligned_allocation.sh.cpp vendor/libc++/dist/test/libcxx/localization/locales/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp vendor/libc++/dist/test/libcxx/modules/cinttypes_exports.sh.cpp vendor/libc++/dist/test/libcxx/modules/clocale_exports.sh.cpp vendor/libc++/dist/test/libcxx/modules/cstdint_exports.sh.cpp vendor/libc++/dist/test/libcxx/modules/inttypes_h_exports.sh.cpp vendor/libc++/dist/test/libcxx/thread/futures/futures.promise/set_exception.pass.cpp vendor/libc++/dist/test/libcxx/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp vendor/libc++/dist/test/libcxx/thread/thread.mutex/thread_safety_lock_guard.pass.cpp vendor/libc++/dist/test/libcxx/thread/thread.mutex/thread_safety_lock_unlock.pass.cpp vendor/libc++/dist/test/libcxx/thread/thread.mutex/thread_safety_missing_unlock.fail.cpp vendor/libc++/dist/test/libcxx/thread/thread.mutex/thread_safety_requires_capability.pass.cpp vendor/libc++/dist/test/std/language.support/support.exception/except.nested/assign.pass.cpp vendor/libc++/dist/test/std/language.support/support.exception/except.nested/ctor_copy.pass.cpp vendor/libc++/dist/test/std/language.support/support.exception/except.nested/ctor_default.pass.cpp vendor/libc++/dist/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp vendor/libc++/dist/test/std/language.support/support.exception/except.nested/rethrow_nested.pass.cpp vendor/libc++/dist/test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp vendor/libc++/dist/test/std/language.support/support.exception/propagation/current_exception.pass.cpp vendor/libc++/dist/test/std/language.support/support.exception/propagation/exception_ptr.pass.cpp vendor/libc++/dist/test/std/language.support/support.exception/propagation/make_exception_ptr.pass.cpp vendor/libc++/dist/test/std/language.support/support.exception/propagation/rethrow_exception.pass.cpp vendor/libc++/dist/test/std/numerics/c.math/cmath.pass.cpp vendor/libc++/dist/test/std/strings/basic.string/string.cons/T_size_size.pass.cpp vendor/libc++/dist/test/std/utilities/any/any.class/any.modifiers/emplace.pass.cpp vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.assign/emplace.pass.cpp vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.assign/emplace_initializer_list.pass.cpp vendor/libc++/dist/utils/libcxx/test/config.py Modified: vendor/libc++/dist/CMakeLists.txt ============================================================================== --- vendor/libc++/dist/CMakeLists.txt Wed Apr 26 19:24:27 2017 (r317450) +++ vendor/libc++/dist/CMakeLists.txt Wed Apr 26 19:24:31 2017 (r317451) @@ -120,21 +120,19 @@ if (LIBCXX_CXX_ABI STREQUAL "default") ${LLVM_MAIN_SRC_DIR}/runtimes/libcxxabi/include NO_DEFAULT_PATH ) - if ((NOT LIBCXX_STANDALONE_BUILD OR HAVE_LIBCXXABI) AND - IS_DIRECTORY "${LIBCXX_LIBCXXABI_INCLUDES_INTERNAL}") + if (LIBCXX_TARGETING_MSVC) + # FIXME: Figure out how to configure the ABI library on Windows. + set(LIBCXX_CXX_ABI_LIBNAME "vcruntime") + elseif ((NOT LIBCXX_STANDALONE_BUILD OR HAVE_LIBCXXABI) AND + IS_DIRECTORY "${LIBCXX_LIBCXXABI_INCLUDES_INTERNAL}") set(LIBCXX_CXX_ABI_LIBNAME "libcxxabi") set(LIBCXX_CXX_ABI_INCLUDE_PATHS "${LIBCXX_LIBCXXABI_INCLUDES_INTERNAL}") set(LIBCXX_CXX_ABI_INTREE 1) + elseif (APPLE) + set(LIBCXX_CXX_ABI_LIBNAME "libcxxabi") + set(LIBCXX_CXX_ABI_SYSTEM 1) else() - if (LIBCXX_TARGETING_MSVC) - # FIXME: Figure out how to configure the ABI library on Windows. - set(LIBCXX_CXX_ABI_LIBNAME "vcruntime") - elseif(APPLE) - set(LIBCXX_CXX_ABI_LIBNAME "libcxxabi") - set(LIBCXX_CXX_ABI_SYSTEM 1) - else() - set(LIBCXX_CXX_ABI_LIBNAME "default") - endif() + set(LIBCXX_CXX_ABI_LIBNAME "default") endif() else() set(LIBCXX_CXX_ABI_LIBNAME "${LIBCXX_CXX_ABI}") Modified: vendor/libc++/dist/include/atomic ============================================================================== --- vendor/libc++/dist/include/atomic Wed Apr 26 19:24:27 2017 (r317450) +++ vendor/libc++/dist/include/atomic Wed Apr 26 19:24:31 2017 (r317451) @@ -861,16 +861,29 @@ kill_dependency(_Tp __y) _NOEXCEPT return __y; } -#define ATOMIC_BOOL_LOCK_FREE __GCC_ATOMIC_BOOL_LOCK_FREE -#define ATOMIC_CHAR_LOCK_FREE __GCC_ATOMIC_CHAR_LOCK_FREE -#define ATOMIC_CHAR16_T_LOCK_FREE __GCC_ATOMIC_CHAR16_T_LOCK_FREE -#define ATOMIC_CHAR32_T_LOCK_FREE __GCC_ATOMIC_CHAR32_T_LOCK_FREE -#define ATOMIC_WCHAR_T_LOCK_FREE __GCC_ATOMIC_WCHAR_T_LOCK_FREE -#define ATOMIC_SHORT_LOCK_FREE __GCC_ATOMIC_SHORT_LOCK_FREE -#define ATOMIC_INT_LOCK_FREE __GCC_ATOMIC_INT_LOCK_FREE -#define ATOMIC_LONG_LOCK_FREE __GCC_ATOMIC_LONG_LOCK_FREE -#define ATOMIC_LLONG_LOCK_FREE __GCC_ATOMIC_LLONG_LOCK_FREE -#define ATOMIC_POINTER_LOCK_FREE __GCC_ATOMIC_POINTER_LOCK_FREE +#if defined(__CLANG_ATOMIC_BOOL_LOCK_FREE) +# define ATOMIC_BOOL_LOCK_FREE __CLANG_ATOMIC_BOOL_LOCK_FREE +# define ATOMIC_CHAR_LOCK_FREE __CLANG_ATOMIC_CHAR_LOCK_FREE +# define ATOMIC_CHAR16_T_LOCK_FREE __CLANG_ATOMIC_CHAR16_T_LOCK_FREE +# define ATOMIC_CHAR32_T_LOCK_FREE __CLANG_ATOMIC_CHAR32_T_LOCK_FREE +# define ATOMIC_WCHAR_T_LOCK_FREE __CLANG_ATOMIC_WCHAR_T_LOCK_FREE +# define ATOMIC_SHORT_LOCK_FREE __CLANG_ATOMIC_SHORT_LOCK_FREE +# define ATOMIC_INT_LOCK_FREE __CLANG_ATOMIC_INT_LOCK_FREE +# define ATOMIC_LONG_LOCK_FREE __CLANG_ATOMIC_LONG_LOCK_FREE +# define ATOMIC_LLONG_LOCK_FREE __CLANG_ATOMIC_LLONG_LOCK_FREE +# define ATOMIC_POINTER_LOCK_FREE __CLANG_ATOMIC_POINTER_LOCK_FREE +#else +# define ATOMIC_BOOL_LOCK_FREE __GCC_ATOMIC_BOOL_LOCK_FREE +# define ATOMIC_CHAR_LOCK_FREE __GCC_ATOMIC_CHAR_LOCK_FREE +# define ATOMIC_CHAR16_T_LOCK_FREE __GCC_ATOMIC_CHAR16_T_LOCK_FREE +# define ATOMIC_CHAR32_T_LOCK_FREE __GCC_ATOMIC_CHAR32_T_LOCK_FREE +# define ATOMIC_WCHAR_T_LOCK_FREE __GCC_ATOMIC_WCHAR_T_LOCK_FREE +# define ATOMIC_SHORT_LOCK_FREE __GCC_ATOMIC_SHORT_LOCK_FREE +# define ATOMIC_INT_LOCK_FREE __GCC_ATOMIC_INT_LOCK_FREE +# define ATOMIC_LONG_LOCK_FREE __GCC_ATOMIC_LONG_LOCK_FREE +# define ATOMIC_LLONG_LOCK_FREE __GCC_ATOMIC_LLONG_LOCK_FREE +# define ATOMIC_POINTER_LOCK_FREE __GCC_ATOMIC_POINTER_LOCK_FREE +#endif // general atomic Modified: vendor/libc++/dist/include/math.h ============================================================================== --- vendor/libc++/dist/include/math.h Wed Apr 26 19:24:27 2017 (r317450) +++ vendor/libc++/dist/include/math.h Wed Apr 26 19:24:31 2017 (r317451) @@ -307,6 +307,7 @@ long double truncl(long double x); extern "C++" { #include +#include // signbit @@ -324,22 +325,50 @@ __libcpp_signbit(_A1 __lcpp_x) _NOEXCEPT template inline _LIBCPP_INLINE_VISIBILITY -typename std::enable_if::value, bool>::type +typename std::enable_if::value, bool>::type signbit(_A1 __lcpp_x) _NOEXCEPT { return __libcpp_signbit((typename std::__promote<_A1>::type)__lcpp_x); } +template +inline _LIBCPP_INLINE_VISIBILITY +typename std::enable_if< + std::is_integral<_A1>::value && std::is_signed<_A1>::value, bool>::type +signbit(_A1 __lcpp_x) _NOEXCEPT +{ return __lcpp_x < 0; } + +template +inline _LIBCPP_INLINE_VISIBILITY +typename std::enable_if< + std::is_integral<_A1>::value && !std::is_signed<_A1>::value, bool>::type +signbit(_A1) _NOEXCEPT +{ return false; } + #elif defined(_LIBCPP_MSVCRT) template inline _LIBCPP_INLINE_VISIBILITY -typename std::enable_if::value, bool>::type +typename std::enable_if::value, bool>::type signbit(_A1 __lcpp_x) _NOEXCEPT { return ::signbit(static_cast::type>(__lcpp_x)); } +template +inline _LIBCPP_INLINE_VISIBILITY +typename std::enable_if< + std::is_integral<_A1>::value && std::is_signed<_A1>::value, bool>::type +signbit(_A1 __lcpp_x) _NOEXCEPT +{ return __lcpp_x < 0; } + +template +inline _LIBCPP_INLINE_VISIBILITY +typename std::enable_if< + std::is_integral<_A1>::value && !std::is_signed<_A1>::value, bool>::type +signbit(_A1) _NOEXCEPT +{ return false; } + #endif // signbit // fpclassify @@ -358,22 +387,34 @@ __libcpp_fpclassify(_A1 __lcpp_x) _NOEXC template inline _LIBCPP_INLINE_VISIBILITY -typename std::enable_if::value, int>::type +typename std::enable_if::value, int>::type fpclassify(_A1 __lcpp_x) _NOEXCEPT { return __libcpp_fpclassify((typename std::__promote<_A1>::type)__lcpp_x); } +template +inline _LIBCPP_INLINE_VISIBILITY +typename std::enable_if::value, int>::type +fpclassify(_A1 __lcpp_x) _NOEXCEPT +{ return __lcpp_x == 0 ? FP_ZERO : FP_NORMAL; } + #elif defined(_LIBCPP_MSVCRT) template inline _LIBCPP_INLINE_VISIBILITY -typename std::enable_if::value, int>::type +typename std::enable_if::value, bool>::type fpclassify(_A1 __lcpp_x) _NOEXCEPT { return ::fpclassify(static_cast::type>(__lcpp_x)); } +template +inline _LIBCPP_INLINE_VISIBILITY +typename std::enable_if::value, int>::type +fpclassify(_A1 __lcpp_x) _NOEXCEPT +{ return __lcpp_x == 0 ? FP_ZERO : FP_NORMAL; } + #endif // fpclassify // isfinite @@ -392,12 +433,22 @@ __libcpp_isfinite(_A1 __lcpp_x) _NOEXCEP template inline _LIBCPP_INLINE_VISIBILITY -typename std::enable_if::value, bool>::type +typename std::enable_if< + std::is_arithmetic<_A1>::value && std::numeric_limits<_A1>::has_infinity, + bool>::type isfinite(_A1 __lcpp_x) _NOEXCEPT { return __libcpp_isfinite((typename std::__promote<_A1>::type)__lcpp_x); } +template +inline _LIBCPP_INLINE_VISIBILITY +typename std::enable_if< + std::is_arithmetic<_A1>::value && !std::numeric_limits<_A1>::has_infinity, + bool>::type +isfinite(_A1) _NOEXCEPT +{ return true; } + #endif // isfinite // isinf @@ -416,12 +467,22 @@ __libcpp_isinf(_A1 __lcpp_x) _NOEXCEPT template inline _LIBCPP_INLINE_VISIBILITY -typename std::enable_if::value, bool>::type +typename std::enable_if< + std::is_arithmetic<_A1>::value && std::numeric_limits<_A1>::has_infinity, + bool>::type isinf(_A1 __lcpp_x) _NOEXCEPT { return __libcpp_isinf((typename std::__promote<_A1>::type)__lcpp_x); } +template +inline _LIBCPP_INLINE_VISIBILITY +typename std::enable_if< + std::is_arithmetic<_A1>::value && !std::numeric_limits<_A1>::has_infinity, + bool>::type +isinf(_A1) _NOEXCEPT +{ return false; } + #endif // isinf // isnan @@ -440,12 +501,18 @@ __libcpp_isnan(_A1 __lcpp_x) _NOEXCEPT template inline _LIBCPP_INLINE_VISIBILITY -typename std::enable_if::value, bool>::type +typename std::enable_if::value, bool>::type isnan(_A1 __lcpp_x) _NOEXCEPT { return __libcpp_isnan((typename std::__promote<_A1>::type)__lcpp_x); } +template +inline _LIBCPP_INLINE_VISIBILITY +typename std::enable_if::value, bool>::type +isnan(_A1) _NOEXCEPT +{ return false; } + #endif // isnan // isnormal @@ -464,12 +531,18 @@ __libcpp_isnormal(_A1 __lcpp_x) _NOEXCEP template inline _LIBCPP_INLINE_VISIBILITY -typename std::enable_if::value, bool>::type +typename std::enable_if::value, bool>::type isnormal(_A1 __lcpp_x) _NOEXCEPT { return __libcpp_isnormal((typename std::__promote<_A1>::type)__lcpp_x); } +template +inline _LIBCPP_INLINE_VISIBILITY +typename std::enable_if::value, bool>::type +isnormal(_A1 __lcpp_x) _NOEXCEPT +{ return __lcpp_x != 0; } + #endif // isnormal // isgreater Modified: vendor/libc++/dist/include/mutex ============================================================================== --- vendor/libc++/dist/include/mutex Wed Apr 26 19:24:27 2017 (r317450) +++ vendor/libc++/dist/include/mutex Wed Apr 26 19:24:31 2017 (r317451) @@ -685,7 +685,7 @@ inline _LIBCPP_INLINE_VISIBILITY void call_once(once_flag& __flag, const _Callable& __func) { - if (__flag.__state_ != ~0ul) + if (__libcpp_acquire_load(&__flag.__state_) != ~0ul) { __call_once_param __p(__func); __call_once(__flag.__state_, &__p, &__call_once_proxy); Modified: vendor/libc++/dist/test/libcxx/atomics/diagnose_invalid_memory_order.fail.cpp ============================================================================== --- vendor/libc++/dist/test/libcxx/atomics/diagnose_invalid_memory_order.fail.cpp Wed Apr 26 19:24:27 2017 (r317450) +++ vendor/libc++/dist/test/libcxx/atomics/diagnose_invalid_memory_order.fail.cpp Wed Apr 26 19:24:31 2017 (r317451) @@ -7,6 +7,10 @@ // //===----------------------------------------------------------------------===// +// This test fails because diagnose_if doesn't emit all of the diagnostics +// when -fdelayed-template-parsing is enabled, like it is on Windows. +// XFAIL: LIBCXX-WINDOWS-FIXME + // REQUIRES: verify-support, diagnose-if-support // UNSUPPORTED: libcpp-has-no-threads Modified: vendor/libc++/dist/test/libcxx/language.support/support.dynamic/new_faligned_allocation.sh.cpp ============================================================================== --- vendor/libc++/dist/test/libcxx/language.support/support.dynamic/new_faligned_allocation.sh.cpp Wed Apr 26 19:24:27 2017 (r317450) +++ vendor/libc++/dist/test/libcxx/language.support/support.dynamic/new_faligned_allocation.sh.cpp Wed Apr 26 19:24:31 2017 (r317451) @@ -10,6 +10,10 @@ // test libc++'s implementation of align_val_t, and the relevent new/delete // overloads in all dialects when -faligned-allocation is present. +// Libc++ defers to the underlying MSVC library to provide the new/delete +// definitions, which does not yet provide aligned allocation +// XFAIL: LIBCXX-WINDOWS-FIXME + // REQUIRES: -faligned-allocation // RUN: %build -faligned-allocation @@ -74,4 +78,4 @@ int main() { assert(typeid(std::align_val_t).name() == std::string("St11align_val_t")); } #endif -} \ No newline at end of file +} Modified: vendor/libc++/dist/test/libcxx/localization/locales/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp ============================================================================== --- vendor/libc++/dist/test/libcxx/localization/locales/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp Wed Apr 26 19:24:27 2017 (r317450) +++ vendor/libc++/dist/test/libcxx/localization/locales/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp Wed Apr 26 19:24:31 2017 (r317451) @@ -7,6 +7,9 @@ // //===----------------------------------------------------------------------===// +// 'do_bytes' throws a std::range_error unexpectedly +// XFAIL: LIBCXX-WINDOWS-FIXME + // UNSUPPORTED: c++98, c++03 // Modified: vendor/libc++/dist/test/libcxx/modules/cinttypes_exports.sh.cpp ============================================================================== --- vendor/libc++/dist/test/libcxx/modules/cinttypes_exports.sh.cpp Wed Apr 26 19:24:27 2017 (r317450) +++ vendor/libc++/dist/test/libcxx/modules/cinttypes_exports.sh.cpp Wed Apr 26 19:24:31 2017 (r317451) @@ -7,6 +7,10 @@ // //===----------------------------------------------------------------------===// +// This test fails on Windows because the underlying libc headers on Windows +// are not modular +// XFAIL: LIBCXX-WINDOWS-FIXME + // REQUIRES: modules-support // Test that re-exports Modified: vendor/libc++/dist/test/libcxx/modules/clocale_exports.sh.cpp ============================================================================== --- vendor/libc++/dist/test/libcxx/modules/clocale_exports.sh.cpp Wed Apr 26 19:24:27 2017 (r317450) +++ vendor/libc++/dist/test/libcxx/modules/clocale_exports.sh.cpp Wed Apr 26 19:24:31 2017 (r317451) @@ -7,6 +7,10 @@ // //===----------------------------------------------------------------------===// +// This test fails on Windows because the underlying libc headers on Windows +// are not modular +// XFAIL: LIBCXX-WINDOWS-FIXME + // REQUIRES: modules-support // UNSUPPORTED: c++98, c++03 Modified: vendor/libc++/dist/test/libcxx/modules/cstdint_exports.sh.cpp ============================================================================== --- vendor/libc++/dist/test/libcxx/modules/cstdint_exports.sh.cpp Wed Apr 26 19:24:27 2017 (r317450) +++ vendor/libc++/dist/test/libcxx/modules/cstdint_exports.sh.cpp Wed Apr 26 19:24:31 2017 (r317451) @@ -7,6 +7,10 @@ // //===----------------------------------------------------------------------===// +// This test fails on Windows because the underlying libc headers on Windows +// are not modular +// XFAIL: LIBCXX-WINDOWS-FIXME + // REQUIRES: modules-support // Test that re-exports Modified: vendor/libc++/dist/test/libcxx/modules/inttypes_h_exports.sh.cpp ============================================================================== --- vendor/libc++/dist/test/libcxx/modules/inttypes_h_exports.sh.cpp Wed Apr 26 19:24:27 2017 (r317450) +++ vendor/libc++/dist/test/libcxx/modules/inttypes_h_exports.sh.cpp Wed Apr 26 19:24:31 2017 (r317451) @@ -7,6 +7,10 @@ // //===----------------------------------------------------------------------===// +// This test fails on Windows because the underlying libc headers on Windows +// are not modular +// XFAIL: LIBCXX-WINDOWS-FIXME + // REQUIRES: modules-support // Test that intypes.h re-exports stdint.h Modified: vendor/libc++/dist/test/libcxx/thread/futures/futures.promise/set_exception.pass.cpp ============================================================================== --- vendor/libc++/dist/test/libcxx/thread/futures/futures.promise/set_exception.pass.cpp Wed Apr 26 19:24:27 2017 (r317450) +++ vendor/libc++/dist/test/libcxx/thread/futures/futures.promise/set_exception.pass.cpp Wed Apr 26 19:24:31 2017 (r317451) @@ -8,6 +8,9 @@ //===----------------------------------------------------------------------===// // +// This test depends on std::exception_ptr which has not yet been implemented. +// XFAIL: LIBCXX-WINDOWS-FIXME + // UNSUPPORTED: libcpp-no-exceptions // UNSUPPORTED: libcpp-has-no-threads // UNSUPPORTED: c++98, c++03 Modified: vendor/libc++/dist/test/libcxx/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp ============================================================================== --- vendor/libc++/dist/test/libcxx/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp Wed Apr 26 19:24:27 2017 (r317450) +++ vendor/libc++/dist/test/libcxx/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp Wed Apr 26 19:24:31 2017 (r317451) @@ -6,7 +6,9 @@ // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// -// + +// This test depends on std::exception_ptr which has not yet been implemented. +// XFAIL: LIBCXX-WINDOWS-FIXME // UNSUPPORTED: libcpp-no-exceptions // UNSUPPORTED: libcpp-has-no-threads Modified: vendor/libc++/dist/test/libcxx/thread/thread.mutex/thread_safety_lock_guard.pass.cpp ============================================================================== --- vendor/libc++/dist/test/libcxx/thread/thread.mutex/thread_safety_lock_guard.pass.cpp Wed Apr 26 19:24:27 2017 (r317450) +++ vendor/libc++/dist/test/libcxx/thread/thread.mutex/thread_safety_lock_guard.pass.cpp Wed Apr 26 19:24:31 2017 (r317451) @@ -7,6 +7,10 @@ // //===----------------------------------------------------------------------===// +// On Windows Clang bugs out when both __declspec and __attribute__ are present, +// the processing goes awry preventing the definition of the types. +// XFAIL: LIBCXX-WINDOWS-FIXME + // UNSUPPORTED: libcpp-has-no-threads // REQUIRES: thread-safety Modified: vendor/libc++/dist/test/libcxx/thread/thread.mutex/thread_safety_lock_unlock.pass.cpp ============================================================================== --- vendor/libc++/dist/test/libcxx/thread/thread.mutex/thread_safety_lock_unlock.pass.cpp Wed Apr 26 19:24:27 2017 (r317450) +++ vendor/libc++/dist/test/libcxx/thread/thread.mutex/thread_safety_lock_unlock.pass.cpp Wed Apr 26 19:24:31 2017 (r317451) @@ -7,6 +7,10 @@ // //===----------------------------------------------------------------------===// +// On Windows Clang bugs out when both __declspec and __attribute__ are present, +// the processing goes awry preventing the definition of the types. +// XFAIL: LIBCXX-WINDOWS-FIXME + // UNSUPPORTED: libcpp-has-no-threads // REQUIRES: thread-safety Modified: vendor/libc++/dist/test/libcxx/thread/thread.mutex/thread_safety_missing_unlock.fail.cpp ============================================================================== --- vendor/libc++/dist/test/libcxx/thread/thread.mutex/thread_safety_missing_unlock.fail.cpp Wed Apr 26 19:24:27 2017 (r317450) +++ vendor/libc++/dist/test/libcxx/thread/thread.mutex/thread_safety_missing_unlock.fail.cpp Wed Apr 26 19:24:31 2017 (r317451) @@ -7,6 +7,10 @@ // //===----------------------------------------------------------------------===// +// On Windows Clang bugs out when both __declspec and __attribute__ are present, +// the processing goes awry preventing the definition of the types. +// XFAIL: LIBCXX-WINDOWS-FIXME + // UNSUPPORTED: libcpp-has-no-threads // REQUIRES: thread-safety Modified: vendor/libc++/dist/test/libcxx/thread/thread.mutex/thread_safety_requires_capability.pass.cpp ============================================================================== --- vendor/libc++/dist/test/libcxx/thread/thread.mutex/thread_safety_requires_capability.pass.cpp Wed Apr 26 19:24:27 2017 (r317450) +++ vendor/libc++/dist/test/libcxx/thread/thread.mutex/thread_safety_requires_capability.pass.cpp Wed Apr 26 19:24:31 2017 (r317451) @@ -7,6 +7,10 @@ // //===----------------------------------------------------------------------===// +// On Windows Clang bugs out when both __declspec and __attribute__ are present, +// the processing goes awry preventing the definition of the types. +// XFAIL: LIBCXX-WINDOWS-FIXME + // UNSUPPORTED: libcpp-has-no-threads // REQUIRES: thread-safety Modified: vendor/libc++/dist/test/std/language.support/support.exception/except.nested/assign.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/language.support/support.exception/except.nested/assign.pass.cpp Wed Apr 26 19:24:27 2017 (r317450) +++ vendor/libc++/dist/test/std/language.support/support.exception/except.nested/assign.pass.cpp Wed Apr 26 19:24:31 2017 (r317451) @@ -7,6 +7,9 @@ // //===----------------------------------------------------------------------===// +// exception_ptr has not been implemented on Windows +// XFAIL: LIBCXX-WINDOWS-FIXME + // // class nested_exception; Modified: vendor/libc++/dist/test/std/language.support/support.exception/except.nested/ctor_copy.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/language.support/support.exception/except.nested/ctor_copy.pass.cpp Wed Apr 26 19:24:27 2017 (r317450) +++ vendor/libc++/dist/test/std/language.support/support.exception/except.nested/ctor_copy.pass.cpp Wed Apr 26 19:24:31 2017 (r317451) @@ -7,6 +7,9 @@ // //===----------------------------------------------------------------------===// +// exception_ptr has not been implemented on Windows +// XFAIL: LIBCXX-WINDOWS-FIXME + // // class nested_exception; Modified: vendor/libc++/dist/test/std/language.support/support.exception/except.nested/ctor_default.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/language.support/support.exception/except.nested/ctor_default.pass.cpp Wed Apr 26 19:24:27 2017 (r317450) +++ vendor/libc++/dist/test/std/language.support/support.exception/except.nested/ctor_default.pass.cpp Wed Apr 26 19:24:31 2017 (r317451) @@ -7,6 +7,9 @@ // //===----------------------------------------------------------------------===// +// exception_ptr has not been implemented on Windows +// XFAIL: LIBCXX-WINDOWS-FIXME + // // class nested_exception; Modified: vendor/libc++/dist/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp Wed Apr 26 19:24:27 2017 (r317450) +++ vendor/libc++/dist/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp Wed Apr 26 19:24:31 2017 (r317451) @@ -7,6 +7,9 @@ // //===----------------------------------------------------------------------===// +// exception_ptr has not been implemented on Windows +// XFAIL: LIBCXX-WINDOWS-FIXME + // UNSUPPORTED: libcpp-no-exceptions // @@ -43,7 +46,7 @@ class C { public: virtual ~C() {} - C * operator&() const { assert(false); } // should not be called + C * operator&() const { assert(false); return nullptr; } // should not be called }; class D : private std::nested_exception {}; Modified: vendor/libc++/dist/test/std/language.support/support.exception/except.nested/rethrow_nested.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/language.support/support.exception/except.nested/rethrow_nested.pass.cpp Wed Apr 26 19:24:27 2017 (r317450) +++ vendor/libc++/dist/test/std/language.support/support.exception/except.nested/rethrow_nested.pass.cpp Wed Apr 26 19:24:31 2017 (r317451) @@ -7,6 +7,9 @@ // //===----------------------------------------------------------------------===// +// exception_ptr has not been implemented on Windows +// XFAIL: LIBCXX-WINDOWS-FIXME + // UNSUPPORTED: libcpp-no-exceptions // Modified: vendor/libc++/dist/test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp Wed Apr 26 19:24:27 2017 (r317450) +++ vendor/libc++/dist/test/std/language.support/support.exception/except.nested/throw_with_nested.pass.cpp Wed Apr 26 19:24:31 2017 (r317451) @@ -7,6 +7,9 @@ // //===----------------------------------------------------------------------===// +// exception_ptr has not been implemented on Windows +// XFAIL: LIBCXX-WINDOWS-FIXME + // UNSUPPORTED: libcpp-no-exceptions // Modified: vendor/libc++/dist/test/std/language.support/support.exception/propagation/current_exception.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/language.support/support.exception/propagation/current_exception.pass.cpp Wed Apr 26 19:24:27 2017 (r317450) +++ vendor/libc++/dist/test/std/language.support/support.exception/propagation/current_exception.pass.cpp Wed Apr 26 19:24:31 2017 (r317451) @@ -7,6 +7,9 @@ // //===----------------------------------------------------------------------===// +// exception_ptr has not been implemented on Windows +// XFAIL: LIBCXX-WINDOWS-FIXME + // UNSUPPORTED: libcpp-no-exceptions // Modified: vendor/libc++/dist/test/std/language.support/support.exception/propagation/exception_ptr.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/language.support/support.exception/propagation/exception_ptr.pass.cpp Wed Apr 26 19:24:27 2017 (r317450) +++ vendor/libc++/dist/test/std/language.support/support.exception/propagation/exception_ptr.pass.cpp Wed Apr 26 19:24:31 2017 (r317451) @@ -7,6 +7,9 @@ // //===----------------------------------------------------------------------===// +// exception_ptr has not been implemented on Windows +// XFAIL: LIBCXX-WINDOWS-FIXME + // // typedef unspecified exception_ptr; Modified: vendor/libc++/dist/test/std/language.support/support.exception/propagation/make_exception_ptr.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/language.support/support.exception/propagation/make_exception_ptr.pass.cpp Wed Apr 26 19:24:27 2017 (r317450) +++ vendor/libc++/dist/test/std/language.support/support.exception/propagation/make_exception_ptr.pass.cpp Wed Apr 26 19:24:31 2017 (r317451) @@ -7,6 +7,9 @@ // //===----------------------------------------------------------------------===// +// exception_ptr has not been implemented on Windows +// XFAIL: LIBCXX-WINDOWS-FIXME + // UNSUPPORTED: libcpp-no-exceptions // Modified: vendor/libc++/dist/test/std/language.support/support.exception/propagation/rethrow_exception.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/language.support/support.exception/propagation/rethrow_exception.pass.cpp Wed Apr 26 19:24:27 2017 (r317450) +++ vendor/libc++/dist/test/std/language.support/support.exception/propagation/rethrow_exception.pass.cpp Wed Apr 26 19:24:31 2017 (r317451) @@ -7,6 +7,9 @@ // //===----------------------------------------------------------------------===// +// exception_ptr has not been implemented on Windows +// XFAIL: LIBCXX-WINDOWS-FIXME + // UNSUPPORTED: libcpp-no-exceptions // Modified: vendor/libc++/dist/test/std/numerics/c.math/cmath.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/numerics/c.math/cmath.pass.cpp Wed Apr 26 19:24:27 2017 (r317450) +++ vendor/libc++/dist/test/std/numerics/c.math/cmath.pass.cpp Wed Apr 26 19:24:31 2017 (r317451) @@ -10,6 +10,7 @@ // #include +#include #include #include @@ -551,6 +552,13 @@ void test_signbit() static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); assert(std::signbit(-1.0) == true); + assert(std::signbit(0u) == false); + assert(std::signbit(std::numeric_limits::max()) == false); + assert(std::signbit(0) == false); + assert(std::signbit(1) == false); + assert(std::signbit(-1) == true); + assert(std::signbit(std::numeric_limits::max()) == false); + assert(std::signbit(std::numeric_limits::min()) == true); } void test_fpclassify() @@ -564,6 +572,11 @@ void test_fpclassify() static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); assert(std::fpclassify(-1.0) == FP_NORMAL); + assert(std::fpclassify(0) == FP_ZERO); + assert(std::fpclassify(1) == FP_NORMAL); + assert(std::fpclassify(-1) == FP_NORMAL); + assert(std::fpclassify(std::numeric_limits::max()) == FP_NORMAL); + assert(std::fpclassify(std::numeric_limits::min()) == FP_NORMAL); } void test_isfinite() @@ -577,6 +590,11 @@ void test_isfinite() static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); assert(std::isfinite(-1.0) == true); + assert(std::isfinite(0) == true); + assert(std::isfinite(1) == true); + assert(std::isfinite(-1) == true); + assert(std::isfinite(std::numeric_limits::max()) == true); + assert(std::isfinite(std::numeric_limits::min()) == true); } void test_isnormal() @@ -590,6 +608,11 @@ void test_isnormal() static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); assert(std::isnormal(-1.0) == true); + assert(std::isnormal(0) == false); + assert(std::isnormal(1) == true); + assert(std::isnormal(-1) == true); + assert(std::isnormal(std::numeric_limits::max()) == true); + assert(std::isnormal(std::numeric_limits::min()) == true); } void test_isgreater() @@ -651,6 +674,11 @@ void test_isinf() static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); assert(std::isinf(-1.0) == false); + assert(std::isinf(0) == false); + assert(std::isinf(1) == false); + assert(std::isinf(-1) == false); + assert(std::isinf(std::numeric_limits::max()) == false); + assert(std::isinf(std::numeric_limits::min()) == false); } void test_isless() @@ -731,6 +759,11 @@ void test_isnan() static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); assert(std::isnan(-1.0) == false); + assert(std::isnan(0) == false); + assert(std::isnan(1) == false); + assert(std::isnan(-1) == false); + assert(std::isnan(std::numeric_limits::max()) == false); + assert(std::isnan(std::numeric_limits::min()) == false); } void test_isunordered() Modified: vendor/libc++/dist/test/std/strings/basic.string/string.cons/T_size_size.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/strings/basic.string/string.cons/T_size_size.pass.cpp Wed Apr 26 19:24:27 2017 (r317450) +++ vendor/libc++/dist/test/std/strings/basic.string/string.cons/T_size_size.pass.cpp Wed Apr 26 19:24:31 2017 (r317451) @@ -63,7 +63,6 @@ void test(SV sv, unsigned pos, unsigned n, const typename S::allocator_type& a) { typedef typename S::traits_type T; - typedef typename S::allocator_type A; if (pos <= sv.size()) { S s2(sv, pos, n, a); Modified: vendor/libc++/dist/test/std/utilities/any/any.class/any.modifiers/emplace.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/utilities/any/any.class/any.modifiers/emplace.pass.cpp Wed Apr 26 19:24:27 2017 (r317450) +++ vendor/libc++/dist/test/std/utilities/any/any.class/any.modifiers/emplace.pass.cpp Wed Apr 26 19:24:31 2017 (r317451) @@ -44,7 +44,7 @@ void test_emplace_type() { auto &v = a.emplace(); static_assert( std::is_same_v, "" ); - assert(&v == std::any_cast(&a)); + assert(&v == std::any_cast(&a)); assert(Tracked::count == 0); assert(Type::count == 1); @@ -60,7 +60,7 @@ void test_emplace_type() { auto &v = a.emplace(101); static_assert( std::is_same_v, "" ); - assert(&v == std::any_cast(&a)); + assert(&v == std::any_cast(&a)); assert(Tracked::count == 0); assert(Type::count == 1); @@ -76,7 +76,7 @@ void test_emplace_type() { auto &v = a.emplace(-1, 42, -1); static_assert( std::is_same_v, "" ); - assert(&v == std::any_cast(&a)); + assert(&v == std::any_cast(&a)); assert(Tracked::count == 0); assert(Type::count == 1); @@ -97,7 +97,7 @@ void test_emplace_type_tracked() { assert(Tracked::count == 1); auto &v = a.emplace(); static_assert( std::is_same_v, "" ); - assert(&v == std::any_cast(&a)); + assert(&v == std::any_cast(&a)); assert(Tracked::count == 0); assertArgsMatch(a); @@ -107,7 +107,7 @@ void test_emplace_type_tracked() { assert(Tracked::count == 1); auto &v = a.emplace(-1, 42, -1); static_assert( std::is_same_v, "" ); - assert(&v == std::any_cast(&a)); + assert(&v == std::any_cast(&a)); assert(Tracked::count == 0); assertArgsMatch(a); @@ -118,7 +118,7 @@ void test_emplace_type_tracked() { assert(Tracked::count == 1); auto &v = a.emplace({-1, 42, -1}); static_assert( std::is_same_v, "" ); - assert(&v == std::any_cast(&a)); + assert(&v == std::any_cast(&a)); assert(Tracked::count == 0); assertArgsMatch>(a); @@ -129,7 +129,7 @@ void test_emplace_type_tracked() { assert(Tracked::count == 1); auto &v = a.emplace({-1, 42, -1}, x); static_assert( std::is_same_v, "" ); - assert(&v == std::any_cast(&a)); + assert(&v == std::any_cast(&a)); assert(Tracked::count == 0); assertArgsMatch, int&>(a); @@ -159,7 +159,8 @@ void test_emplace_throws() std::any a(small{42}); assert(small::count == 1); try { - a.emplace(101); + auto &v = a.emplace(101); + static_assert( std::is_same_v, "" ); assert(false); } catch (int const&) { } @@ -169,7 +170,8 @@ void test_emplace_throws() std::any a(small{42}); assert(small::count == 1); try { - a.emplace({1, 2, 3}, 101); + auto &v = a.emplace({1, 2, 3}, 101); + static_assert( std::is_same_v, "" ); assert(false); } catch (int const&) { } @@ -180,7 +182,8 @@ void test_emplace_throws() std::any a(large{42}); assert(large::count == 1); try { - a.emplace(101); + auto &v = a.emplace(101); + static_assert( std::is_same_v, "" ); assert(false); } catch (int const&) { } @@ -190,7 +193,8 @@ void test_emplace_throws() std::any a(large{42}); assert(large::count == 1); try { - a.emplace({1, 2, 3}, 101); + auto &v = a.emplace({1, 2, 3}, 101); + static_assert( std::is_same_v, "" ); assert(false); } catch (int const&) { } Modified: vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.assign/emplace.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.assign/emplace.pass.cpp Wed Apr 26 19:24:27 2017 (r317450) +++ vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.assign/emplace.pass.cpp Wed Apr 26 19:24:31 2017 (r317451) @@ -254,7 +254,9 @@ int main() { assert(static_cast(opt) == true); assert(Y::dtor_called == false); - opt.emplace(1); + auto &v = opt.emplace(1); + static_assert( std::is_same_v, "" ); + assert(false); } catch (int i) { Modified: vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.assign/emplace_initializer_list.pass.cpp ============================================================================== --- vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.assign/emplace_initializer_list.pass.cpp Wed Apr 26 19:24:27 2017 (r317450) +++ vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.assign/emplace_initializer_list.pass.cpp Wed Apr 26 19:24:31 2017 (r317451) @@ -11,7 +11,7 @@ // // template -// void optional::emplace(initializer_list il, Args&&... args); +// T& optional::emplace(initializer_list il, Args&&... args); #include #include @@ -76,21 +76,27 @@ int main() X x; optional opt(x); assert(X::dtor_called == false); - opt.emplace({1, 2}); + auto &v = opt.emplace({1, 2}); + static_assert( std::is_same_v, "" ); assert(X::dtor_called == true); assert(*opt == X({1, 2})); + assert(&v == &*opt); } { optional> opt; - opt.emplace({1, 2, 3}, std::allocator()); + auto &v = opt.emplace({1, 2, 3}, std::allocator()); + static_assert( std::is_same_v&, decltype(v)>, "" ); assert(static_cast(opt) == true); assert(*opt == std::vector({1, 2, 3})); + assert(&v == &*opt); } { optional opt; - opt.emplace({1, 2}); + auto &v = opt.emplace({1, 2}); + static_assert( std::is_same_v, "" ); assert(static_cast(opt) == true); assert(*opt == Y({1, 2})); + assert(&v == &*opt); } #ifndef TEST_HAS_NO_EXCEPTIONS { @@ -100,7 +106,9 @@ int main() { assert(static_cast(opt) == true); assert(Z::dtor_called == false); - opt.emplace({1, 2}); + auto &v = opt.emplace({1, 2}); + static_assert( std::is_same_v, "" ); + assert(false); } catch (int i) { Modified: vendor/libc++/dist/utils/libcxx/test/config.py ============================================================================== --- vendor/libc++/dist/utils/libcxx/test/config.py Wed Apr 26 19:24:27 2017 (r317450) +++ vendor/libc++/dist/utils/libcxx/test/config.py Wed Apr 26 19:24:31 2017 (r317451) @@ -311,10 +311,10 @@ class Configuration(object): # NOTE: We do not test for the -verify flag directly because # -verify will always exit with non-zero on an empty file. self.use_clang_verify = self.cxx.isVerifySupported() - if self.use_clang_verify: - self.config.available_features.add('verify-support') self.lit_config.note( "inferred use_clang_verify as: %r" % self.use_clang_verify) + if self.use_clang_verify: + self.config.available_features.add('verify-support') def configure_use_thread_safety(self): '''If set, run clang with -verify on failing tests.''' @@ -418,7 +418,7 @@ class Configuration(object): # initial Windows failures until they can be properly diagnosed # and fixed. This allows easier detection of new test failures # and regressions. Note: New failures should not be suppressed - # using this feature. + # using this feature. (Also see llvm.org/PR32730) self.config.available_features.add('LIBCXX-WINDOWS-FIXME') # Attempt to detect the glibc version by querying for __GLIBC__