Quuxplusone added inline comments.

================
Comment at: include/regex:3465
+            case '{':
+            case '}':
+                break;
----------------
FWIW, I don't understand what's going on in this switch.
Is it intentional that `'('` and `'|'` now take different paths here?


================
Comment at: test/std/re/re.regex/re.regex.construct/bad_escape.pass.cpp:60
+    assert(!error_escape_thrown("\\.", basic));
+    assert(!error_escape_thrown("\\*", basic));
 }
----------------
I would think about adding test cases here to document the intended behavior of
- "\\n" and "\\t" which are valid of course;
- "\\\n" which could be a common typo and should probably throw;
- "\\/" which is common in Perl but maybe should throw anyway;
- "\\1" in a regex mode that doesn't support backreferences;
- "\\0".
If these are already covered elsewhere in the suite, then never mind me.


https://reviews.llvm.org/D42693



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to