diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2015-07-23 18:27:51 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2015-07-23 18:27:51 +0000 |
commit | 983d17810811cdac0ff475049451f48a6da5cb25 (patch) | |
tree | 76e5899d25d56ed236d56f7fdbec9e25ff69d335 /libcxx/test/std/re/re.regex/re.regex.construct/bad_escape.pass.cpp | |
parent | 3f07e7b06363bf88d70bd89b8d45eabf64caf2b3 (diff) | |
download | bcm5719-llvm-983d17810811cdac0ff475049451f48a6da5cb25.tar.gz bcm5719-llvm-983d17810811cdac0ff475049451f48a6da5cb25.zip |
Detect and throw on a class of bad regexes that we mistakenly accepted before. Thanks to Trevor Smigiel for the report
llvm-svn: 243030
Diffstat (limited to 'libcxx/test/std/re/re.regex/re.regex.construct/bad_escape.pass.cpp')
-rw-r--r-- | libcxx/test/std/re/re.regex/re.regex.construct/bad_escape.pass.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/test/std/re/re.regex/re.regex.construct/bad_escape.pass.cpp b/libcxx/test/std/re/re.regex/re.regex.construct/bad_escape.pass.cpp index 9455527412b..ddf2607f112 100644 --- a/libcxx/test/std/re/re.regex/re.regex.construct/bad_escape.pass.cpp +++ b/libcxx/test/std/re/re.regex/re.regex.construct/bad_escape.pass.cpp @@ -22,7 +22,7 @@ static bool error_escape_thrown(const char *pat) bool result = false; try { std::regex re(pat); - } catch (std::regex_error &ex) { + } catch (const std::regex_error &ex) { result = (ex.code() == std::regex_constants::error_escape); } return result; |