]> gcc.gnu.org Git - gcc.git/commitdiff
mklog: Ignore preprocessor directives.
authorYury Gribov <y.gribov@samsung.com>
Tue, 12 May 2015 15:31:02 +0000 (15:31 +0000)
committerYury Gribov <ygribov@gcc.gnu.org>
Tue, 12 May 2015 15:31:02 +0000 (15:31 +0000)
2015-05-12  Yury Gribov  <y.gribov@samsung.com>

* mklog: Ignore preprocessor directives.

From-SVN: r223081

contrib/ChangeLog
contrib/mklog

index 0e99a29a10bdab02f80c21cdc38a4069fb87f607..8035bc395a2109f6240722d1ddefba84cafa4e6e 100644 (file)
@@ -1,3 +1,7 @@
+2015-05-12  Yury Gribov  <y.gribov@samsung.com>
+
+       * mklog: Ignore preprocessor directives.
+
 2015-04-22  Jakub Jelinek  <jakub@redhat.com>
 
        * gennews (files): Add files for GCC 5.
index f7974a7bd156a870b9f0be94f07ebd4853c11352..455614bfb422523010cc7e576da1af235e0310a4 100755 (executable)
@@ -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
This page took 0.06677 seconds and 5 git commands to generate.