[PATCH] D42693: [libcxx] Handle invalid escaped characters in POSIX regex

Mikhail Maltsev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 31 07:18:17 PST 2018


miyuki added inline comments.


================
Comment at: include/regex:3465
+            case '{':
+            case '}':
+                break;
----------------
Quuxplusone wrote:
> FWIW, I don't understand what's going on in this switch.
> Is it intentional that `'('` and `'|'` now take different paths here?
Yes. As far as I understand, only extended POSIX regular expressions support alternation: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html, so "\\|" should be treated as error_escape



https://reviews.llvm.org/D42693





More information about the cfe-commits mailing list