Bill Fisher: Fix for failing to throw an exception in regex when parsing an invalid escape sequence. This fixes http://llvm.org/bugs/show_bug.cgi?id=16023

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185192 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Howard Hinnant
2013-06-28 18:57:30 +00:00
parent b9d9fb4a17
commit 918f2a80ab
2 changed files with 38 additions and 1 deletions

View File

@@ -4481,7 +4481,7 @@ basic_regex<_CharT, _Traits>::__parse_character_escape(_ForwardIterator __first,
++__first;
}
#ifndef _LIBCPP_NO_EXCEPTIONS
else if (__str)
else
throw regex_error(regex_constants::error_escape);
#endif // _LIBCPP_NO_EXCEPTIONS
break;