From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <3Fwd-XggKChg4DFC061y4CC492.0CA96zyz64y69GCIF02KyF2.CF4@flex--gprocida.bounces.google.com> Received: from mail-vs1-xe49.google.com (mail-vs1-xe49.google.com [IPv6:2607:f8b0:4864:20::e49]) by sourceware.org (Postfix) with ESMTPS id 660B7385E023 for ; Fri, 27 Mar 2020 14:00:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 660B7385E023 Received: by mail-vs1-xe49.google.com with SMTP id o4so2148707vsq.9 for ; Fri, 27 Mar 2020 07:00:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc:content-transfer-encoding; bh=4rX4mY1Q1FSpI0aCzmJB0EJbsy9R65ksCqjKeuCtKV4=; b=oYZ0V6i2AijxxZKlCWeSw6MI6Hf73djj/8DCjC775dNyRBkpmNdJdCZqIQBdAyKJZ0 q7+i4G55qgLG/NgEObJMhbgGMYBigmsKX8sw9UDxnPyVBicURirs/6VniKBz+Bu9YrgW AAUdh+YAQ15Jf3QE0GbgcXf2lf4tqCQAHe/iudfYQQT+z40lB5l9JSaekvZi3UqjBIFw ScHHbl27duVIsS4DPngKc6QLNqHSsZUA+x+14cRf5lhLzy+UL6oyNBG0CfOh09qt5boa I+M11DL+Z7Nd3hyPGJ+V72SvR/D/rBpYG+R73VMq6EpHBqmjLzaMaTEFCYN5UKPqL/Uo iYkw== X-Gm-Message-State: ANhLgQ0vDUjlPkqUF3AUgCU9L6QHTepl3akaIT2WfmyLRx51Ctclb5Yb qaL5qwEL+MvGrPbRBdOeFvCUxZuTe1jy/LxC3/IPH9zmKTBZ7TSm1BqDI4iIswxX6IbX5tSECBH NYXGRdLPDr3Ub4yGQJ1bu9cs3vmMRsXtTzduVgCt5EsYGXc2u83SClc4GsCh/d5Zl6j2ehJ0= X-Google-Smtp-Source: ADFU+vvqIGGK2Ea0WJGmyMB31MtKsl/3p/WgxqfX15DsSHS2UvjWlaGczD5WDafumaUYGcRsHF0kBBnuvrucFA== X-Received: by 2002:ab0:49e4:: with SMTP id f33mr10679955uad.86.1585317655738; Fri, 27 Mar 2020 07:00:55 -0700 (PDT) Date: Fri, 27 Mar 2020 14:00:12 +0000 In-Reply-To: <20200327140017.1917-1-gprocida@google.com> Message-Id: <20200327140017.1917-3-gprocida@google.com> Mime-Version: 1.0 References: <20200327140017.1917-1-gprocida@google.com> X-Mailer: git-send-email 2.25.1.696.g5e7596f4ac-goog Subject: [PATCH 2/7] abidiff: Remove blank line after base class diffs. From: Giuliano Procida To: libabigail@sourceware.org Cc: dodji@seketeli.org, kernel-team@android.com, gprocida@google.com, maennich@google.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-33.8 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libabigail mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2020 14:00:58 -0000 This patch removes the blank line emitted after base class diffs. These are jarring, particularly when the diffs are nested. * src/abg-default-reporter.cc (report): In the class_diff overload, eliminate the extra blank line after base class changes and remove unneeded new line logic. * tests/data/test*report*.txt: Remove blank lines after base class diffs in 9 files. Signed-off-by: Giuliano Procida --- src/abg-default-reporter.cc | 10 +--------- tests/data/test-abidiff/test-PR18791-report0.txt | 4 ---- tests/data/test-diff-dwarf/test0-report.txt | 1 - .../test-diff-dwarf/test27-local-base-diff-report.txt | 1 - tests/data/test-diff-dwarf/test8-report.txt | 1 - tests/data/test-diff-filter/test0-report.txt | 1 - tests/data/test-diff-filter/test01-report.txt | 1 - .../test29-finer-redundancy-marking-report-0.txt | 1 - ...libsigc++-2.0-0v5_2.4.1-1ubuntu2_amd64-report-0.txt | 3 --- ...x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-0.txt | 1 - 10 files changed, 1 insertion(+), 23 deletions(-) diff --git a/src/abg-default-reporter.cc b/src/abg-default-reporter.cc index e2f520fd..b67fe259 100644 --- a/src/abg-default-reporter.cc +++ b/src/abg-default-reporter.cc @@ -1338,7 +1338,6 @@ default_reporter::report(const class_diff& d, ostream= & out, } =20 // Report changes. - bool emitted =3D false; size_t num_filtered =3D d.get_priv()->count_filtered_bases(); if (numchanges) { @@ -1359,10 +1358,7 @@ default_reporter::report(const class_diff& d, ostrea= m& out, report_loc_info(o->get_base_class(), *d.context(), out); out << " changed:\n"; diff->report(out, indent + " "); - emitted =3D true; } - if (emitted) - out << "\n"; } =20 //Report insertions. @@ -1372,20 +1368,16 @@ default_reporter::report(const class_diff& d, ostre= am& out, report_mem_header(out, numins, 0, ins_kind, "base class", indent); =20 - bool emitted =3D false; for (class_decl::base_specs::const_iterator i =3D d.get_priv()->sorted_inserted_bases_.begin(); i !=3D d.get_priv()->sorted_inserted_bases_.end(); ++i) { class_decl_sptr b =3D (*i)->get_base_class(); - if (emitted) - out << "\n"; out << indent << " " << b->get_pretty_representation(); report_loc_info(b, *ctxt, out); - emitted =3D true; + out << "\n"; } - out << "\n"; } } =20 diff --git a/tests/data/test-abidiff/test-PR18791-report0.txt b/tests/data/= test-abidiff/test-PR18791-report0.txt index 3c26de12..87322587 100644 --- a/tests/data/test-abidiff/test-PR18791-report0.txt +++ b/tests/data/test-abidiff/test-PR18791-report0.txt @@ -53,10 +53,8 @@ Variables changes summary: 0 Removed, 0 Changed, 0 Added= variable 'unsigned long int std::_Lis= t_node::_M_data', at offset 128 (in bits) and name of 'std::_List_base >::_List_impl::_M_node' changed to 'std::__cxx11::_List_base >::_List_impl::_M_node' and name of 'std::_List_base >::_M_impl' changed to 'std::__cxx11::_List_base >::_M_imp= l' - 'bool sigc::internal::trackable_callback_list:= :clearing_' offset changed from 128 to 192 (in bits) (by +64 bits) =20 - [C] 'method sigc::connection& sigc::connection::operator=3D(const sigc::= connection&)' has some indirect sub-type changes: return type changed: in referenced type 'struct sigc::connection': @@ -131,7 +129,6 @@ Variables changes summary: 0 Removed, 0 Changed, 0 Adde= d variable and name of 'std::_List_base >::_List_impl::_M_node' changed to 'std::__cxx11:= :_List_base >::_List_impl:= :_M_node' and name of 'std::_List_base >::_M_impl' changed to 'std::__cxx11::_List_base >::_M_impl' =20 - [C] 'method sigc::signal_base::iterator_type sigc::signal_base::insert(s= igc::signal_base::iterator_type, const sigc::slot_base&)' has some indirect= sub-type changes: return type changed: underlying type 'typedef sigc::internal::signal_impl::iterator_type'= changed, as reported earlier @@ -148,7 +145,6 @@ Variables changes summary: 0 Removed, 0 Changed, 0 Adde= d variable 1 base class change: 'struct sigc::trackable' changed: details were reported earlier - 1 data member change: type of 'sigc::internal::signal_impl* sigc::signal_base::impl_' = changed: pointed to type 'struct sigc::internal::signal_impl' changed, = as reported earlier diff --git a/tests/data/test-diff-dwarf/test0-report.txt b/tests/data/test-= diff-dwarf/test0-report.txt index 05cc3bdf..d8a213a5 100644 --- a/tests/data/test-diff-dwarf/test0-report.txt +++ b/tests/data/test-diff-dwarf/test0-report.txt @@ -16,7 +16,6 @@ Variables changes summary: 0 Removed, 0 Changed, 0 Added = variable type size changed from 64 to 96 (in bits) 1 data member insertion: 'unsigned int B0S0::m2', at offset 64 (in bits) - 1 data member change: 'int S0::m0' offset changed from 64 to 96 (in bits) (by +32 bits= ), access changed from 'private' to 'protected' =20 diff --git a/tests/data/test-diff-dwarf/test27-local-base-diff-report.txt b= /tests/data/test-diff-dwarf/test27-local-base-diff-report.txt index 050afd22..a2db4e9e 100644 --- a/tests/data/test-diff-dwarf/test27-local-base-diff-report.txt +++ b/tests/data/test-diff-dwarf/test27-local-base-diff-report.txt @@ -17,7 +17,6 @@ Variables changes summary: 0 Removed, 0 Changed, 0 Added = variable 1 base class change: 'struct base' changed: details were reported earlier - 1 data member change: 'int S::m0' offset changed from 32 to 64 (in bits) (by +32 bits) =20 diff --git a/tests/data/test-diff-dwarf/test8-report.txt b/tests/data/test-= diff-dwarf/test8-report.txt index ee185dbf..59834a5a 100644 --- a/tests/data/test-diff-dwarf/test8-report.txt +++ b/tests/data/test-diff-dwarf/test8-report.txt @@ -16,7 +16,6 @@ Variables changes summary: 0 Removed, 0 Changed, 0 Added = variable type size hasn't changed 1 data member change: 'char B0::m0' access changed from 'public' to 'private' - 1 base class insertion: class B1 1 data member change: diff --git a/tests/data/test-diff-filter/test0-report.txt b/tests/data/test= -diff-filter/test0-report.txt index 1dc19ed9..afa87571 100644 --- a/tests/data/test-diff-filter/test0-report.txt +++ b/tests/data/test-diff-filter/test0-report.txt @@ -18,7 +18,6 @@ Variables changes summary: 0 Removed, 0 Changed, 0 Added = variable 'unsigned int B0S0::m2', at offset 32 (in bits) 1 data member change: 'char B0S0::m1' offset changed from 32 to 64 (in bits) (by += 32 bits) - 1 data member change: 'int S0::m0' offset changed from 64 to 96 (in bits) (by +32 bits= ) =20 diff --git a/tests/data/test-diff-filter/test01-report.txt b/tests/data/tes= t-diff-filter/test01-report.txt index 8c08ddb9..73b907e5 100644 --- a/tests/data/test-diff-filter/test01-report.txt +++ b/tests/data/test-diff-filter/test01-report.txt @@ -18,7 +18,6 @@ Variables changes summary: 0 Removed, 0 Changed, 0 Added = variable 'unsigned int B0S0::m2', at offset 32 (in bits) 1 data member change: 'char B0S0::m1' offset changed from 32 to 64 (in bits) (by += 32 bits) - 1 data member change: 'int S0::m0' offset changed from 64 to 96 (in bits) (by +32 bits= ), access changed from 'private' to 'protected' =20 diff --git a/tests/data/test-diff-filter/test29-finer-redundancy-marking-re= port-0.txt b/tests/data/test-diff-filter/test29-finer-redundancy-marking-re= port-0.txt index 2cb2c362..dd8b6b01 100644 --- a/tests/data/test-diff-filter/test29-finer-redundancy-marking-report-0.= txt +++ b/tests/data/test-diff-filter/test29-finer-redundancy-marking-report-0.= txt @@ -21,7 +21,6 @@ Variables changes summary: 0 Removed, 0 Changed, 0 Added = variable 1 base class change: 'struct base' changed: details were reported earlier - 1 data member change: 'int inherited::m0' offset changed from 32 to 64 (in bits) (by += 32 bits) =20 diff --git a/tests/data/test-diff-pkg/libsigc++-2.0-0c2a_2.4.0-1_amd64--lib= sigc++-2.0-0v5_2.4.1-1ubuntu2_amd64-report-0.txt b/tests/data/test-diff-pkg= /libsigc++-2.0-0c2a_2.4.0-1_amd64--libsigc++-2.0-0v5_2.4.1-1ubuntu2_amd64-r= eport-0.txt index 9f22d5f5..b1611303 100644 --- a/tests/data/test-diff-pkg/libsigc++-2.0-0c2a_2.4.0-1_amd64--libsigc++-= 2.0-0v5_2.4.1-1ubuntu2_amd64-report-0.txt +++ b/tests/data/test-diff-pkg/libsigc++-2.0-0c2a_2.4.0-1_amd64--libsigc++-= 2.0-0v5_2.4.1-1ubuntu2_amd64-report-0.txt @@ -59,10 +59,8 @@ 'unsigned long int= std::_List_node::_M_data', at offset 128 (in bits) and name of 'std::_Lis= t_base >::_List_impl::_M_node' changed to 'std::__cxx11::_List_= base >::_List_impl::_M_node' and name of 'std::_List_ba= se >::_M_impl' changed to 'std::__cxx11::_List_base= >::_M_impl' - 'bool sigc::internal::trackable_call= back_list::clearing_' offset changed from 128 to 192 (in bits) (by +64 bits= ) =20 - [C] 'method sigc::internal::signal_impl* sigc::signal_base::impl() con= st' has some indirect sub-type changes: return type changed: in pointed to type 'struct sigc::internal::signal_impl': @@ -83,6 +81,5 @@ name of 'std::_List_base >::_List_impl::_M_node' changed to 'std::__cxx11::_= List_base >::_List_impl::_= M_node' and name of 'std::_List_base >::_M_impl' changed to 'std::__cxx11::_List_base >::_M_impl' =20 - =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D end of changes of 'libsig= c-2.0.so.0.0.0'=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 diff --git a/tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4= .3-3.20141204.fc23.x86_64-report-0.txt b/tests/data/test-diff-pkg/tbb-4.1-9= .20130314.fc22.x86_64--tbb-4.3-3.20141204.fc23.x86_64-report-0.txt index 5aa8483d..ced0499d 100644 --- a/tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20= 141204.fc23.x86_64-report-0.txt +++ b/tests/data/test-diff-pkg/tbb-4.1-9.20130314.fc22.x86_64--tbb-4.3-3.20= 141204.fc23.x86_64-report-0.txt @@ -118,7 +118,6 @@ struct tbb::internal::padded at tbb_stddef.h:251:1 1 data member deletion: 'char tbb::internal::mail_outbox::pad[104]= ', at offset 136 (in bits) at mailbox.h:114:1 - 1 member function deletion: 'method virtual tbb::task* tbb::internal::generic_schedu= ler::receive_or_steal_task(tbb::internal::reference_count&, bool)' at sched= uler.h:391:1, virtual at voffset 7/7 =20 --=20 2.25.1.696.g5e7596f4ac-goog