[v4,02/15] Document ^_^ regex in generate_from_strings.
Commit Message
Following review of the change to simplify generation of symbol
whitelist regexes, this commit clarifies the purpose of the ^_^ regex
as one which will not match any string.
* src/abg-regex.cc (generate_from_strings): Document ^_^
regex.
Signed-off-by: Giuliano Procida <gprocida@google.com>
---
src/abg-regex.cc | 1 +
1 file changed, 1 insertion(+)
Comments
On Mon, May 04, 2020 at 01:34:03PM +0100, Giuliano Procida wrote:
>Following review of the change to simplify generation of symbol
>whitelist regexes, this commit clarifies the purpose of the ^_^ regex
>as one which will not match any string.
>
> * src/abg-regex.cc (generate_from_strings): Document ^_^
> regex.
>
>Signed-off-by: Giuliano Procida <gprocida@google.com>
Reviewed-by: Matthias Maennich <maennich@google.com>
Cheers,
Matthias
>---
> src/abg-regex.cc | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/src/abg-regex.cc b/src/abg-regex.cc
>index cf0663a2..0451d111 100644
>--- a/src/abg-regex.cc
>+++ b/src/abg-regex.cc
>@@ -69,6 +69,7 @@ std::string
> generate_from_strings(const std::vector<std::string>& strs)
> {
> if (strs.empty())
>+ // This cute-looking regex does not match any string.
> return "^_^";
> std::ostringstream os;
> std::vector<std::string>::const_iterator i = strs.begin();
>--
>2.26.2.526.g744177e7f7-goog
>
Giuliano Procida <gprocida@google.com> a ?crit:
[...]
> generate_from_strings(const std::vector<std::string>& strs)
> {
> if (strs.empty())
> + // This cute-looking regex does not match any string.
> return "^_^";
Cute-looking, indeed :-)
> Following review of the change to simplify generation of symbol
> whitelist regexes, this commit clarifies the purpose of the ^_^ regex
> as one which will not match any string.
>
> * src/abg-regex.cc (generate_from_strings): Document ^_^
> regex.
Applied to master, thanks!
Cheers,
@@ -69,6 +69,7 @@ std::string
generate_from_strings(const std::vector<std::string>& strs)
{
if (strs.empty())
+ // This cute-looking regex does not match any string.
return "^_^";
std::ostringstream os;
std::vector<std::string>::const_iterator i = strs.begin();