From owner-svn-src-vendor@freebsd.org Sat Aug 18 08:27:25 2018 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31427108943A; Sat, 18 Aug 2018 08:27:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5B7EF881D9; Sat, 18 Aug 2018 08:27:19 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 21CF014F7E; Sat, 18 Aug 2018 08:27:19 +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 w7I8RIKg016189; Sat, 18 Aug 2018 08:27:18 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7I8RClX016153; Sat, 18 Aug 2018 08:27:12 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201808180827.w7I8RClX016153@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 18 Aug 2018 08:27:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r338005 - in vendor/libc++/dist-release_70: . docs docs/DesignDocs include test/libcxx/language.support test/libcxx/memory test/std/depr/depr.c.headers test/std/language.support/support... X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/libc++/dist-release_70: . docs docs/DesignDocs include test/libcxx/language.support test/libcxx/memory test/std/depr/depr.c.headers test/std/language.support/support.dynamic/new.delete/new.d... X-SVN-Commit-Revision: 338005 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Aug 2018 08:27:25 -0000 Author: dim Date: Sat Aug 18 08:27:12 2018 New Revision: 338005 URL: https://svnweb.freebsd.org/changeset/base/338005 Log: Vendor import of libc++ release_70 branch r339999: https://llvm.org/svn/llvm-project/libcxx/branches/release_70@339999 Added: vendor/libc++/dist-release_70/test/libcxx/memory/aligned_allocation_macro.pass.cpp (contents, props changed) vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size.sh.cpp (contents, props changed) vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align.sh.cpp (contents, props changed) vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align_nothrow.sh.cpp (contents, props changed) vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_nothrow.sh.cpp (contents, props changed) vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align.sh.cpp (contents, props changed) vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align_nothrow.sh.cpp (contents, props changed) Deleted: vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size.fail.cpp vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align.fail.cpp vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align_nothrow.fail.cpp vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_nothrow.fail.cpp vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align.fail.cpp vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align_nothrow.fail.cpp Modified: vendor/libc++/dist-release_70/CMakeLists.txt vendor/libc++/dist-release_70/docs/BuildingLibcxx.rst vendor/libc++/dist-release_70/docs/DesignDocs/VisibilityMacros.rst vendor/libc++/dist-release_70/include/__config vendor/libc++/dist-release_70/include/__config_site.in vendor/libc++/dist-release_70/include/cstdlib vendor/libc++/dist-release_70/include/ctime vendor/libc++/dist-release_70/include/new vendor/libc++/dist-release_70/test/libcxx/language.support/has_c11_features.pass.cpp vendor/libc++/dist-release_70/test/std/depr/depr.c.headers/float_h.pass.cpp vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow_replace.pass.cpp vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.single/delete_align_val_t_replace.pass.cpp vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow_replace.pass.cpp vendor/libc++/dist-release_70/test/std/language.support/support.limits/c.limits/cfloat.pass.cpp vendor/libc++/dist-release_70/test/std/language.support/support.runtime/ctime.pass.cpp vendor/libc++/dist-release_70/test/std/language.support/support.start.term/quick_exit.pass.cpp vendor/libc++/dist-release_70/test/std/language.support/support.start.term/quick_exit_check1.fail.cpp vendor/libc++/dist-release_70/test/std/language.support/support.start.term/quick_exit_check2.fail.cpp vendor/libc++/dist-release_70/test/std/utilities/time/date.time/ctime.pass.cpp vendor/libc++/dist-release_70/test/support/nasty_macros.hpp vendor/libc++/dist-release_70/test/support/test_macros.h vendor/libc++/dist-release_70/utils/libcxx/test/config.py Modified: vendor/libc++/dist-release_70/CMakeLists.txt ============================================================================== --- vendor/libc++/dist-release_70/CMakeLists.txt Sat Aug 18 08:27:08 2018 (r338004) +++ vendor/libc++/dist-release_70/CMakeLists.txt Sat Aug 18 08:27:12 2018 (r338005) @@ -120,6 +120,7 @@ set(LIBCXX_ABI_VERSION ${DEFAULT_ABI_VERSION} CACHE ST option(LIBCXX_ABI_UNSTABLE "Unstable ABI of libc++." OFF) option(LIBCXX_ABI_FORCE_ITANIUM "Ignore auto-detection and force use of the Itanium ABI.") option(LIBCXX_ABI_FORCE_MICROSOFT "Ignore auto-detection and force use of the Microsoft ABI.") +option(LIBCXX_HIDE_FROM_ABI_PER_TU_BY_DEFAULT "Enable per TU ABI insulation by default. To be used by vendors." OFF) set(LIBCXX_ABI_DEFINES "" CACHE STRING "A semicolon separated list of ABI macros to define in the site config header.") option(LIBCXX_USE_COMPILER_RT "Use compiler-rt instead of libgcc" OFF) @@ -175,7 +176,7 @@ cmake_dependent_option(LIBCXX_STATICALLY_LINK_ABI_IN_S cmake_dependent_option(LIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY "Statically link the ABI library to shared library" ON - "LIBCXX_ENABLE_STATIC_ABI_LIBRARY;LIBCXX_ENABLE_STATIC" OFF) + "LIBCXX_ENABLE_STATIC_ABI_LIBRARY;LIBCXX_ENABLE_SHARED" OFF) # Generate and install a linker script inplace of libc++.so. The linker script # will link libc++ to the correct ABI library. This option is on by default @@ -662,6 +663,7 @@ endif() config_define_if(LIBCXX_ABI_UNSTABLE _LIBCPP_ABI_UNSTABLE) config_define_if(LIBCXX_ABI_FORCE_ITANIUM _LIBCPP_ABI_FORCE_ITANIUM) config_define_if(LIBCXX_ABI_FORCE_MICROSOFT _LIBCPP_ABI_FORCE_MICROSOFT) +config_define_if(LIBCXX_HIDE_FROM_ABI_PER_TU_BY_DEFAULT _LIBCPP_HIDE_FROM_ABI_PER_TU_BY_DEFAULT) config_define_if_not(LIBCXX_ENABLE_GLOBAL_FILESYSTEM_NAMESPACE _LIBCPP_HAS_NO_GLOBAL_FILESYSTEM_NAMESPACE) config_define_if_not(LIBCXX_ENABLE_STDIN _LIBCPP_HAS_NO_STDIN) Modified: vendor/libc++/dist-release_70/docs/BuildingLibcxx.rst ============================================================================== --- vendor/libc++/dist-release_70/docs/BuildingLibcxx.rst Sat Aug 18 08:27:08 2018 (r338004) +++ vendor/libc++/dist-release_70/docs/BuildingLibcxx.rst Sat Aug 18 08:27:12 2018 (r338005) @@ -332,6 +332,15 @@ libc++ Feature Options Use the specified GCC toolchain and standard library when building the native stdlib benchmark tests. +.. option:: LIBCXX_HIDE_FROM_ABI_PER_TU_BY_DEFAULT:BOOL + + **Default**: ``OFF`` + + Pick the default for whether to constrain ABI-unstable symbols to + each individual translation unit. This setting controls whether + `_LIBCPP_HIDE_FROM_ABI_PER_TU_BY_DEFAULT` is defined by default -- + see the documentation of that macro for details. + libc++ ABI Feature Options -------------------------- Modified: vendor/libc++/dist-release_70/docs/DesignDocs/VisibilityMacros.rst ============================================================================== --- vendor/libc++/dist-release_70/docs/DesignDocs/VisibilityMacros.rst Sat Aug 18 08:27:08 2018 (r338004) +++ vendor/libc++/dist-release_70/docs/DesignDocs/VisibilityMacros.rst Sat Aug 18 08:27:12 2018 (r338005) @@ -42,9 +42,42 @@ Visibility Macros **_LIBCPP_HIDE_FROM_ABI** Mark a function as not being part of the ABI of any final linked image that - uses it, and also as being internal to each TU that uses that function. In - other words, the address of a function marked with this attribute is not - guaranteed to be the same across translation units. + uses it. + +**_LIBCPP_HIDE_FROM_ABI_PER_TU** + This macro controls whether symbols hidden from the ABI with `_LIBCPP_HIDE_FROM_ABI` + are local to each translation unit in addition to being local to each final + linked image. This macro is defined to either 0 or 1. When it is defined to + 1, translation units compiled with different versions of libc++ can be linked + together, since all non ABI-facing functions are local to each translation unit. + This allows static archives built with different versions of libc++ to be linked + together. This also means that functions marked with `_LIBCPP_HIDE_FROM_ABI` + are not guaranteed to have the same address across translation unit boundaries. + + When the macro is defined to 0, there is no guarantee that translation units + compiled with different versions of libc++ can interoperate. However, this + leads to code size improvements, since non ABI-facing functions can be + deduplicated across translation unit boundaries. + + This macro can be defined by users to control the behavior they want from + libc++. The default value of this macro (0 or 1) is controlled by whether + `_LIBCPP_HIDE_FROM_ABI_PER_TU_BY_DEFAULT` is defined, which is intended to + be used by vendors only (see below). + +**_LIBCPP_HIDE_FROM_ABI_PER_TU_BY_DEFAULT** + This macro controls the default value for `_LIBCPP_HIDE_FROM_ABI_PER_TU`. + When the macro is defined, per TU ABI insulation is enabled by default, and + `_LIBCPP_HIDE_FROM_ABI_PER_TU` is defined to 1 unless overriden by users. + Otherwise, per TU ABI insulation is disabled by default, and + `_LIBCPP_HIDE_FROM_ABI_PER_TU` is defined to 0 unless overriden by users. + + This macro is intended for vendors to control whether they want to ship + libc++ with per TU ABI insulation enabled by default. Users can always + control the behavior they want by defining `_LIBCPP_HIDE_FROM_ABI_PER_TU` + appropriately. + + By default, this macro is not defined, which means that per TU ABI insulation + is not provided unless explicitly overriden by users. **_LIBCPP_TYPE_VIS** Mark a type's typeinfo, vtable and members as having default visibility. Modified: vendor/libc++/dist-release_70/include/__config ============================================================================== --- vendor/libc++/dist-release_70/include/__config Sat Aug 18 08:27:08 2018 (r338004) +++ vendor/libc++/dist-release_70/include/__config Sat Aug 18 08:27:12 2018 (r338005) @@ -328,6 +328,31 @@ # define _LIBCPP_NO_CFI #endif +#if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L +# if defined(__FreeBSD__) +# define _LIBCPP_HAS_QUICK_EXIT +# define _LIBCPP_HAS_C11_FEATURES +# elif defined(__Fuchsia__) +# define _LIBCPP_HAS_QUICK_EXIT +# define _LIBCPP_HAS_TIMESPEC_GET +# define _LIBCPP_HAS_C11_FEATURES +# elif defined(__linux__) +# if !defined(_LIBCPP_HAS_MUSL_LIBC) +# if _LIBCPP_GLIBC_PREREQ(2, 15) || defined(__BIONIC__) +# define _LIBCPP_HAS_QUICK_EXIT +# endif +# if _LIBCPP_GLIBC_PREREQ(2, 17) +# define _LIBCPP_HAS_C11_FEATURES +# define _LIBCPP_HAS_TIMESPEC_GET +# endif +# else // defined(_LIBCPP_HAS_MUSL_LIBC) +# define _LIBCPP_HAS_QUICK_EXIT +# define _LIBCPP_HAS_TIMESPEC_GET +# define _LIBCPP_HAS_C11_FEATURES +# endif +# endif // __linux__ +#endif + #if defined(_LIBCPP_COMPILER_CLANG) // _LIBCPP_ALTERNATE_STRING_LAYOUT is an old name for @@ -430,28 +455,6 @@ typedef __char32_t char32_t; #define _LIBCPP_HAS_NO_VARIABLE_TEMPLATES #endif -#if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L -# if defined(__FreeBSD__) -# define _LIBCPP_HAS_QUICK_EXIT -# define _LIBCPP_HAS_C11_FEATURES -# elif defined(__Fuchsia__) -# define _LIBCPP_HAS_QUICK_EXIT -# define _LIBCPP_HAS_C11_FEATURES -# elif defined(__linux__) -# if !defined(_LIBCPP_HAS_MUSL_LIBC) -# if _LIBCPP_GLIBC_PREREQ(2, 15) || defined(__BIONIC__) -# define _LIBCPP_HAS_QUICK_EXIT -# endif -# if _LIBCPP_GLIBC_PREREQ(2, 17) -# define _LIBCPP_HAS_C11_FEATURES -# endif -# else // defined(_LIBCPP_HAS_MUSL_LIBC) -# define _LIBCPP_HAS_QUICK_EXIT -# define _LIBCPP_HAS_C11_FEATURES -# endif -# endif // __linux__ -#endif - #if !(__has_feature(cxx_noexcept)) #define _LIBCPP_HAS_NO_NOEXCEPT #endif @@ -801,8 +804,20 @@ namespace std { # define _LIBCPP_INTERNAL_LINKAGE _LIBCPP_ALWAYS_INLINE #endif +#ifndef _LIBCPP_HIDE_FROM_ABI_PER_TU +# ifndef _LIBCPP_HIDE_FROM_ABI_PER_TU_BY_DEFAULT +# define _LIBCPP_HIDE_FROM_ABI_PER_TU 0 +# else +# define _LIBCPP_HIDE_FROM_ABI_PER_TU 1 +# endif +#endif + #ifndef _LIBCPP_HIDE_FROM_ABI -# define _LIBCPP_HIDE_FROM_ABI _LIBCPP_HIDDEN _LIBCPP_INTERNAL_LINKAGE +# if _LIBCPP_HIDE_FROM_ABI_PER_TU +# define _LIBCPP_HIDE_FROM_ABI _LIBCPP_HIDDEN _LIBCPP_INTERNAL_LINKAGE +# else +# define _LIBCPP_HIDE_FROM_ABI _LIBCPP_HIDDEN _LIBCPP_ALWAYS_INLINE +# endif #endif // Just so we can migrate to _LIBCPP_HIDE_FROM_ABI gradually. @@ -991,6 +1006,11 @@ template struct __static_assert_check {}; # endif #endif // defined(__APPLE__) +#if !defined(_LIBCPP_HAS_NO_ALIGNED_ALLOCATION) && \ + !defined(_LIBCPP_BUILDING_LIBRARY) && \ + (!defined(__cpp_aligned_new) || __cpp_aligned_new < 201606) +# define _LIBCPP_HAS_NO_ALIGNED_ALLOCATION +#endif #if defined(__APPLE__) || defined(__FreeBSD__) #define _LIBCPP_HAS_DEFAULTRUNELOCALE Modified: vendor/libc++/dist-release_70/include/__config_site.in ============================================================================== --- vendor/libc++/dist-release_70/include/__config_site.in Sat Aug 18 08:27:08 2018 (r338004) +++ vendor/libc++/dist-release_70/include/__config_site.in Sat Aug 18 08:27:12 2018 (r338005) @@ -14,6 +14,7 @@ #cmakedefine _LIBCPP_ABI_UNSTABLE #cmakedefine _LIBCPP_ABI_FORCE_ITANIUM #cmakedefine _LIBCPP_ABI_FORCE_MICROSOFT +#cmakedefine _LIBCPP_HIDE_FROM_ABI_PER_TU_BY_DEFAULT #cmakedefine _LIBCPP_HAS_NO_GLOBAL_FILESYSTEM_NAMESPACE #cmakedefine _LIBCPP_HAS_NO_STDIN #cmakedefine _LIBCPP_HAS_NO_STDOUT Modified: vendor/libc++/dist-release_70/include/cstdlib ============================================================================== --- vendor/libc++/dist-release_70/include/cstdlib Sat Aug 18 08:27:08 2018 (r338004) +++ vendor/libc++/dist-release_70/include/cstdlib Sat Aug 18 08:27:12 2018 (r338005) @@ -151,11 +151,11 @@ using ::mbtowc; using ::wctomb; using ::mbstowcs; using ::wcstombs; -#ifdef _LIBCPP_HAS_QUICK_EXIT +#if !defined(_LIBCPP_CXX03_LANG) && defined(_LIBCPP_HAS_QUICK_EXIT) using ::at_quick_exit; using ::quick_exit; #endif -#ifdef _LIBCPP_HAS_C11_FEATURES +#if _LIBCPP_STD_VER > 14 && defined(_LIBCPP_HAS_C11_FEATURES) using ::aligned_alloc; #endif Modified: vendor/libc++/dist-release_70/include/ctime ============================================================================== --- vendor/libc++/dist-release_70/include/ctime Sat Aug 18 08:27:08 2018 (r338004) +++ vendor/libc++/dist-release_70/include/ctime Sat Aug 18 08:27:12 2018 (r338005) @@ -73,7 +73,7 @@ using ::gmtime; using ::localtime; #endif using ::strftime; -#if _LIBCPP_STD_VER > 14 && defined(_LIBCPP_HAS_C11_FEATURES) +#if _LIBCPP_STD_VER > 14 && defined(_LIBCPP_HAS_TIMESPEC_GET) using ::timespec_get; #endif Modified: vendor/libc++/dist-release_70/include/new ============================================================================== --- vendor/libc++/dist-release_70/include/new Sat Aug 18 08:27:08 2018 (r338004) +++ vendor/libc++/dist-release_70/include/new Sat Aug 18 08:27:12 2018 (r338005) @@ -108,13 +108,6 @@ void operator delete[](void* ptr, void*) noexcept; # define _LIBCPP_HAS_NO_SIZED_DEALLOCATION #endif -#if !defined(_LIBCPP_HAS_NO_ALIGNED_ALLOCATION) && \ - (!(defined(_LIBCPP_BUILDING_LIBRARY) || _LIBCPP_STD_VER > 14 || \ - (defined(__cpp_aligned_new) && __cpp_aligned_new >= 201606))) -# define _LIBCPP_HAS_NO_ALIGNED_ALLOCATION -#endif - - #if !__has_builtin(__builtin_operator_new) || \ __has_builtin(__builtin_operator_new) < 201802L || \ defined(_LIBCPP_HAS_NO_ALIGNED_ALLOCATION) || \ Modified: vendor/libc++/dist-release_70/test/libcxx/language.support/has_c11_features.pass.cpp ============================================================================== --- vendor/libc++/dist-release_70/test/libcxx/language.support/has_c11_features.pass.cpp Sat Aug 18 08:27:08 2018 (r338004) +++ vendor/libc++/dist-release_70/test/libcxx/language.support/has_c11_features.pass.cpp Sat Aug 18 08:27:12 2018 (r338005) @@ -14,6 +14,9 @@ // _LIBCPP_HAS_C11_FEATURES - which is defined in <__config> // They should always be the same +#include <__config> +#include "test_macros.h" + #ifdef TEST_HAS_C11_FEATURES # ifndef _LIBCPP_HAS_C11_FEATURES # error "TEST_HAS_C11_FEATURES is defined, but _LIBCPP_HAS_C11_FEATURES is not" Added: vendor/libc++/dist-release_70/test/libcxx/memory/aligned_allocation_macro.pass.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist-release_70/test/libcxx/memory/aligned_allocation_macro.pass.cpp Sat Aug 18 08:27:12 2018 (r338005) @@ -0,0 +1,27 @@ +//===----------------------------------------------------------------------===// +// +// 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: c++98, c++03, c++11, c++14 + +// aligned allocation functions are not provided prior to macosx10.13 +// XFAIL: macosx10.12 +// XFAIL: macosx10.11 +// XFAIL: macosx10.10 +// XFAIL: macosx10.9 +// XFAIL: macosx10.8 +// XFAIL: macosx10.7 + +#include + + +#ifdef _LIBCPP_HAS_NO_ALIGNED_ALLOCATION +# error "libc++ should have aligned allocation in C++17 and up when targeting a platform that supports it" +#endif + +int main() { } Modified: vendor/libc++/dist-release_70/test/std/depr/depr.c.headers/float_h.pass.cpp ============================================================================== --- vendor/libc++/dist-release_70/test/std/depr/depr.c.headers/float_h.pass.cpp Sat Aug 18 08:27:08 2018 (r338004) +++ vendor/libc++/dist-release_70/test/std/depr/depr.c.headers/float_h.pass.cpp Sat Aug 18 08:27:12 2018 (r338005) @@ -11,6 +11,8 @@ #include +#include "test_macros.h" + #ifndef FLT_ROUNDS #error FLT_ROUNDS not defined #endif @@ -23,7 +25,7 @@ #error FLT_RADIX not defined #endif -#if TEST_STD_VER > 14 && defined(TEST_HAS_C11_FEATURES) +#if TEST_STD_VER > 14 && defined(TEST_HAS_C11_FEATURES) && 0 #ifndef FLT_HAS_SUBNORM #error FLT_HAS_SUBNORM not defined #endif @@ -53,7 +55,7 @@ #error DECIMAL_DIG not defined #endif -#if TEST_STD_VER > 14 && defined(TEST_HAS_C11_FEATURES) +#if TEST_STD_VER > 14 && defined(TEST_HAS_C11_FEATURES) && 0 #ifndef FLT_DECIMAL_DIG #error FLT_DECIMAL_DIG not defined #endif @@ -163,7 +165,7 @@ #error LDBL_MIN not defined #endif -#if TEST_STD_VER > 14 && defined(TEST_HAS_C11_FEATURES) +#if TEST_STD_VER > 14 && defined(TEST_HAS_C11_FEATURES) && 0 #ifndef FLT_TRUE_MIN #error FLT_TRUE_MIN not defined #endif Modified: vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp ============================================================================== --- vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp Sat Aug 18 08:27:08 2018 (r338004) +++ vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp Sat Aug 18 08:27:12 2018 (r338005) @@ -12,17 +12,27 @@ // UNSUPPORTED: sanitizer-new-delete, c++98, c++03, c++11, c++14 // Older Clang versions do not support this -// XFAIL: clang-3, apple-clang-7, apple-clang-8 +// UNSUPPORTED: clang-3, apple-clang-7, apple-clang-8 // None of the current GCC compilers support this. -// XFAIL: gcc-5, gcc-6 +// UNSUPPORTED: gcc-5, gcc-6 -// XFAIL: with_system_cxx_lib=macosx10.12 -// XFAIL: with_system_cxx_lib=macosx10.11 -// XFAIL: with_system_cxx_lib=macosx10.10 -// XFAIL: with_system_cxx_lib=macosx10.9 -// XFAIL: with_system_cxx_lib=macosx10.7 -// XFAIL: with_system_cxx_lib=macosx10.8 +// dylibs shipped before macosx10.13 do not provide aligned allocation, so that's a link error +// UNSUPPORTED: with_system_cxx_lib=macosx10.12 +// UNSUPPORTED: with_system_cxx_lib=macosx10.11 +// UNSUPPORTED: with_system_cxx_lib=macosx10.10 +// UNSUPPORTED: with_system_cxx_lib=macosx10.9 +// UNSUPPORTED: with_system_cxx_lib=macosx10.8 +// UNSUPPORTED: with_system_cxx_lib=macosx10.7 + +// Using aligned allocation functions is a compiler error when deploying to +// platforms older than macosx10.13 +// UNSUPPORTED: macosx10.12 +// UNSUPPORTED: macosx10.11 +// UNSUPPORTED: macosx10.10 +// UNSUPPORTED: macosx10.9 +// UNSUPPORTED: macosx10.8 +// UNSUPPORTED: macosx10.7 // On Windows libc++ doesn't provide its own definitions for new/delete // but instead depends on the ones in VCRuntime. However VCRuntime does not Modified: vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp ============================================================================== --- vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp Sat Aug 18 08:27:08 2018 (r338004) +++ vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp Sat Aug 18 08:27:12 2018 (r338005) @@ -15,13 +15,22 @@ // FIXME change this to XFAIL. // UNSUPPORTED: no-aligned-allocation && !gcc -// XFAIL: with_system_cxx_lib=macosx10.12 -// XFAIL: with_system_cxx_lib=macosx10.11 -// XFAIL: with_system_cxx_lib=macosx10.10 -// XFAIL: with_system_cxx_lib=macosx10.9 -// XFAIL: with_system_cxx_lib=macosx10.7 -// XFAIL: with_system_cxx_lib=macosx10.8 +// dylibs shipped before macosx10.13 do not provide aligned allocation, so that's a link error +// UNSUPPORTED: with_system_cxx_lib=macosx10.12 +// UNSUPPORTED: with_system_cxx_lib=macosx10.11 +// UNSUPPORTED: with_system_cxx_lib=macosx10.10 +// UNSUPPORTED: with_system_cxx_lib=macosx10.9 +// UNSUPPORTED: with_system_cxx_lib=macosx10.8 +// UNSUPPORTED: with_system_cxx_lib=macosx10.7 +// Using aligned allocation functions is a compiler error when deploying to +// platforms older than macosx10.13 +// UNSUPPORTED: macosx10.12 +// UNSUPPORTED: macosx10.11 +// UNSUPPORTED: macosx10.10 +// UNSUPPORTED: macosx10.9 +// UNSUPPORTED: macosx10.8 +// UNSUPPORTED: macosx10.7 // On Windows libc++ doesn't provide its own definitions for new/delete // but instead depends on the ones in VCRuntime. However VCRuntime does not Modified: vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp ============================================================================== --- vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp Sat Aug 18 08:27:08 2018 (r338004) +++ vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp Sat Aug 18 08:27:12 2018 (r338005) @@ -15,12 +15,22 @@ // FIXME turn this into an XFAIL // UNSUPPORTED: no-aligned-allocation && !gcc -// XFAIL: with_system_cxx_lib=macosx10.12 -// XFAIL: with_system_cxx_lib=macosx10.11 -// XFAIL: with_system_cxx_lib=macosx10.10 -// XFAIL: with_system_cxx_lib=macosx10.9 -// XFAIL: with_system_cxx_lib=macosx10.7 -// XFAIL: with_system_cxx_lib=macosx10.8 +// dylibs shipped before macosx10.13 do not provide aligned allocation, so that's a link error +// UNSUPPORTED: with_system_cxx_lib=macosx10.12 +// UNSUPPORTED: with_system_cxx_lib=macosx10.11 +// UNSUPPORTED: with_system_cxx_lib=macosx10.10 +// UNSUPPORTED: with_system_cxx_lib=macosx10.9 +// UNSUPPORTED: with_system_cxx_lib=macosx10.8 +// UNSUPPORTED: with_system_cxx_lib=macosx10.7 + +// Using aligned allocation functions is a compiler error when deploying to +// platforms older than macosx10.13 +// UNSUPPORTED: macosx10.12 +// UNSUPPORTED: macosx10.11 +// UNSUPPORTED: macosx10.10 +// UNSUPPORTED: macosx10.9 +// UNSUPPORTED: macosx10.8 +// UNSUPPORTED: macosx10.7 // On Windows libc++ doesn't provide its own definitions for new/delete // but instead depends on the ones in VCRuntime. However VCRuntime does not Modified: vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow_replace.pass.cpp ============================================================================== --- vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow_replace.pass.cpp Sat Aug 18 08:27:08 2018 (r338004) +++ vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow_replace.pass.cpp Sat Aug 18 08:27:12 2018 (r338005) @@ -10,12 +10,24 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 // UNSUPPORTED: sanitizer-new-delete -// XFAIL: with_system_cxx_lib=macosx10.12 -// XFAIL: with_system_cxx_lib=macosx10.11 -// XFAIL: with_system_cxx_lib=macosx10.10 -// XFAIL: with_system_cxx_lib=macosx10.9 -// XFAIL: with_system_cxx_lib=macosx10.7 -// XFAIL: with_system_cxx_lib=macosx10.8 +// dylibs shipped before macosx10.13 do not provide aligned allocation, so our +// custom aligned allocation functions are not called and the test fails +// UNSUPPORTED: with_system_cxx_lib=macosx10.12 +// UNSUPPORTED: with_system_cxx_lib=macosx10.11 +// UNSUPPORTED: with_system_cxx_lib=macosx10.10 +// UNSUPPORTED: with_system_cxx_lib=macosx10.9 +// UNSUPPORTED: with_system_cxx_lib=macosx10.8 +// UNSUPPORTED: with_system_cxx_lib=macosx10.7 + +// Our custom aligned allocation functions are not called when deploying to +// platforms older than macosx10.13, since those platforms don't support +// aligned allocation. +// UNSUPPORTED: macosx10.12 +// UNSUPPORTED: macosx10.11 +// UNSUPPORTED: macosx10.10 +// UNSUPPORTED: macosx10.9 +// UNSUPPORTED: macosx10.8 +// UNSUPPORTED: macosx10.7 // XFAIL: no-aligned-allocation && !gcc Added: vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size.sh.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size.sh.cpp Sat Aug 18 08:27:12 2018 (r338005) @@ -0,0 +1,26 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// + +// void* operator new[](std::size_t); + +// UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 +// UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 + +// REQUIRES: -faligned-allocation +// RUN: %compile %verify -faligned-allocation + +#include + +int main () +{ + ::operator new[](4); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} +} Added: vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align.sh.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align.sh.cpp Sat Aug 18 08:27:12 2018 (r338005) @@ -0,0 +1,26 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// + +// void* operator new[](std::size_t, std::align_val_t); + +// UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 +// UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 + +// REQUIRES: -faligned-allocation +// RUN: %compile %verify -faligned-allocation + +#include + +int main () +{ + ::operator new[](4, std::align_val_t{4}); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} +} Added: vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align_nothrow.sh.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align_nothrow.sh.cpp Sat Aug 18 08:27:12 2018 (r338005) @@ -0,0 +1,26 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// + +// void* operator new[](std::size_t, std::align_val_t, std::nothrow_t &); + +// UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 +// UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 + +// REQUIRES: -faligned-allocation +// RUN: %compile %verify -faligned-allocation + +#include + +int main () +{ + ::operator new[](4, std::align_val_t{4}, std::nothrow); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} +} Added: vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_nothrow.sh.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_nothrow.sh.cpp Sat Aug 18 08:27:12 2018 (r338005) @@ -0,0 +1,26 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// + +// void* operator new[](std::size_t, std::nothrow_t &); + +// UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 +// UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 + +// REQUIRES: -faligned-allocation +// RUN: %compile %verify -faligned-allocation + +#include + +int main () +{ + ::operator new[](4, std::nothrow); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} +} Modified: vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.single/delete_align_val_t_replace.pass.cpp ============================================================================== --- vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.single/delete_align_val_t_replace.pass.cpp Sat Aug 18 08:27:08 2018 (r338004) +++ vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.single/delete_align_val_t_replace.pass.cpp Sat Aug 18 08:27:12 2018 (r338005) @@ -11,17 +11,27 @@ // UNSUPPORTED: sanitizer-new-delete, c++98, c++03, c++11, c++14 // Older Clang versions do not support this -// XFAIL: clang-3, apple-clang-7, apple-clang-8 +// UNSUPPORTED: clang-3, apple-clang-7, apple-clang-8 // None of the current GCC compilers support this. -// XFAIL: gcc-5, gcc-6 +// UNSUPPORTED: gcc-5, gcc-6 -// XFAIL: with_system_cxx_lib=macosx10.12 -// XFAIL: with_system_cxx_lib=macosx10.11 -// XFAIL: with_system_cxx_lib=macosx10.10 -// XFAIL: with_system_cxx_lib=macosx10.9 -// XFAIL: with_system_cxx_lib=macosx10.7 -// XFAIL: with_system_cxx_lib=macosx10.8 +// dylibs shipped before macosx10.13 do not provide aligned allocation, so that's a link error +// UNSUPPORTED: with_system_cxx_lib=macosx10.12 +// UNSUPPORTED: with_system_cxx_lib=macosx10.11 +// UNSUPPORTED: with_system_cxx_lib=macosx10.10 +// UNSUPPORTED: with_system_cxx_lib=macosx10.9 +// UNSUPPORTED: with_system_cxx_lib=macosx10.8 +// UNSUPPORTED: with_system_cxx_lib=macosx10.7 + +// Using aligned allocation functions is a compiler error when deploying to +// platforms older than macosx10.13 +// UNSUPPORTED: macosx10.12 +// UNSUPPORTED: macosx10.11 +// UNSUPPORTED: macosx10.10 +// UNSUPPORTED: macosx10.9 +// UNSUPPORTED: macosx10.8 +// UNSUPPORTED: macosx10.7 // On Windows libc++ doesn't provide its own definitions for new/delete // but instead depends on the ones in VCRuntime. However VCRuntime does not Modified: vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp ============================================================================== --- vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp Sat Aug 18 08:27:08 2018 (r338004) +++ vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp Sat Aug 18 08:27:12 2018 (r338005) @@ -9,12 +9,22 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 -// XFAIL: with_system_cxx_lib=macosx10.12 -// XFAIL: with_system_cxx_lib=macosx10.11 -// XFAIL: with_system_cxx_lib=macosx10.10 -// XFAIL: with_system_cxx_lib=macosx10.9 -// XFAIL: with_system_cxx_lib=macosx10.7 -// XFAIL: with_system_cxx_lib=macosx10.8 +// dylibs shipped before macosx10.13 do not provide aligned allocation, so that's a link error +// UNSUPPORTED: with_system_cxx_lib=macosx10.12 +// UNSUPPORTED: with_system_cxx_lib=macosx10.11 +// UNSUPPORTED: with_system_cxx_lib=macosx10.10 +// UNSUPPORTED: with_system_cxx_lib=macosx10.9 +// UNSUPPORTED: with_system_cxx_lib=macosx10.8 +// UNSUPPORTED: with_system_cxx_lib=macosx10.7 + +// Using aligned allocation functions is a compiler error when deploying to +// platforms older than macosx10.13 +// UNSUPPORTED: macosx10.12 +// UNSUPPORTED: macosx10.11 +// UNSUPPORTED: macosx10.10 +// UNSUPPORTED: macosx10.9 +// UNSUPPORTED: macosx10.8 +// UNSUPPORTED: macosx10.7 // asan and msan will not call the new handler. // UNSUPPORTED: sanitizer-new-delete Modified: vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp ============================================================================== --- vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp Sat Aug 18 08:27:08 2018 (r338004) +++ vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp Sat Aug 18 08:27:12 2018 (r338005) @@ -9,12 +9,22 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 -// XFAIL: with_system_cxx_lib=macosx10.12 -// XFAIL: with_system_cxx_lib=macosx10.11 -// XFAIL: with_system_cxx_lib=macosx10.10 -// XFAIL: with_system_cxx_lib=macosx10.9 -// XFAIL: with_system_cxx_lib=macosx10.7 -// XFAIL: with_system_cxx_lib=macosx10.8 +// dylibs shipped before macosx10.13 do not provide aligned allocation, so that's a link error +// UNSUPPORTED: with_system_cxx_lib=macosx10.12 +// UNSUPPORTED: with_system_cxx_lib=macosx10.11 +// UNSUPPORTED: with_system_cxx_lib=macosx10.10 +// UNSUPPORTED: with_system_cxx_lib=macosx10.9 +// UNSUPPORTED: with_system_cxx_lib=macosx10.8 +// UNSUPPORTED: with_system_cxx_lib=macosx10.7 + +// Using aligned allocation functions is a compiler error when deploying to +// platforms older than macosx10.13 +// UNSUPPORTED: macosx10.12 +// UNSUPPORTED: macosx10.11 +// UNSUPPORTED: macosx10.10 +// UNSUPPORTED: macosx10.9 +// UNSUPPORTED: macosx10.8 +// UNSUPPORTED: macosx10.7 // asan and msan will not call the new handler. // UNSUPPORTED: sanitizer-new-delete Modified: vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow_replace.pass.cpp ============================================================================== --- vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow_replace.pass.cpp Sat Aug 18 08:27:08 2018 (r338004) +++ vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow_replace.pass.cpp Sat Aug 18 08:27:12 2018 (r338005) @@ -10,12 +10,24 @@ // UNSUPPORTED: c++98, c++03, c++11, c++14 // UNSUPPORTED: sanitizer-new-delete -// XFAIL: with_system_cxx_lib=macosx10.12 -// XFAIL: with_system_cxx_lib=macosx10.11 -// XFAIL: with_system_cxx_lib=macosx10.10 -// XFAIL: with_system_cxx_lib=macosx10.9 -// XFAIL: with_system_cxx_lib=macosx10.7 -// XFAIL: with_system_cxx_lib=macosx10.8 +// dylibs shipped before macosx10.13 do not provide aligned allocation, so our +// custom aligned allocation functions are not called and the test fails +// UNSUPPORTED: with_system_cxx_lib=macosx10.12 +// UNSUPPORTED: with_system_cxx_lib=macosx10.11 +// UNSUPPORTED: with_system_cxx_lib=macosx10.10 +// UNSUPPORTED: with_system_cxx_lib=macosx10.9 +// UNSUPPORTED: with_system_cxx_lib=macosx10.8 +// UNSUPPORTED: with_system_cxx_lib=macosx10.7 + +// Our custom aligned allocation functions are not called when deploying to +// platforms older than macosx10.13, since those platforms don't support +// aligned allocation. +// UNSUPPORTED: macosx10.12 +// UNSUPPORTED: macosx10.11 +// UNSUPPORTED: macosx10.10 +// UNSUPPORTED: macosx10.9 +// UNSUPPORTED: macosx10.8 +// UNSUPPORTED: macosx10.7 // NOTE: gcc doesn't provide -faligned-allocation flag to test for // XFAIL: no-aligned-allocation && !gcc Added: vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align.sh.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align.sh.cpp Sat Aug 18 08:27:12 2018 (r338005) @@ -0,0 +1,26 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// + +// void* operator new(std::size_t, std::align_val_t); + +// UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 +// UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 + +// REQUIRES: -faligned-allocation +// RUN: %compile %verify -faligned-allocation + +#include + +int main () +{ + ::operator new(4, std::align_val_t{4}); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} +} Added: vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align_nothrow.sh.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist-release_70/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align_nothrow.sh.cpp Sat Aug 18 08:27:12 2018 (r338005) @@ -0,0 +1,26 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// + +// void* operator new(std::size_t, std::align_val_t, std::nothrow_t &); + +// UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 +// UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8 + +// REQUIRES: -faligned-allocation +// RUN: %compile %verify -faligned-allocation + +#include + +int main () +{ + ::operator new(4, std::align_val_t{4}, std::nothrow); // expected-warning {{ignoring return value of function declared with 'nodiscard' attribute}} +} Modified: vendor/libc++/dist-release_70/test/std/language.support/support.limits/c.limits/cfloat.pass.cpp ============================================================================== --- vendor/libc++/dist-release_70/test/std/language.support/support.limits/c.limits/cfloat.pass.cpp Sat Aug 18 08:27:08 2018 (r338004) +++ vendor/libc++/dist-release_70/test/std/language.support/support.limits/c.limits/cfloat.pass.cpp Sat Aug 18 08:27:12 2018 (r338005) @@ -11,6 +11,8 @@ #include +#include "test_macros.h" + #ifndef FLT_ROUNDS #error FLT_ROUNDS not defined #endif @@ -23,7 +25,7 @@ #error FLT_RADIX not defined #endif -#if TEST_STD_VER > 14 && defined(TEST_HAS_C11_FEATURES) +#if TEST_STD_VER > 14 && defined(TEST_HAS_C11_FEATURES) && 0 #ifndef FLT_HAS_SUBNORM #error FLT_HAS_SUBNORM not defined #endif @@ -53,7 +55,7 @@ #error DECIMAL_DIG not defined #endif -#if TEST_STD_VER > 14 && defined(TEST_HAS_C11_FEATURES) +#if TEST_STD_VER > 14 && defined(TEST_HAS_C11_FEATURES) && 0 #ifndef FLT_DECIMAL_DIG #error FLT_DECIMAL_DIG not defined #endif @@ -163,7 +165,7 @@ #error LDBL_MIN not defined #endif -#if TEST_STD_VER > 14 && defined(TEST_HAS_C11_FEATURES) +#if TEST_STD_VER > 14 && defined(TEST_HAS_C11_FEATURES) && 0 #ifndef FLT_TRUE_MIN #error FLT_TRUE_MIN not defined #endif Modified: vendor/libc++/dist-release_70/test/std/language.support/support.runtime/ctime.pass.cpp ============================================================================== --- vendor/libc++/dist-release_70/test/std/language.support/support.runtime/ctime.pass.cpp Sat Aug 18 08:27:08 2018 (r338004) +++ vendor/libc++/dist-release_70/test/std/language.support/support.runtime/ctime.pass.cpp Sat Aug 18 08:27:12 2018 (r338005) @@ -45,7 +45,7 @@ int main() static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); -#if TEST_STD_VER > 14 && defined(TEST_HAS_C11_FEATURES) +#if TEST_STD_VER > 14 && defined(TEST_HAS_TIMESPEC_GET) static_assert((std::is_same::value), ""); #endif #ifndef _LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS Modified: vendor/libc++/dist-release_70/test/std/language.support/support.start.term/quick_exit.pass.cpp ============================================================================== --- vendor/libc++/dist-release_70/test/std/language.support/support.start.term/quick_exit.pass.cpp Sat Aug 18 08:27:08 2018 (r338004) +++ vendor/libc++/dist-release_70/test/std/language.support/support.start.term/quick_exit.pass.cpp Sat Aug 18 08:27:12 2018 (r338005) @@ -6,7 +6,7 @@ // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// -// +// UNSUPPORTED: c++98, c++03 // test quick_exit and at_quick_exit Modified: vendor/libc++/dist-release_70/test/std/language.support/support.start.term/quick_exit_check1.fail.cpp ============================================================================== --- vendor/libc++/dist-release_70/test/std/language.support/support.start.term/quick_exit_check1.fail.cpp Sat Aug 18 08:27:08 2018 (r338004) +++ vendor/libc++/dist-release_70/test/std/language.support/support.start.term/quick_exit_check1.fail.cpp Sat Aug 18 08:27:12 2018 (r338005) @@ -7,6 +7,7 @@ // //===----------------------------------------------------------------------===// // +// UNSUPPORTED: c++98, c++03 // test that referencing at_quick_exit when _LIBCPP_HAS_QUICK_EXIT is not defined // results in a compile error. Modified: vendor/libc++/dist-release_70/test/std/language.support/support.start.term/quick_exit_check2.fail.cpp ============================================================================== --- vendor/libc++/dist-release_70/test/std/language.support/support.start.term/quick_exit_check2.fail.cpp Sat Aug 18 08:27:08 2018 (r338004) +++ vendor/libc++/dist-release_70/test/std/language.support/support.start.term/quick_exit_check2.fail.cpp Sat Aug 18 08:27:12 2018 (r338005) @@ -6,7 +6,7 @@ // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// -// +// UNSUPPORTED: c++98, c++03 // test that referencing quick_exit when _LIBCPP_HAS_QUICK_EXIT is not defined // results in a compile error. Modified: vendor/libc++/dist-release_70/test/std/utilities/time/date.time/ctime.pass.cpp ============================================================================== --- vendor/libc++/dist-release_70/test/std/utilities/time/date.time/ctime.pass.cpp Sat Aug 18 08:27:08 2018 (r338004) +++ vendor/libc++/dist-release_70/test/std/utilities/time/date.time/ctime.pass.cpp Sat Aug 18 08:27:12 2018 (r338005) @@ -47,7 +47,7 @@ int main() static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); -#if TEST_STD_VER > 14 && defined(TEST_HAS_C11_FEATURES) +#if TEST_STD_VER > 14 && defined(TEST_HAS_TIMESPEC_GET) static_assert((std::is_same::value), ""); #endif #ifndef _LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS Modified: vendor/libc++/dist-release_70/test/support/nasty_macros.hpp ============================================================================== --- vendor/libc++/dist-release_70/test/support/nasty_macros.hpp Sat Aug 18 08:27:08 2018 (r338004) +++ vendor/libc++/dist-release_70/test/support/nasty_macros.hpp Sat Aug 18 08:27:12 2018 (r338005) @@ -22,7 +22,11 @@ #define _J NASTY_MACRO #define _K NASTY_MACRO #define _L NASTY_MACRO +// Because FreeBSD uses _M in its , and it is hard to avoid +// including that header, only define _M for other operating systems. +#ifndef __FreeBSD__ #define _M NASTY_MACRO +#endif #define _N NASTY_MACRO #define _O NASTY_MACRO #define _P NASTY_MACRO Modified: vendor/libc++/dist-release_70/test/support/test_macros.h ============================================================================== --- vendor/libc++/dist-release_70/test/support/test_macros.h Sat Aug 18 08:27:08 2018 (r338004) +++ vendor/libc++/dist-release_70/test/support/test_macros.h Sat Aug 18 08:27:12 2018 (r338005) @@ -124,22 +124,29 @@ // Sniff out to see if the underling C library has C11 features // Note that at this time (July 2018), MacOS X and iOS do NOT. -#if __ISO_C_VISIBLE >= 2011 +// This is cribbed from __config; but lives here as well because we can't assume libc++ +#if __ISO_C_VISIBLE >= 2011 || TEST_STD_VER >= 11 # if defined(__FreeBSD__) +// Specifically, FreeBSD does NOT have timespec_get, even though they have all +// the rest of C11 - this is PR#38495 # define TEST_HAS_C11_FEATURES # elif defined(__Fuchsia__) # define TEST_HAS_C11_FEATURES +# define TEST_HAS_TIMESPEC_GET # elif defined(__linux__) # if !defined(_LIBCPP_HAS_MUSL_LIBC) # if _LIBCPP_GLIBC_PREREQ(2, 17) +# define TEST_HAS_TIMESPEC_GET # define TEST_HAS_C11_FEATURES # endif # else // defined(_LIBCPP_HAS_MUSL_LIBC) # define TEST_HAS_C11_FEATURES +# define TEST_HAS_TIMESPEC_GET # endif # elif defined(_WIN32) # if defined(_MSC_VER) && !defined(__MINGW32__) # define TEST_HAS_C11_FEATURES // Using Microsoft's C Runtime library +# define TEST_HAS_TIMESPEC_GET # endif # endif #endif Modified: vendor/libc++/dist-release_70/utils/libcxx/test/config.py ============================================================================== --- vendor/libc++/dist-release_70/utils/libcxx/test/config.py Sat Aug 18 08:27:08 2018 (r338004) +++ vendor/libc++/dist-release_70/utils/libcxx/test/config.py Sat Aug 18 08:27:12 2018 (r338005) @@ -677,7 +677,8 @@ class Configuration(object): if feature_macros[m]: define += '=%s' % (feature_macros[m]) self.cxx.compile_flags += [define] - if m == '_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS': + if m == '_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS' or \ + m == '_LIBCPP_HIDE_FROM_ABI_PER_TU_BY_DEFAULT': continue if m == '_LIBCPP_ABI_VERSION': self.config.available_features.add('libcpp-abi-version-v%s'