From patchwork Mon May 4 12:34:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giuliano Procida X-Patchwork-Id: 39199 From: gprocida@google.com (Giuliano Procida) Date: Mon, 4 May 2020 13:34:01 +0100 Subject: [PATCH v4 00/15] Simplify regex and suppression parsing. In-Reply-To: <20200424092132.150547-1-gprocida@google.com> References: <20200424092132.150547-1-gprocida@google.com> Message-ID: <20200504123416.243214-1-gprocida@google.com> Patches 01/15 and 02/15 reflect review comments from patches 01/21 and 03/21 of the original series, respectively. Patches 03/15 to 15/15 correspond to 04/21 to 16/21 of the original series. Patches 17/21 to 21/21 of the original series have been dropped as the refactoring wasn't ideal. They have been reworked and will be reposted as part of a new series. Regards, Giuliano. Giuliano Procida (15): Tidy #includes in a few files. Document ^_^ regex in generate_from_strings. Escape names used in symbol whitelisting regex. abg-suppression.cc: More uniform variable naming. diff suppression: Fix handling of change kinds. Add POSIX regex wrapper functions. Use regex::compile wrapper instead of regcomp. Use regex::match wrapper instead of regexec. Refactor read_parameter_spec_from_string logic. Compile suppression regexes earlier. Reduce direct access to suppression priv_ members. Move match methods from priv to suppression_base. Remove suppression type priv class methods. abg-suppression.cc: More consistent regex matching. abg-tools-utils.cc: Assert generated regexes OK. include/abg-regex.h | 16 + include/abg-suppression.h | 180 +-- src/abg-corpus-priv.h | 28 +- src/abg-corpus.cc | 12 +- src/abg-dwarf-reader.cc | 4 +- src/abg-reader.cc | 4 +- src/abg-regex.cc | 72 +- src/abg-suppression-priv.h | 684 +--------- src/abg-suppression.cc | 1187 ++++++++--------- src/abg-tools-utils.cc | 19 +- .../test15-suppr-added-fn-report-5.txt | 6 +- .../test16-suppr-removed-fn-report-5.txt | 15 +- .../test17-suppr-added-var-report-5.txt | 15 +- .../test18-suppr-removed-var-report-5.txt | 15 +- tests/test-kmi-whitelist.cc | 60 +- 15 files changed, 897 insertions(+), 1420 deletions(-)