[libcxx] r260982 - Merging r258107:
Hans Wennborg via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 16 09:16:16 PST 2016
Author: hans
Date: Tue Feb 16 11:16:15 2016
New Revision: 260982
URL: http://llvm.org/viewvc/llvm-project?rev=260982&view=rev
Log:
Merging r258107:
------------------------------------------------------------------------
r258107 | marshall | 2016-01-18 16:50:37 -0800 (Mon, 18 Jan 2016) | 1 line
Fix PR#26175. Thanks to Josh Petrie for the report and the patch. Reviewed as http://reviews.llvm.org/D16262
------------------------------------------------------------------------
Modified:
libcxx/branches/release_38/ (props changed)
libcxx/branches/release_38/include/regex
libcxx/branches/release_38/test/std/re/re.regex/re.regex.construct/bad_escape.pass.cpp
Propchange: libcxx/branches/release_38/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 16 11:16:15 2016
@@ -1,2 +1,2 @@
/libcxx/branches/apple:136569-137939
-/libcxx/trunk:257682,257696,257702,258403
+/libcxx/trunk:257682,257696,257702,258107,258403
Modified: libcxx/branches/release_38/include/regex
URL: http://llvm.org/viewvc/llvm-project/libcxx/branches/release_38/include/regex?rev=260982&r1=260981&r2=260982&view=diff
==============================================================================
--- libcxx/branches/release_38/include/regex (original)
+++ libcxx/branches/release_38/include/regex Tue Feb 16 11:16:15 2016
@@ -4265,6 +4265,9 @@ basic_regex<_CharT, _Traits>::__parse_at
if (__first != __last && *__first == '\\')
{
_ForwardIterator __t1 = _VSTD::next(__first);
+ if (__t1 == __last)
+ __throw_regex_error<regex_constants::error_escape>();
+
_ForwardIterator __t2 = __parse_decimal_escape(__t1, __last);
if (__t2 != __t1)
__first = __t2;
Modified: libcxx/branches/release_38/test/std/re/re.regex/re.regex.construct/bad_escape.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/branches/release_38/test/std/re/re.regex/re.regex.construct/bad_escape.pass.cpp?rev=260982&r1=260981&r2=260982&view=diff
==============================================================================
--- libcxx/branches/release_38/test/std/re/re.regex/re.regex.construct/bad_escape.pass.cpp (original)
+++ libcxx/branches/release_38/test/std/re/re.regex/re.regex.construct/bad_escape.pass.cpp Tue Feb 16 11:16:15 2016
@@ -33,6 +33,7 @@ int main()
{
assert(error_escape_thrown("[\\a]"));
assert(error_escape_thrown("\\a"));
+ assert(error_escape_thrown("\\"));
assert(error_escape_thrown("[\\e]"));
assert(error_escape_thrown("\\e"));
More information about the cfe-commits
mailing list