[libcxx-commits] [PATCH] D66610: [libc++] ECMAScript IdentityEscape is ambiguous (2584)
Zoe Carver via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu May 7 14:41:35 PDT 2020
zoecarver marked an inline comment as done.
zoecarver added inline comments.
================
Comment at: libcxx/test/std/re/re.alg/re.alg.match/ecma.pass.cpp:1401
+
+ // const std::regex r3("\\zz");
+ // assert(std::regex_match("zzz", r3));
----------------
ldionne wrote:
> zoecarver wrote:
> > ldionne wrote:
> > > Why are those tests commented out?
> > I wasn't sure if they should also work (they currently don't because, while the first part is matched, it fails when it sees the extra `z`). Looking at it again I think that's the correct behavior (not to match).
> >
> > I'm going to remove it from this patch. If it is supposed to work, I think that's a different issue than the one addressed here.
> I think `regex("\\z")` clearly should NOT match `"zz"`. Basically, `regex("\\z")` is just equivalent to `regex("z")`, so whether `regex("\\z")` should match `"zz"` is the same as whether `regex("z")` should match `"zz"` (the answer is no).
Good explanation. That makes sense. Looking at it again, I'm not sure why I ever thought that should work...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66610/new/
https://reviews.llvm.org/D66610
More information about the libcxx-commits
mailing list