From owner-svn-src-vendor@freebsd.org Tue Sep 11 10:10:16 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 E6AEB108B830; Tue, 11 Sep 2018 10:10:15 +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 180B88FC82; Tue, 11 Sep 2018 10:10:11 +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 128CA164DA; Tue, 11 Sep 2018 10:10:11 +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 w8BAAAgU027626; Tue, 11 Sep 2018 10:10:10 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8BAA9lj027615; Tue, 11 Sep 2018 10:10:09 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201809111010.w8BAA9lj027615@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 11 Sep 2018 10:10:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r338581 - in vendor/libc++/dist-release_70: include test/std/re/re.alg/re.alg.match test/std/re/re.alg/re.alg.search test/std/utilities/memory/storage.iterator test/std/utilities/memory... X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/libc++/dist-release_70: include test/std/re/re.alg/re.alg.match test/std/re/re.alg/re.alg.search test/std/utilities/memory/storage.iterator test/std/utilities/memory/util.smartptr/util.smart... X-SVN-Commit-Revision: 338581 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: Tue, 11 Sep 2018 10:10:16 -0000 Author: dim Date: Tue Sep 11 10:10:09 2018 New Revision: 338581 URL: https://svnweb.freebsd.org/changeset/base/338581 Log: Vendor import of libc++ release_70 branch r341916: https://llvm.org/svn/llvm-project/libcxx/branches/release_70@341916 Added: vendor/libc++/dist-release_70/test/std/re/re.alg/re.alg.match/inverted_character_classes.pass.cpp (contents, props changed) Modified: vendor/libc++/dist-release_70/include/memory vendor/libc++/dist-release_70/include/regex vendor/libc++/dist-release_70/test/std/re/re.alg/re.alg.search/invert_neg_word_search.pass.cpp vendor/libc++/dist-release_70/test/std/utilities/memory/storage.iterator/raw_storage_iterator.base.pass.cpp vendor/libc++/dist-release_70/test/std/utilities/memory/storage.iterator/raw_storage_iterator.pass.cpp vendor/libc++/dist-release_70/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared.pass.cpp vendor/libc++/dist-release_70/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp Modified: vendor/libc++/dist-release_70/include/memory ============================================================================== --- vendor/libc++/dist-release_70/include/memory Tue Sep 11 10:10:05 2018 (r338580) +++ vendor/libc++/dist-release_70/include/memory Tue Sep 11 10:10:09 2018 (r338581) @@ -1989,10 +1989,10 @@ class _LIBCPP_TEMPLATE_VIS raw_storage_iterator (publi _LIBCPP_INLINE_VISIBILITY explicit raw_storage_iterator(_OutputIterator __x) : __x_(__x) {} _LIBCPP_INLINE_VISIBILITY raw_storage_iterator& operator*() {return *this;} _LIBCPP_INLINE_VISIBILITY raw_storage_iterator& operator=(const _Tp& __element) - {::new(&*__x_) _Tp(__element); return *this;} + {::new(_VSTD::addressof(*__x_)) _Tp(__element); return *this;} #if _LIBCPP_STD_VER >= 14 _LIBCPP_INLINE_VISIBILITY raw_storage_iterator& operator=(_Tp&& __element) - {::new(&*__x_) _Tp(_VSTD::move(__element)); return *this;} + {::new(_VSTD::addressof(*__x_)) _Tp(_VSTD::move(__element)); return *this;} #endif _LIBCPP_INLINE_VISIBILITY raw_storage_iterator& operator++() {++__x_; return *this;} _LIBCPP_INLINE_VISIBILITY raw_storage_iterator operator++(int) @@ -3682,7 +3682,7 @@ class __shared_ptr_emplace (private) virtual void __on_zero_shared_weak() _NOEXCEPT; public: _LIBCPP_INLINE_VISIBILITY - _Tp* get() _NOEXCEPT {return &__data_.second();} + _Tp* get() _NOEXCEPT {return _VSTD::addressof(__data_.second());} }; template Modified: vendor/libc++/dist-release_70/include/regex ============================================================================== --- vendor/libc++/dist-release_70/include/regex Tue Sep 11 10:10:05 2018 (r338580) +++ vendor/libc++/dist-release_70/include/regex Tue Sep 11 10:10:09 2018 (r338581) @@ -2414,20 +2414,17 @@ __bracket_expression<_CharT, _Traits>::__exec(__state& goto __exit; } } - // set of "__found" chars = + // When there's at least one of __neg_chars_ and __neg_mask_, the set + // of "__found" chars is // union(complement(union(__neg_chars_, __neg_mask_)), // other cases...) // - // __neg_chars_ and __neg_mask_'d better be handled together, as there - // are no short circuit opportunities. - // - // In addition, when __neg_mask_/__neg_chars_ is empty, they should be - // treated as all ones/all chars. + // It doesn't make sense to check this when there are no __neg_chars_ + // and no __neg_mask_. + if (!(__neg_mask_ == 0 && __neg_chars_.empty())) { - const bool __in_neg_mask = (__neg_mask_ == 0) || - __traits_.isctype(__ch, __neg_mask_); + const bool __in_neg_mask = __traits_.isctype(__ch, __neg_mask_); const bool __in_neg_chars = - __neg_chars_.empty() || std::find(__neg_chars_.begin(), __neg_chars_.end(), __ch) != __neg_chars_.end(); if (!(__in_neg_mask || __in_neg_chars)) Added: vendor/libc++/dist-release_70/test/std/re/re.alg/re.alg.match/inverted_character_classes.pass.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist-release_70/test/std/re/re.alg/re.alg.match/inverted_character_classes.pass.cpp Tue Sep 11 10:10:09 2018 (r338581) @@ -0,0 +1,44 @@ +//===----------------------------------------------------------------------===// +// +// 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 + +// Make sure that we correctly match inverted character classes. + +#include +#include + + +int main() { + assert(std::regex_match("X", std::regex("[X]"))); + assert(std::regex_match("X", std::regex("[XY]"))); + assert(!std::regex_match("X", std::regex("[^X]"))); + assert(!std::regex_match("X", std::regex("[^XY]"))); + + assert(std::regex_match("X", std::regex("[\\S]"))); + assert(!std::regex_match("X", std::regex("[^\\S]"))); + + assert(!std::regex_match("X", std::regex("[\\s]"))); + assert(std::regex_match("X", std::regex("[^\\s]"))); + + assert(std::regex_match("X", std::regex("[\\s\\S]"))); + assert(std::regex_match("X", std::regex("[^Y\\s]"))); + assert(!std::regex_match("X", std::regex("[^X\\s]"))); + + assert(std::regex_match("X", std::regex("[\\w]"))); + assert(std::regex_match("_", std::regex("[\\w]"))); + assert(!std::regex_match("X", std::regex("[^\\w]"))); + assert(!std::regex_match("_", std::regex("[^\\w]"))); + + assert(!std::regex_match("X", std::regex("[\\W]"))); + assert(!std::regex_match("_", std::regex("[\\W]"))); + assert(std::regex_match("X", std::regex("[^\\W]"))); + assert(std::regex_match("_", std::regex("[^\\W]"))); +} Modified: vendor/libc++/dist-release_70/test/std/re/re.alg/re.alg.search/invert_neg_word_search.pass.cpp ============================================================================== --- vendor/libc++/dist-release_70/test/std/re/re.alg/re.alg.search/invert_neg_word_search.pass.cpp Tue Sep 11 10:10:05 2018 (r338580) +++ vendor/libc++/dist-release_70/test/std/re/re.alg/re.alg.search/invert_neg_word_search.pass.cpp Tue Sep 11 10:10:09 2018 (r338581) @@ -18,7 +18,7 @@ #include #include -#include "test_macros.h" + // PR34310 int main() Modified: vendor/libc++/dist-release_70/test/std/utilities/memory/storage.iterator/raw_storage_iterator.base.pass.cpp ============================================================================== --- vendor/libc++/dist-release_70/test/std/utilities/memory/storage.iterator/raw_storage_iterator.base.pass.cpp Tue Sep 11 10:10:05 2018 (r338580) +++ vendor/libc++/dist-release_70/test/std/utilities/memory/storage.iterator/raw_storage_iterator.base.pass.cpp Tue Sep 11 10:10:09 2018 (r338581) @@ -15,6 +15,13 @@ #include "test_macros.h" +#if TEST_STD_VER >= 11 +#define DELETE_FUNCTION = delete +#else +#define DELETE_FUNCTION +#endif + + int A_constructed = 0; struct A @@ -27,6 +34,7 @@ struct A (public) ~A() {--A_constructed; data_ = 0;} bool operator==(int i) const {return data_ == i;} + A* operator& () DELETE_FUNCTION; }; int main() Modified: vendor/libc++/dist-release_70/test/std/utilities/memory/storage.iterator/raw_storage_iterator.pass.cpp ============================================================================== --- vendor/libc++/dist-release_70/test/std/utilities/memory/storage.iterator/raw_storage_iterator.pass.cpp Tue Sep 11 10:10:05 2018 (r338580) +++ vendor/libc++/dist-release_70/test/std/utilities/memory/storage.iterator/raw_storage_iterator.pass.cpp Tue Sep 11 10:10:09 2018 (r338581) @@ -16,6 +16,12 @@ #include "test_macros.h" #include +#if TEST_STD_VER >= 11 +#define DELETE_FUNCTION = delete +#else +#define DELETE_FUNCTION +#endif + int A_constructed = 0; struct A @@ -28,6 +34,7 @@ struct A (public) ~A() {--A_constructed; data_ = 0;} bool operator==(int i) const {return data_ == i;} + A* operator& () DELETE_FUNCTION; }; int main() Modified: vendor/libc++/dist-release_70/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared.pass.cpp ============================================================================== --- vendor/libc++/dist-release_70/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared.pass.cpp Tue Sep 11 10:10:05 2018 (r338580) +++ vendor/libc++/dist-release_70/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared.pass.cpp Tue Sep 11 10:10:09 2018 (r338581) @@ -23,6 +23,12 @@ #include "test_allocator.h" #include "min_allocator.h" +#if TEST_STD_VER >= 11 +#define DELETE_FUNCTION = delete +#else +#define DELETE_FUNCTION +#endif + int new_count = 0; struct A @@ -37,6 +43,8 @@ struct A int get_int() const {return int_;} char get_char() const {return char_;} + + A* operator& () DELETE_FUNCTION; private: int int_; char char_; Modified: vendor/libc++/dist-release_70/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp ============================================================================== --- vendor/libc++/dist-release_70/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp Tue Sep 11 10:10:05 2018 (r338580) +++ vendor/libc++/dist-release_70/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp Tue Sep 11 10:10:09 2018 (r338581) @@ -19,6 +19,12 @@ #include "test_macros.h" #include "count_new.hpp" +#if TEST_STD_VER >= 11 +#define DELETE_FUNCTION = delete +#else +#define DELETE_FUNCTION +#endif + struct A { static int count; @@ -31,6 +37,9 @@ struct A int get_int() const {return int_;} char get_char() const {return char_;} + + A* operator& () DELETE_FUNCTION; + private: int int_; char char_;