From: Siddhesh Poyarekar Date: Thu, 16 Jan 2020 16:11:34 +0000 (+0530) Subject: vcs-to-changelog: Fix parsing of fndecl without args. X-Git-Tag: v1.0~4343 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=020f5190955808cafb670d2be6afb7d5faf69621;p=gnulib.git vcs-to-changelog: Fix parsing of fndecl without args. * build-aux/vcstocl/frontend_c.py (FNDECL_RE): Fix regular expression for empty arguments. --- diff --git a/ChangeLog b/ChangeLog index 560765244e..643dba312c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2020-01-16 Siddhesh Poyarekar + + vcs-to-changelog: Fix parsing of fndecl without args. + * build-aux/vcstocl/frontend_c.py (FNDECL_RE): Fix regular expression + for empty arguments. + 2020-01-16 Siddhesh Poyarekar vcs-to-changelog: Add documentation. diff --git a/build-aux/vcstocl/frontend_c.py b/build-aux/vcstocl/frontend_c.py index 81f37ffa4d..e898926863 100644 --- a/build-aux/vcstocl/frontend_c.py +++ b/build-aux/vcstocl/frontend_c.py @@ -266,7 +266,7 @@ class DeclParser(ExprParser): ExprParser.ATTRIBUTE + ';') # Function Declarations. - FNDECL_RE = re.compile(r'\s*(\w+)\s*\([^\(][^;]*\)\s*' + + FNDECL_RE = re.compile(r'\s*(\w+)\s*\(([^\(][^;]*)?\)\s*' + ExprParser.ATTRIBUTE + ';') def __init__(self, regex, blocktype, project_quirks, debug):