This is an archive of the discontinued LLVM Phabricator instance.

Regex backreference [2/3] Validate the entire regex is consumed.
ClosedPublic

Authored by Mordante on May 25 2019, 11:55 AM.

Details

Summary

This change would have warned about the bug found in the previous patch.
No unit tests since the exception should never throw.

Diff Detail

Event Timeline

Mordante created this revision.May 25 2019, 11:55 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 25 2019, 11:55 AM
mclow.lists accepted this revision.Jun 26 2019, 7:54 AM

This looks good to me.

libcxx/include/regex
969

Sadly, I think that placing it before 'unknown' *is* an ABI break, because we throw these error codes, and if people were to catch them - and dispatch on them, their code would break.

This revision is now accepted and ready to land.Jun 26 2019, 7:54 AM
Mordante updated this revision to Diff 206898.Jun 27 2019, 11:42 AM

Removed the ABI question in the comment

Mordante marked an inline comment as done.Jun 27 2019, 11:45 AM

Thanks for the review!

I don't have commit access, could you commit this patch?

libcxx/include/regex
969

I feared it would. Updated the patch to remove this comment

This revision was automatically updated to reflect the committed changes.