From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1534) id E54D83870907; Wed, 4 Nov 2020 09:36:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E54D83870907 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Tobias Burnus To: gcc-cvs@gcc.gnu.org Subject: [gcc r11-4712] gcc-changelog/git_commit.py: Check for missing description X-Act-Checkin: gcc X-Git-Author: Tobias Burnus X-Git-Refname: refs/heads/master X-Git-Oldrev: c4f6330722a26b91d07c9497ebd81efd64acbdea X-Git-Newrev: 619039de36a78164c67a2c62a425a444340d4a06 Message-Id: <20201104093608.E54D83870907@sourceware.org> Date: Wed, 4 Nov 2020 09:36:08 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Nov 2020 09:36:09 -0000 https://gcc.gnu.org/g:619039de36a78164c67a2c62a425a444340d4a06 commit r11-4712-g619039de36a78164c67a2c62a425a444340d4a06 Author: Tobias Burnus Date: Wed Nov 4 10:35:54 2020 +0100 gcc-changelog/git_commit.py: Check for missing description Especially when using mklog.py, it is simply to forget to fill in the entries after the '\t* file.c (section):' or '\t(section):'. contrib/ChangeLog: * gcc-changelog/git_commit.py (item_parenthesis_empty_regex, item_parenthesis_regex): Add. (check_for_empty_description): Use them. * gcc-changelog/test_email.py (test_emptry_entry_desc, test_emptry_entry_desc_2): Add. * gcc-changelog/test_patches.txt: Add two testcases for it. Diff: --- contrib/gcc-changelog/git_commit.py | 7 +++-- contrib/gcc-changelog/test_email.py | 10 +++++++ contrib/gcc-changelog/test_patches.txt | 55 ++++++++++++++++++++++++++++++++++ 3 files changed, 70 insertions(+), 2 deletions(-) diff --git a/contrib/gcc-changelog/git_commit.py b/contrib/gcc-changelog/git_commit.py index 1d0860cddd8..0008865338b 100755 --- a/contrib/gcc-changelog/git_commit.py +++ b/contrib/gcc-changelog/git_commit.py @@ -155,6 +155,8 @@ pr_regex = re.compile(r'\tPR (?P[a-z+-]+\/)?([0-9]+)$') dr_regex = re.compile(r'\tDR ([0-9]+)$') star_prefix_regex = re.compile(r'\t\*(?P\ *)(?P.*)') end_of_location_regex = re.compile(r'[\[<(:]') +item_empty_regex = re.compile(r'\t(\* \S+ )?\(\S+\):\s*$') +item_parenthesis_regex = re.compile(r'\t(\*|\(\S+\):)') LINE_LIMIT = 100 TAB_WIDTH = 8 @@ -490,9 +492,10 @@ class GitCommit: def check_for_empty_description(self): for entry in self.changelog_entries: for i, line in enumerate(entry.lines): - if (star_prefix_regex.match(line) and line.endswith(':') and + if (item_empty_regex.match(line) and (i == len(entry.lines) - 1 - or star_prefix_regex.match(entry.lines[i + 1]))): + or not entry.lines[i+1].strip() + or item_parenthesis_regex.match(entry.lines[i+1]))): msg = 'missing description of a change' self.errors.append(Error(msg, line)) diff --git a/contrib/gcc-changelog/test_email.py b/contrib/gcc-changelog/test_email.py index 98f2ecd258d..df350a41228 100755 --- a/contrib/gcc-changelog/test_email.py +++ b/contrib/gcc-changelog/test_email.py @@ -370,3 +370,13 @@ class TestGccChangelog(unittest.TestCase): email = self.from_patch_glob('0001-tree-optimization-97633-fix') assert len(email.errors) == 1 assert email.errors[0].message == 'empty group "()" found' + + def test_emptry_entry_desc(self): + email = self.from_patch_glob('0001-c-Set-CALL_FROM_NEW_OR') + assert len(email.errors) == 1 + assert email.errors[0].message == 'missing description of a change' + + def test_emptry_entry_desc_2(self): + email = self.from_patch_glob('0001-lto-fix-LTO-debug') + assert not email.errors + assert len(email.changelog_entries) == 1 diff --git a/contrib/gcc-changelog/test_patches.txt b/contrib/gcc-changelog/test_patches.txt index 148d020f23b..bc9cc2e078e 100644 --- a/contrib/gcc-changelog/test_patches.txt +++ b/contrib/gcc-changelog/test_patches.txt @@ -3235,4 +3235,59 @@ index 5d69a98c2a9..714e50697bd 100644 -- 2.7.4 +=== 0001-c-Set-CALL_FROM_NEW_OR_DELETE_P-on-more-calls.patch === +From 4f4ced28826ece7b7b76649522ee2a9601a63b90 Mon Sep 17 00:00:00 2001 +From: Jason Merrill +Date: Fri, 2 Oct 2020 09:00:49 +0200 +Subject: [PATCH] c++: Set CALL_FROM_NEW_OR_DELETE_P on more calls. + +We were failing to set the flag on a delete call in a new expression, in a +deleting destructor, and in a coroutine. Fixed by setting it in the +function that builds the call. + +2020-10-02 Jason Merril + +gcc/cp/ChangeLog: + * init.c (build_new_1, build_vec_delete_1, build_delete): Not here. + (build_delete): + +--- + gcc/cp/init.c | 1 - + 1 files changed, 0 insertions(+), 1 deletions(-) + +diff --git a/gcc/cp/init.c b/gcc/cp/init.c +index e84e985492d..00fff3f7327 100644 +--- a/gcc/cp/init.c ++++ b/gcc/cp/init.c +@@ -3436,1 +3435,0 @@ build_new_1 (vec **placement, tree type, tree nelts, +- +-- +2.25.1 + +=== 0001-lto-fix-LTO-debug-sections-copying.patch === +From 190c04ba36d9c6c3dce41f12012aa97c6d7f22f5 Mon Sep 17 00:00:00 2001 +From: Martin Liska +Date: Mon, 5 Oct 2020 18:03:08 +0200 +Subject: [PATCH] lto: fix LTO debug sections copying. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +libiberty/ChangeLog: + + PR lto/97290 + * simple-object-elf.c (simple_object_elf_copy_lto_debug_sections): + Use sh_link of a .symtab_shndx section. +--- + libiberty/simple-object-elf.c | 1 - + 1 file changed, 0 insertions(+), 1 deletions(-) + +diff --git a/libiberty/simple-object-elf.c b/libiberty/simple-object-elf.c +index 7c9d492f6a4..37e73348cb7 100644 +--- a/libiberty/simple-object-elf.c ++++ b/libiberty/simple-object-elf.c +@@ -1191,1 +1191,0 @@ simple_object_elf_copy_lto_debug_sections (simple_object_read *sobj, +- +-- +2.25.1