summaryrefslogtreecommitdiffstats
path: root/libcxx/include/string
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2018-05-29 17:04:37 +0000
committerMarshall Clow <mclow.lists@gmail.com>2018-05-29 17:04:37 +0000
commit5a823d8d63402dd6477cbb6f6c3fd07a1ccfeb1e (patch)
tree148e664b74c93e9b51a260eb1dca066ac8ded71e /libcxx/include/string
parent6c21b3b5950705021255095ebb6c08402c776184 (diff)
downloadbcm5719-llvm-5a823d8d63402dd6477cbb6f6c3fd07a1ccfeb1e.tar.gz
bcm5719-llvm-5a823d8d63402dd6477cbb6f6c3fd07a1ccfeb1e.zip
Mark __clear_and_shrink() as noexcept. This prevents the generation of a catch block and call to terminate in string's move assignment. Thanks to Howard for the 'catch'.
llvm-svn: 333435
Diffstat (limited to 'libcxx/include/string')
-rw-r--r--libcxx/include/string4
1 files changed, 2 insertions, 2 deletions
diff --git a/libcxx/include/string b/libcxx/include/string
index 7218aa2e4d4..bfdd141cd98 100644
--- a/libcxx/include/string
+++ b/libcxx/include/string
@@ -1259,7 +1259,7 @@ public:
_LIBCPP_INLINE_VISIBILITY bool __invariants() const;
- _LIBCPP_INLINE_VISIBILITY void __clear_and_shrink();
+ _LIBCPP_INLINE_VISIBILITY void __clear_and_shrink() _NOEXCEPT;
_LIBCPP_INLINE_VISIBILITY
bool __is_long() const _NOEXCEPT
@@ -3585,7 +3585,7 @@ basic_string<_CharT, _Traits, _Allocator>::__invariants() const
template<class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
void
-basic_string<_CharT, _Traits, _Allocator>::__clear_and_shrink()
+basic_string<_CharT, _Traits, _Allocator>::__clear_and_shrink() _NOEXCEPT
{
clear();
if(__is_long())
OpenPOWER on IntegriCloud