Author: marshall Date: Sun Feb 5 14:52:32 2017 New Revision: 294142 URL: http://llvm.org/viewvc/llvm-project?rev=294142&view=rev Log: Restore the _NOEXCEPT on the dtor of bad_optional_access. Destructors are noexcept by default, so it's not really needed, but the other exception classes have the _NOEXCEPT, and gcc complains if these are missing. I think we should remove them all - but not today.
Modified: libcxx/trunk/include/experimental/optional libcxx/trunk/include/optional libcxx/trunk/src/optional.cpp Modified: libcxx/trunk/include/experimental/optional URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/experimental/optional?rev=294142&r1=294141&r2=294142&view=diff ============================================================================== --- libcxx/trunk/include/experimental/optional (original) +++ libcxx/trunk/include/experimental/optional Sun Feb 5 14:52:32 2017 @@ -152,7 +152,7 @@ public: bad_optional_access() : std::logic_error("Bad optional Access") {} // Get the key function ~bad_optional_access() into the dylib - virtual ~bad_optional_access(); + virtual ~bad_optional_access() _NOEXCEPT; }; _LIBCPP_END_NAMESPACE_EXPERIMENTAL Modified: libcxx/trunk/include/optional URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/optional?rev=294142&r1=294141&r2=294142&view=diff ============================================================================== --- libcxx/trunk/include/optional (original) +++ libcxx/trunk/include/optional Sun Feb 5 14:52:32 2017 @@ -164,7 +164,7 @@ class _LIBCPP_EXCEPTION_ABI bad_optional { public: // Get the key function ~bad_optional_access() into the dylib - virtual ~bad_optional_access(); + virtual ~bad_optional_access() _NOEXCEPT; virtual const char* what() const _NOEXCEPT; }; Modified: libcxx/trunk/src/optional.cpp URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/optional.cpp?rev=294142&r1=294141&r2=294142&view=diff ============================================================================== --- libcxx/trunk/src/optional.cpp (original) +++ libcxx/trunk/src/optional.cpp Sun Feb 5 14:52:32 2017 @@ -13,7 +13,7 @@ namespace std { -bad_optional_access::~bad_optional_access() = default; +bad_optional_access::~bad_optional_access() _NOEXCEPT = default; const char* bad_optional_access::what() const _NOEXCEPT { return "bad_optional_access"; @@ -23,6 +23,6 @@ const char* bad_optional_access::what() _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL -bad_optional_access::~bad_optional_access() = default; +bad_optional_access::~bad_optional_access() _NOEXCEPT = default; _LIBCPP_END_NAMESPACE_EXPERIMENTAL _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits