public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Skip preprocessor directives in mklog
@ 2015-04-21 11:26 Yury Gribov
  2015-04-21 12:32 ` Tom de Vries
  2015-04-30  9:23 ` [PATCH][PING] " Yury Gribov
  0 siblings, 2 replies; 12+ messages in thread
From: Yury Gribov @ 2015-04-21 11:26 UTC (permalink / raw)
  To: GCC Patches; +Cc: Trevor Saunders, Diego Novillo, Tom de Vries

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

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?

-Y

[-- 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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-05-12 20:26 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-21 11:26 [PATCH] Skip preprocessor directives in mklog Yury Gribov
2015-04-21 12:32 ` Tom de Vries
2015-04-30  9:23 ` [PATCH][PING] " Yury Gribov
2015-05-12 15:23   ` [PATCH][PING^2] " Yury Gribov
2015-05-12 15:23     ` 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

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).