[PATCH] D68054: Regex: Add static convenience functions for "match" and "sub"
Nicolas Guillemot via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 6 09:27:10 PST 2020
nlguillemot added a comment.
In D68054#1801066 <https://reviews.llvm.org/D68054#1801066>, @thopre wrote:
> How about the following commit message:
>
> (...)
I would suggest an amendment to this part:
> To force developers to be mindful of this aspect, an assert is added to match() to check
> that the regex is valid and an new idiom is created as follows for
> cases where the pattern is known to be valid:
As-is, this patch doesn't assert inside `match()`, since this makes the API more backwards compatible. The wording of the commit message should be updated to match this.
It was originally a bit tricky to track down and update all users of the API, but the monorepo makes that a lot easier. If we brought back the older version of the commit that *did* `assert` inside `match()`, and we updated all affected users of the API (eg: clang) before committing, I wouldn't be opposed.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68054/new/
https://reviews.llvm.org/D68054
More information about the llvm-commits
mailing list