From owner-svn-src-head@freebsd.org Wed Mar 18 20:50:33 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1540926CF67; Wed, 18 Mar 2020 20:50:33 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48jMcm5WVcz4Z1K; Wed, 18 Mar 2020 20:50:32 +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 6C8F327BA9; Wed, 18 Mar 2020 20:50:32 +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 02IKoW0W000199; Wed, 18 Mar 2020 20:50:32 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02IKoUJA000186; Wed, 18 Mar 2020 20:50:30 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202003182050.02IKoUJA000186@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 18 Mar 2020 20:50:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359087 - head/contrib/llvm-project/libcxx/include X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/contrib/llvm-project/libcxx/include X-SVN-Commit-Revision: 359087 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Mar 2020 20:50:33 -0000 Author: dim Date: Wed Mar 18 20:50:30 2020 New Revision: 359087 URL: https://svnweb.freebsd.org/changeset/base/359087 Log: Merge commit 585a3cc31 from llvm git (by me): Fix -Wdeprecated-copy-dtor and -Wdeprecated-dynamic-exception-spec warnings. Summary: The former are like: libcxx/include/typeinfo:322:11: warning: definition of implicit copy constructor for 'bad_cast' is deprecated because it has a user-declared destructor [-Wdeprecated-copy-dtor] virtual ~bad_cast() _NOEXCEPT; ^ libcxx/include/typeinfo:344:11: note: in implicit copy constructor for 'std::bad_cast' first required here throw bad_cast(); ^ Fix these by adding an explicitly defaulted copy constructor. The latter are like: libcxx/include/codecvt:105:37: warning: dynamic exception specifications are deprecated [-Wdeprecated-dynamic-exception-spec] virtual int do_encoding() const throw(); ^~~~~~~ Fix these by using the _NOEXCEPT macro instead. Reviewers: EricWF, mclow.lists, ldionne, #libc Reviewed By: EricWF, #libc Subscribers: dexonsmith, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D76150 This is because we use -Wsystem-headers during buildworld, and the two warnings above are now triggered by default with clang 10, preventing most C++ code from compiling without NO_WERROR. Requested by: brooks MFC after: 6 weeks X-MFC-With: 358851 Differential Revision: https://reviews.freebsd.org/D24049 Modified: head/contrib/llvm-project/libcxx/include/codecvt head/contrib/llvm-project/libcxx/include/exception head/contrib/llvm-project/libcxx/include/filesystem head/contrib/llvm-project/libcxx/include/future head/contrib/llvm-project/libcxx/include/ios head/contrib/llvm-project/libcxx/include/memory head/contrib/llvm-project/libcxx/include/regex head/contrib/llvm-project/libcxx/include/stdexcept head/contrib/llvm-project/libcxx/include/system_error head/contrib/llvm-project/libcxx/include/typeinfo Modified: head/contrib/llvm-project/libcxx/include/codecvt ============================================================================== --- head/contrib/llvm-project/libcxx/include/codecvt Wed Mar 18 20:44:40 2020 (r359086) +++ head/contrib/llvm-project/libcxx/include/codecvt Wed Mar 18 20:50:30 2020 (r359087) @@ -102,11 +102,11 @@ class _LIBCPP_TYPE_VIS __codecvt_utf8 (protec virtual result do_unshift(state_type& __st, extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const; - virtual int do_encoding() const throw(); - virtual bool do_always_noconv() const throw(); + virtual int do_encoding() const _NOEXCEPT; + virtual bool do_always_noconv() const _NOEXCEPT; virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end, size_t __mx) const; - virtual int do_max_length() const throw(); + virtual int do_max_length() const _NOEXCEPT; }; template <> @@ -137,11 +137,11 @@ class _LIBCPP_TYPE_VIS __codecvt_utf8 (prote virtual result do_unshift(state_type& __st, extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const; - virtual int do_encoding() const throw(); - virtual bool do_always_noconv() const throw(); + virtual int do_encoding() const _NOEXCEPT; + virtual bool do_always_noconv() const _NOEXCEPT; virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end, size_t __mx) const; - virtual int do_max_length() const throw(); + virtual int do_max_length() const _NOEXCEPT; }; template <> @@ -172,11 +172,11 @@ class _LIBCPP_TYPE_VIS __codecvt_utf8 (prote virtual result do_unshift(state_type& __st, extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const; - virtual int do_encoding() const throw(); - virtual bool do_always_noconv() const throw(); + virtual int do_encoding() const _NOEXCEPT; + virtual bool do_always_noconv() const _NOEXCEPT; virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end, size_t __mx) const; - virtual int do_max_length() const throw(); + virtual int do_max_length() const _NOEXCEPT; }; template virtual result do_unshift(state_type& __st, extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const; - virtual int do_encoding() const throw(); - virtual bool do_always_noconv() const throw(); + virtual int do_encoding() const _NOEXCEPT; + virtual bool do_always_noconv() const _NOEXCEPT; virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end, size_t __mx) const; - virtual int do_max_length() const throw(); + virtual int do_max_length() const _NOEXCEPT; }; template <> @@ -260,11 +260,11 @@ class _LIBCPP_TYPE_VIS __codecvt_utf16 virtual result do_unshift(state_type& __st, extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const; - virtual int do_encoding() const throw(); - virtual bool do_always_noconv() const throw(); + virtual int do_encoding() const _NOEXCEPT; + virtual bool do_always_noconv() const _NOEXCEPT; virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end, size_t __mx) const; - virtual int do_max_length() const throw(); + virtual int do_max_length() const _NOEXCEPT; }; template <> @@ -295,11 +295,11 @@ class _LIBCPP_TYPE_VIS __codecvt_utf16 @@ -330,11 +330,11 @@ class _LIBCPP_TYPE_VIS __codecvt_utf16 virtual result do_unshift(state_type& __st, extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const; - virtual int do_encoding() const throw(); - virtual bool do_always_noconv() const throw(); + virtual int do_encoding() const _NOEXCEPT; + virtual bool do_always_noconv() const _NOEXCEPT; virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end, size_t __mx) const; - virtual int do_max_length() const throw(); + virtual int do_max_length() const _NOEXCEPT; }; template <> @@ -365,11 +365,11 @@ class _LIBCPP_TYPE_VIS __codecvt_utf16 @@ -400,11 +400,11 @@ class _LIBCPP_TYPE_VIS __codecvt_utf16 virtual result do_unshift(state_type& __st, extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const; - virtual int do_encoding() const throw(); - virtual bool do_always_noconv() const throw(); + virtual int do_encoding() const _NOEXCEPT; + virtual bool do_always_noconv() const _NOEXCEPT; virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end, size_t __mx) const; - virtual int do_max_length() const throw(); + virtual int do_max_length() const _NOEXCEPT; }; template ( virtual result do_unshift(state_type& __st, extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const; - virtual int do_encoding() const throw(); - virtual bool do_always_noconv() const throw(); + virtual int do_encoding() const _NOEXCEPT; + virtual bool do_always_noconv() const _NOEXCEPT; virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end, size_t __mx) const; - virtual int do_max_length() const throw(); + virtual int do_max_length() const _NOEXCEPT; }; template <> @@ -488,11 +488,11 @@ class _LIBCPP_TYPE_VIS __codecvt_utf8_utf16 virtual result do_unshift(state_type& __st, extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const; - virtual int do_encoding() const throw(); - virtual bool do_always_noconv() const throw(); + virtual int do_encoding() const _NOEXCEPT; + virtual bool do_always_noconv() const _NOEXCEPT; virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end, size_t __mx) const; - virtual int do_max_length() const throw(); + virtual int do_max_length() const _NOEXCEPT; }; template <> @@ -523,11 +523,11 @@ class _LIBCPP_TYPE_VIS __codecvt_utf8_utf16 virtual result do_unshift(state_type& __st, extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const; - virtual int do_encoding() const throw(); - virtual bool do_always_noconv() const throw(); + virtual int do_encoding() const _NOEXCEPT; + virtual bool do_always_noconv() const _NOEXCEPT; virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end, size_t __mx) const; - virtual int do_max_length() const throw(); + virtual int do_max_length() const _NOEXCEPT; }; template __p2_; } + filesystem_error(const filesystem_error&) = default; ~filesystem_error() override; // key function _LIBCPP_INLINE_VISIBILITY Modified: head/contrib/llvm-project/libcxx/include/future ============================================================================== --- head/contrib/llvm-project/libcxx/include/future Wed Mar 18 20:44:40 2020 (r359086) +++ head/contrib/llvm-project/libcxx/include/future Wed Mar 18 20:50:30 2020 (r359087) @@ -506,6 +506,7 @@ class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_FUTUR _LIBCPP_INLINE_VISIBILITY const error_code& code() const _NOEXCEPT {return __ec_;} + future_error(const future_error&) _NOEXCEPT = default; virtual ~future_error() _NOEXCEPT; }; Modified: head/contrib/llvm-project/libcxx/include/ios ============================================================================== --- head/contrib/llvm-project/libcxx/include/ios Wed Mar 18 20:44:40 2020 (r359086) +++ head/contrib/llvm-project/libcxx/include/ios Wed Mar 18 20:50:30 2020 (r359087) @@ -431,7 +431,8 @@ class _LIBCPP_EXCEPTION_ABI ios_base::failure public: explicit failure(const string& __msg, const error_code& __ec = io_errc::stream); explicit failure(const char* __msg, const error_code& __ec = io_errc::stream); - virtual ~failure() throw(); + failure(const failure&) _NOEXCEPT = default; + virtual ~failure() _NOEXCEPT; }; _LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY Modified: head/contrib/llvm-project/libcxx/include/memory ============================================================================== --- head/contrib/llvm-project/libcxx/include/memory Wed Mar 18 20:44:40 2020 (r359086) +++ head/contrib/llvm-project/libcxx/include/memory Wed Mar 18 20:50:30 2020 (r359087) @@ -2134,39 +2134,39 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 public: typedef _Tp element_type; - _LIBCPP_INLINE_VISIBILITY explicit auto_ptr(_Tp* __p = 0) throw() : __ptr_(__p) {} - _LIBCPP_INLINE_VISIBILITY auto_ptr(auto_ptr& __p) throw() : __ptr_(__p.release()) {} - template _LIBCPP_INLINE_VISIBILITY auto_ptr(auto_ptr<_Up>& __p) throw() + _LIBCPP_INLINE_VISIBILITY explicit auto_ptr(_Tp* __p = 0) _NOEXCEPT : __ptr_(__p) {} + _LIBCPP_INLINE_VISIBILITY auto_ptr(auto_ptr& __p) _NOEXCEPT : __ptr_(__p.release()) {} + template _LIBCPP_INLINE_VISIBILITY auto_ptr(auto_ptr<_Up>& __p) _NOEXCEPT : __ptr_(__p.release()) {} - _LIBCPP_INLINE_VISIBILITY auto_ptr& operator=(auto_ptr& __p) throw() + _LIBCPP_INLINE_VISIBILITY auto_ptr& operator=(auto_ptr& __p) _NOEXCEPT {reset(__p.release()); return *this;} - template _LIBCPP_INLINE_VISIBILITY auto_ptr& operator=(auto_ptr<_Up>& __p) throw() + template _LIBCPP_INLINE_VISIBILITY auto_ptr& operator=(auto_ptr<_Up>& __p) _NOEXCEPT {reset(__p.release()); return *this;} - _LIBCPP_INLINE_VISIBILITY auto_ptr& operator=(auto_ptr_ref<_Tp> __p) throw() + _LIBCPP_INLINE_VISIBILITY auto_ptr& operator=(auto_ptr_ref<_Tp> __p) _NOEXCEPT {reset(__p.__ptr_); return *this;} - _LIBCPP_INLINE_VISIBILITY ~auto_ptr() throw() {delete __ptr_;} + _LIBCPP_INLINE_VISIBILITY ~auto_ptr() _NOEXCEPT {delete __ptr_;} - _LIBCPP_INLINE_VISIBILITY _Tp& operator*() const throw() + _LIBCPP_INLINE_VISIBILITY _Tp& operator*() const _NOEXCEPT {return *__ptr_;} - _LIBCPP_INLINE_VISIBILITY _Tp* operator->() const throw() {return __ptr_;} - _LIBCPP_INLINE_VISIBILITY _Tp* get() const throw() {return __ptr_;} - _LIBCPP_INLINE_VISIBILITY _Tp* release() throw() + _LIBCPP_INLINE_VISIBILITY _Tp* operator->() const _NOEXCEPT {return __ptr_;} + _LIBCPP_INLINE_VISIBILITY _Tp* get() const _NOEXCEPT {return __ptr_;} + _LIBCPP_INLINE_VISIBILITY _Tp* release() _NOEXCEPT { _Tp* __t = __ptr_; __ptr_ = 0; return __t; } - _LIBCPP_INLINE_VISIBILITY void reset(_Tp* __p = 0) throw() + _LIBCPP_INLINE_VISIBILITY void reset(_Tp* __p = 0) _NOEXCEPT { if (__ptr_ != __p) delete __ptr_; __ptr_ = __p; } - _LIBCPP_INLINE_VISIBILITY auto_ptr(auto_ptr_ref<_Tp> __p) throw() : __ptr_(__p.__ptr_) {} - template _LIBCPP_INLINE_VISIBILITY operator auto_ptr_ref<_Up>() throw() + _LIBCPP_INLINE_VISIBILITY auto_ptr(auto_ptr_ref<_Tp> __p) _NOEXCEPT : __ptr_(__p.__ptr_) {} + template _LIBCPP_INLINE_VISIBILITY operator auto_ptr_ref<_Up>() _NOEXCEPT {auto_ptr_ref<_Up> __t; __t.__ptr_ = release(); return __t;} - template _LIBCPP_INLINE_VISIBILITY operator auto_ptr<_Up>() throw() + template _LIBCPP_INLINE_VISIBILITY operator auto_ptr<_Up>() _NOEXCEPT {return auto_ptr<_Up>(release());} }; @@ -3393,6 +3393,8 @@ class _LIBCPP_EXCEPTION_ABI bad_weak_ptr : public std::exception { public: + bad_weak_ptr() _NOEXCEPT = default; + bad_weak_ptr(const bad_weak_ptr&) _NOEXCEPT = default; virtual ~bad_weak_ptr() _NOEXCEPT; virtual const char* what() const _NOEXCEPT; }; Modified: head/contrib/llvm-project/libcxx/include/regex ============================================================================== --- head/contrib/llvm-project/libcxx/include/regex Wed Mar 18 20:44:40 2020 (r359086) +++ head/contrib/llvm-project/libcxx/include/regex Wed Mar 18 20:50:30 2020 (r359087) @@ -977,7 +977,8 @@ class _LIBCPP_EXCEPTION_ABI regex_error regex_constants::error_type __code_; public: explicit regex_error(regex_constants::error_type __ecode); - virtual ~regex_error() throw(); + regex_error(const regex_error&) _NOEXCEPT = default; + virtual ~regex_error() _NOEXCEPT; _LIBCPP_INLINE_VISIBILITY regex_constants::error_type code() const {return __code_;} }; Modified: head/contrib/llvm-project/libcxx/include/stdexcept ============================================================================== --- head/contrib/llvm-project/libcxx/include/stdexcept Wed Mar 18 20:44:40 2020 (r359086) +++ head/contrib/llvm-project/libcxx/include/stdexcept Wed Mar 18 20:50:30 2020 (r359087) @@ -129,6 +129,7 @@ class _LIBCPP_EXCEPTION_ABI domain_error (public) _LIBCPP_INLINE_VISIBILITY explicit domain_error(const char* __s) : logic_error(__s) {} #ifndef _LIBCPP_ABI_VCRUNTIME + domain_error(const domain_error&) _NOEXCEPT = default; virtual ~domain_error() _NOEXCEPT; #endif }; @@ -141,6 +142,7 @@ class _LIBCPP_EXCEPTION_ABI invalid_argument (public) _LIBCPP_INLINE_VISIBILITY explicit invalid_argument(const char* __s) : logic_error(__s) {} #ifndef _LIBCPP_ABI_VCRUNTIME + invalid_argument(const invalid_argument&) _NOEXCEPT = default; virtual ~invalid_argument() _NOEXCEPT; #endif }; @@ -152,6 +154,7 @@ class _LIBCPP_EXCEPTION_ABI length_error (public) _LIBCPP_INLINE_VISIBILITY explicit length_error(const string& __s) : logic_error(__s) {} _LIBCPP_INLINE_VISIBILITY explicit length_error(const char* __s) : logic_error(__s) {} #ifndef _LIBCPP_ABI_VCRUNTIME + length_error(const length_error&) _NOEXCEPT = default; virtual ~length_error() _NOEXCEPT; #endif }; @@ -164,6 +167,7 @@ class _LIBCPP_EXCEPTION_ABI out_of_range (public) _LIBCPP_INLINE_VISIBILITY explicit out_of_range(const char* __s) : logic_error(__s) {} #ifndef _LIBCPP_ABI_VCRUNTIME + out_of_range(const out_of_range&) _NOEXCEPT = default; virtual ~out_of_range() _NOEXCEPT; #endif }; @@ -176,6 +180,7 @@ class _LIBCPP_EXCEPTION_ABI range_error (public) _LIBCPP_INLINE_VISIBILITY explicit range_error(const char* __s) : runtime_error(__s) {} #ifndef _LIBCPP_ABI_VCRUNTIME + range_error(const range_error&) _NOEXCEPT = default; virtual ~range_error() _NOEXCEPT; #endif }; @@ -188,6 +193,7 @@ class _LIBCPP_EXCEPTION_ABI overflow_error (public) _LIBCPP_INLINE_VISIBILITY explicit overflow_error(const char* __s) : runtime_error(__s) {} #ifndef _LIBCPP_ABI_VCRUNTIME + overflow_error(const overflow_error&) _NOEXCEPT = default; virtual ~overflow_error() _NOEXCEPT; #endif }; @@ -200,6 +206,7 @@ class _LIBCPP_EXCEPTION_ABI underflow_error (public) _LIBCPP_INLINE_VISIBILITY explicit underflow_error(const char* __s) : runtime_error(__s) {} #ifndef _LIBCPP_ABI_VCRUNTIME + underflow_error(const underflow_error&) _NOEXCEPT = default; virtual ~underflow_error() _NOEXCEPT; #endif }; Modified: head/contrib/llvm-project/libcxx/include/system_error ============================================================================== --- head/contrib/llvm-project/libcxx/include/system_error Wed Mar 18 20:44:40 2020 (r359086) +++ head/contrib/llvm-project/libcxx/include/system_error Wed Mar 18 20:50:30 2020 (r359087) @@ -469,6 +469,7 @@ class _LIBCPP_TYPE_VIS system_error (public) system_error(int __ev, const error_category& __ecat, const string& __what_arg); system_error(int __ev, const error_category& __ecat, const char* __what_arg); system_error(int __ev, const error_category& __ecat); + system_error(const system_error&) _NOEXCEPT = default; ~system_error() _NOEXCEPT; _LIBCPP_INLINE_VISIBILITY Modified: head/contrib/llvm-project/libcxx/include/typeinfo ============================================================================== --- head/contrib/llvm-project/libcxx/include/typeinfo Wed Mar 18 20:44:40 2020 (r359086) +++ head/contrib/llvm-project/libcxx/include/typeinfo Wed Mar 18 20:50:30 2020 (r359087) @@ -318,6 +318,7 @@ class _LIBCPP_EXCEPTION_ABI bad_cast { public: bad_cast() _NOEXCEPT; + bad_cast(const bad_cast&) _NOEXCEPT = default; virtual ~bad_cast() _NOEXCEPT; virtual const char* what() const _NOEXCEPT; };