diff options
| author | Howard Hinnant <hhinnant@apple.com> | 2013-07-09 17:29:09 +0000 |
|---|---|---|
| committer | Howard Hinnant <hhinnant@apple.com> | 2013-07-09 17:29:09 +0000 |
| commit | dbdeb153d8f5817d49eb3d95709ec20088e9fc95 (patch) | |
| tree | fa41bc3d7e128871d795794b39fb860b41208f50 /libcxx/include/regex | |
| parent | 6c29bd9088bddb60baa29955a2c202922d3a6e3f (diff) | |
| download | bcm5719-llvm-dbdeb153d8f5817d49eb3d95709ec20088e9fc95.tar.gz bcm5719-llvm-dbdeb153d8f5817d49eb3d95709ec20088e9fc95.zip | |
Bill Fisher: This patch fixes a bug where regex_iterator doesn't indicate when it's restarting in the middle of a string. This bug causes /^a/ to match in the middle of the string "aaaaaaa", during iteration.
My patch uses to communicate when is false.
llvm-svn: 185950
Diffstat (limited to 'libcxx/include/regex')
| -rw-r--r-- | libcxx/include/regex | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libcxx/include/regex b/libcxx/include/regex index 312ca11442f..36d5677072f 100644 --- a/libcxx/include/regex +++ b/libcxx/include/regex @@ -5773,7 +5773,8 @@ basic_regex<_CharT, _Traits>::__search( { __m.__init(1 + mark_count(), __first, __last, __flags & regex_constants::__no_update_pos); - if (__match_at_start(__first, __last, __m, __flags, true)) + if (__match_at_start(__first, __last, __m, __flags, + !(__flags & regex_constants::__no_update_pos))) { __m.__prefix_.second = __m[0].first; __m.__prefix_.matched = __m.__prefix_.first != __m.__prefix_.second; |

