Fix a bug in regex_Iterator where it would report zero-length matches forever. Reported as http://llvm.org/PR33681. Thanks to Karen Arutyunov for the report.
llvm-svn: 307171
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 52f4f72fa95ac0e3baf21be658a4005f265358c7
diff --git a/include/regex b/include/regex
index 443c2e3..77ca648 100644
--- a/include/regex
+++ b/include/regex
@@ -6142,7 +6142,7 @@
{
__flags_ |= regex_constants::__no_update_pos;
_BidirectionalIterator __start = __match_[0].second;
- if (__match_.empty())
+ if (__match_[0].first == __match_[0].second)
{
if (__start == __end_)
{