Merge to upstream r348296.

Test: ./run_tests.py --bitness 32
Test: ./run_tests.py --bitness 64
Test: ./run_tests.py --bitness 64 --host
Bug: None
Change-Id: I79cdb1e5f146e42e383426c8e12a231b53a9459a
This commit is contained in:
Dan Albert
2019-01-08 15:37:39 -08:00
1102 changed files with 53262 additions and 12185 deletions

View File

@@ -769,6 +769,7 @@ typedef regex_token_iterator<wstring::const_iterator> wsregex_token_iterator;
#include <memory>
#include <vector>
#include <deque>
#include <version>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
@@ -968,7 +969,7 @@ public:
};
template <regex_constants::error_type _Ev>
_LIBCPP_NORETURN inline _LIBCPP_ALWAYS_INLINE
_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
void __throw_regex_error()
{
#ifndef _LIBCPP_NO_EXCEPTIONS
@@ -1357,9 +1358,9 @@ public:
virtual ~__node() {}
_LIBCPP_INLINE_VISIBILITY
virtual void __exec(__state&) const {};
virtual void __exec(__state&) const {}
_LIBCPP_INLINE_VISIBILITY
virtual void __exec_split(bool, __state&) const {};
virtual void __exec_split(bool, __state&) const {}
};
// __end_state
@@ -2420,20 +2421,17 @@ __bracket_expression<_CharT, _Traits>::__exec(__state& __s) const
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))