summaryrefslogtreecommitdiffstats
path: root/libcxx/include/regex
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/include/regex')
-rw-r--r--libcxx/include/regex8
1 files changed, 8 insertions, 0 deletions
diff --git a/libcxx/include/regex b/libcxx/include/regex
index 6ac5e1da8c2..698278c6014 100644
--- a/libcxx/include/regex
+++ b/libcxx/include/regex
@@ -4305,6 +4305,14 @@ basic_regex<_CharT, _Traits>::__parse_atom(_ForwardIterator __first,
}
}
break;
+ case '*':
+ case '+':
+ case '?':
+ case '{':
+#ifndef _LIBCPP_NO_EXCEPTIONS
+ throw regex_error(regex_constants::error_badrepeat);
+#endif
+ break;
default:
__first = __parse_pattern_character(__first, __last);
break;
OpenPOWER on IntegriCloud