From patchwork Mon May 4 12:34:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giuliano Procida X-Patchwork-Id: 39197 From: gprocida@google.com (Giuliano Procida) Date: Mon, 4 May 2020 13:34:03 +0100 Subject: [PATCH v4 02/15] Document ^_^ regex in generate_from_strings. In-Reply-To: <20200504123416.243214-1-gprocida@google.com> References: <20200424092132.150547-1-gprocida@google.com> <20200504123416.243214-1-gprocida@google.com> Message-ID: <20200504123416.243214-3-gprocida@google.com> 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 Reviewed-by: Matthias Maennich --- 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& strs) { if (strs.empty()) + // This cute-looking regex does not match any string. return "^_^"; std::ostringstream os; std::vector::const_iterator i = strs.begin();