diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2015-01-13 16:49:52 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2015-01-13 16:49:52 +0000 |
commit | 9db9069cf31eb9eddc1ff19b0d5667e33a8c3f75 (patch) | |
tree | a4d3b9936cb43e4a3e3fc80847a10f94a1379db9 /libcxx/include | |
parent | e7cad7a1dffff3232e649c7684dfedf5e640b94d (diff) | |
download | bcm5719-llvm-9db9069cf31eb9eddc1ff19b0d5667e33a8c3f75.tar.gz bcm5719-llvm-9db9069cf31eb9eddc1ff19b0d5667e33a8c3f75.zip |
Make regex::assign not clobber the regex in case of failure. Fixes PR#22213
llvm-svn: 225799
Diffstat (limited to 'libcxx/include')
-rw-r--r-- | libcxx/include/regex | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libcxx/include/regex b/libcxx/include/regex index 690213a978d..39e106c4e4c 100644 --- a/libcxx/include/regex +++ b/libcxx/include/regex @@ -2599,9 +2599,7 @@ public: assign(_ForwardIterator __first, _ForwardIterator __last, flag_type __f = regex_constants::ECMAScript) { - __member_init(__f); - __parse(__first, __last); - return *this; + return assign(basic_regex(__first, __last, __f)); } #ifndef _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS |