public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Yury Gribov <y.gribov@samsung.com>
To: GCC Patches <gcc-patches@gcc.gnu.org>
Cc: Trevor Saunders <tbsaunde@mozilla.com>,
	Diego Novillo <dnovillo@google.com>,
	Tom de Vries <Tom_deVries@mentor.com>, Jeff Law <law@redhat.com>
Subject: [PATCH][PING^2] Skip preprocessor directives in mklog
Date: Tue, 12 May 2015 15:23:00 -0000	[thread overview]
Message-ID: <555219FC.8090703@samsung.com> (raw)
In-Reply-To: <5541EFCE.3070004@samsung.com>

[-- Attachment #1: Type: text/plain, Size: 354 bytes --]

On 04/30/2015 12:03 PM, Yury Gribov wrote:
> On 04/21/2015 02:26 PM, Yury Gribov wrote:
>> Hi all,
>>
>> Contrib/mklog is currently faked by preprocessor directives inside
>> functions to produce invalid ChangeLog.  The attached patch fixes this.
>>
>> Tested with my local mklog testsuite and http://paste.debian.net/167999/
>> .  Ok to commit?

Ping.


[-- Attachment #2: mklog-1.diff --]
[-- Type: text/x-patch, Size: 817 bytes --]

commit 23a738d05393676e72db82cb527d5fb1b3060e2f
Author: Yury Gribov <y.gribov@samsung.com>
Date:   Tue Apr 21 14:17:23 2015 +0300

    2015-04-21  Yury Gribov  <y.gribov@samsung.com>
    
    	* mklog: Ignore preprocessor directives.

diff --git a/contrib/mklog b/contrib/mklog
index f7974a7..455614b 100755
--- a/contrib/mklog
+++ b/contrib/mklog
@@ -131,7 +131,6 @@ sub is_unified_hunk_start {
 }
 
 # Check if line is a top-level declaration.
-# TODO: ignore preprocessor directives except maybe #define ?
 sub is_top_level {
 	my ($function, $is_context_diff) = (@_);
 	if (is_unified_hunk_start ($function)
@@ -143,7 +142,7 @@ sub is_top_level {
 	} else {
 		$function =~ s/^.//;
 	}
-	return $function && $function !~ /^[\s{]/;
+	return $function && $function !~ /^[\s{#]/;
 }
 
 # Read contents of .diff file

  reply	other threads:[~2015-05-12 15:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-21 11:26 [PATCH] " Yury Gribov
2015-04-21 12:32 ` Tom de Vries
2015-04-30  9:23 ` [PATCH][PING] " Yury Gribov
2015-05-12 15:23   ` Yury Gribov [this message]
2015-05-12 15:23     ` [PATCH][PING^2] " Diego Novillo
2015-05-12 15:33       ` Yury Gribov
2015-05-12 15:58         ` Tom de Vries
2015-05-12 16:13           ` Diego Novillo
2015-05-12 16:01         ` Trevor Saunders
2015-05-12 16:24           ` Yury Gribov
2015-05-12 19:59             ` Jeff Law
2015-05-12 20:29     ` Jeff Law

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=555219FC.8090703@samsung.com \
    --to=y.gribov@samsung.com \
    --cc=Tom_deVries@mentor.com \
    --cc=dnovillo@google.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=law@redhat.com \
    --cc=tbsaunde@mozilla.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).