[libcxx-commits] [PATCH] D66610: [libc++] ECMAScript IdentityEscape is ambiguous (2584)
Zoe Carver via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Mar 14 13:25:15 PDT 2020
zoecarver updated this revision to Diff 250380.
zoecarver marked an inline comment as done.
zoecarver added a comment.
Herald added a reviewer: libc++.
- rebase off master
- address review comments
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66610/new/
https://reviews.llvm.org/D66610
Files:
libcxx/include/regex
libcxx/test/std/re/re.alg/re.alg.match/ecma.pass.cpp
libcxx/www/cxx1z_status.html
Index: libcxx/www/cxx1z_status.html
===================================================================
--- libcxx/www/cxx1z_status.html
+++ libcxx/www/cxx1z_status.html
@@ -392,7 +392,7 @@
<tr><td><a href="https://wg21.link/LWG2569">2569</a></td><td>conjunction and disjunction requirements are too strict</td><td>Issaquah</td><td>Complete</td></tr>
<tr><td><a href="https://wg21.link/LWG2570">2570</a></td><td>[fund.ts.v2] conjunction and disjunction requirements are too strict</td><td>Issaquah</td><td></td></tr>
<tr><td><a href="https://wg21.link/LWG2578">2578</a></td><td>Iterator requirements should reference iterator traits</td><td>Issaquah</td><td>Complete</td></tr>
- <tr><td><a href="https://wg21.link/LWG2584">2584</a></td><td><regex> ECMAScript IdentityEscape is ambiguous</td><td>Issaquah</td><td></td></tr>
+ <tr><td><a href="https://wg21.link/LWG2584">2584</a></td><td><regex> ECMAScript IdentityEscape is ambiguous</td><td>Issaquah</td><td>Complete</td></tr>
<tr><td><a href="https://wg21.link/LWG2587">2587</a></td><td>"Convertible to bool" requirement in conjunction and disjunction</td><td>Issaquah</td><td>Resolved by 2567</td></tr>
<tr><td><a href="https://wg21.link/LWG2588">2588</a></td><td>[fund.ts.v2] "Convertible to bool" requirement in conjunction and disjunction</td><td>Issaquah</td><td></td></tr>
<tr><td><a href="https://wg21.link/LWG2589">2589</a></td><td>match_results can't satisfy the requirements of a container</td><td>Issaquah</td><td>Complete</td></tr>
Index: libcxx/test/std/re/re.alg/re.alg.match/ecma.pass.cpp
===================================================================
--- libcxx/test/std/re/re.alg/re.alg.match/ecma.pass.cpp
+++ libcxx/test/std/re/re.alg/re.alg.match/ecma.pass.cpp
@@ -1391,6 +1391,17 @@
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
+ {
+ // LWG#2584: identity escapes. Match exact chars/strings.
+ const std::regex r1("\\z");
+ assert(std::regex_match("z", r1));
+
+ const std::regex r2("\\zz");
+ assert(std::regex_match("zz", r2));
+
+ const std::regex r3("\\zx");
+ assert(std::regex_match("zx", r3));
+ }
return 0;
}
Index: libcxx/include/regex
===================================================================
--- libcxx/include/regex
+++ libcxx/include/regex
@@ -4425,6 +4425,9 @@
__ml->__add_char('_');
++__first;
break;
+ default:
+ __ml = __start_matching_list(true);
+ ++__first;
}
}
return __first;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66610.250380.patch
Type: text/x-patch
Size: 2576 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20200314/1d059ff4/attachment.bin>
More information about the libcxx-commits
mailing list