From patchwork Fri Oct 20 09:57:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dodji Seketeli X-Patchwork-Id: 78212 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DEC633858C50 for ; Fri, 20 Oct 2023 09:57:28 +0000 (GMT) X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 835D63858D20 for ; Fri, 20 Oct 2023 09:57:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 835D63858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 835D63858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697795845; cv=none; b=INrm3LK5a0zEQcckGpH6Eyx7uX+9wAqKt57gCrHdAZZxr7zymrhfHcH5YH+9lUNtv5dbcb6SZ0V09c3x9QOn+Ar839D6xb7mQsMCdRY2pnVyPUbff9tCEE4oDBAGO6hqeylEwMng0IcE+97W54BFWsjithT+7qNsd2cK2ODZgNM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697795845; c=relaxed/simple; bh=f/jRKtVN2i1TkRI4rQHMd7rkdoh1xKZsoWfZ4ltDWoo=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=AaghGKR23nYaNmwOAwC5JkDWts3iEQNnTCcHL6TdxC2vksQoVckGEVx9+r1tfXxDCTKu8CnLeSP9owUCCy/bOPelCblj4VqY8QqxGorlhdo9euLDieSaa5fTgy9pwfmf2WNAHAiBv5WfQOe/+86ORCCV7RSQV6YmC6nh6haM7xY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697795841; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=mKLruix1ZAnoRXv7F/gQZkmQMpOAloHtJ1IVCkgk2hc=; b=OQv3L3RMxyId0CUn6D45k5mji1unuyjXzdvkEQDBQk+HMnQ5wvhfnCW6DyS9vKgnWuvqLd M2SEectkAGs/TVs+kLbEnwat42jdJNdCJ/758yGNqSUL9Zm328+I7KSTA2yyJbtsAMQxPK uRPnrbAEwJdeUDuTtbNPL4LHvwfD9TE= Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-665-P8iah98SNYqBmQ2kQKiqoQ-1; Fri, 20 Oct 2023 05:57:19 -0400 X-MC-Unique: P8iah98SNYqBmQ2kQKiqoQ-1 Received: by mail-qv1-f69.google.com with SMTP id 6a1803df08f44-65afd7515aaso8549636d6.0 for ; Fri, 20 Oct 2023 02:57:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697795839; x=1698400639; h=mime-version:user-agent:message-id:in-reply-to:date:references :organization:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mKLruix1ZAnoRXv7F/gQZkmQMpOAloHtJ1IVCkgk2hc=; b=FO1zsMlCYQbo33b6zt/j6j52gCqxUFYaDOnuo30OnZWWP/wvFBVJXCoLxQ7mF1Fh37 vkwEuJGIO9+ktXpsZ3PeoCpVwaTuSL5g7VtERnddQR+hnd4zd1Oe5yW2mpg5D0lMYwqU esx9XsEPoMbIpZr2cLs3dnth015UPlBbusKBPRXqhY1h1Wna3WJ3Ec5WmFZZBnN1c2rT /tvzyGJ+gIaFG29u5ZgnYU7AD/3cATHLl6gnRpJHlpxr29PvRGHPY+d8zEm35KbsJAqT PTWkNWOhBFsc6+P/RlUmn9fZbHGbKd3an9dfxEqQntkynvjR0ykiE9a3oCOyy6QQgavC jHNA== X-Gm-Message-State: AOJu0YxZlEPNlttVisbZWaIJnELE2X40BoBq3G+ZY+KAMbB0ablMaMpU oPyKnB50GQVniMAhavhm2nici1eeGZc2GSU+OYF1tc3nu1Yn3fIyrB82P4h2lmBelegz442edXv CRyyufFdLUS8CE07YXJjl X-Received: by 2002:a05:6214:da2:b0:66d:5b9:927a with SMTP id h2-20020a0562140da200b0066d05b9927amr1970530qvh.54.1697795838748; Fri, 20 Oct 2023 02:57:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEHjDh9AsSKE+jJVHyOvJW78emEXdFNlrhT7Yod2lPLj5vBqKOhmJ8L2gOkD4UXpwE6SMWgmw== X-Received: by 2002:a05:6214:da2:b0:66d:5b9:927a with SMTP id h2-20020a0562140da200b0066d05b9927amr1970509qvh.54.1697795838300; Fri, 20 Oct 2023 02:57:18 -0700 (PDT) Received: from localhost ([88.120.130.27]) by smtp.gmail.com with ESMTPSA id i9-20020ac85c09000000b0041cb787ff41sm468279qti.67.2023.10.20.02.57.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 02:57:17 -0700 (PDT) Received: by localhost (Postfix, from userid 1000) id 5023F5077C49; Fri, 20 Oct 2023 11:57:15 +0200 (CEST) From: Dodji Seketeli To: John Moon Cc: Trilok Soni , Satya Durga Srinivasu Prabhala , libabigail@sourceware.org, dodji@redhat.com Subject: [PATCH 1/7, applied] suppression: Add "changed_enumerators_regexp" property Organization: Red Hat / France References: <87cyx97h4j.fsf@redhat.com> X-Operating-System: AlmaLinux 9.2 X-URL: http://www.redhat.com Date: Fri, 20 Oct 2023 11:57:15 +0200 In-Reply-To: <87cyx97h4j.fsf@redhat.com> (Dodji Seketeli's message of "Fri, 20 Oct 2023 11:55:24 +0200") Message-ID: <878r7x7h1g.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libabigail-bounces+patchwork=sourceware.org@sourceware.org Hello, Currently, users are able to suppress changes to enumerator variants matching names specified in "changed_enumerators", but can't specify regular expressions. A common pattern when using enums is to have the final enum variant labeled as "*_MAX" or "*_LAST" so that users of the enum can have a way to determine how many variants there are. In these cases, when expanding an enum, the last variant will change, but that's an expected result that users may not want to flag as an ABI-breaking change. For example, if you have a change like this: enum foo { FOO, BAR, FOOBAR_MAX, }; ... enum foo { FOO, BAR, BAZ, FOOBAR_MAX, }; abidiff reports: 1 changed type unreachable from any public interface: [C] 'enum foo' changed: type size hasn't changed 1 enumerator insertion: 'foo::BAZ' value '2' 1 enumerator change: 'foo::FOOBAR_MAX' from value '2' to '3' at test_2.c:1:1 With a new changed_enumerators_regexp property, users can specify a suppression which stops abidiff from emitting this diff for any members which match the regular expressions in the list: [suppress_type] type_kind = enum changed_enumerators_regexp = .*_MAX$, .*_LAST$, .*_NUM$, .*_NBITS$ * include/abg-suppression.h (type_suppression::{g,s}et_changed_enumerators_regexp): Declare new accessor functions. * src/abg-suppression-priv.h (type_suppression::priv::changed_enumerators_regexp_): Define new data member. * src/abg-suppression.cc (type_suppression::{g,s}et_changed_enumerators_regexp): Define new accessor function. (type_suppression::suppresses_diff): For a type suppression to match an enum_diff, the names of all changed enumerators must match either the names returned by type_suppression::get_changed_enumerator_names or one of the regexps returned by the new member function type_suppression::get_changed_enumerators_regexp. (read_type_suppression): Parse the new 'changed_enumerators_regexp' property to set the type_suppression::get_changed_enumerators_regexp property. * doc/manuals/libabigail-concepts.rst: Add an entry for the new 'changed_enumerators_regexp' property. * tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-[1-5].suppr: Add new test suppression files. * tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-[0-5].txt: Add new test reference output files. * tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-v{0,1}.c: Add source code for new binary test input files. * tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-v{0,1}.o: Add new binary test input files. * tests/data/Makefile.am: Add the new test files to the source distribution. * tests/test-diff-suppr.cc (in_out_specs): Add the new test input files to this test harness. Signed-off-by: John Moon Signed-off-by: Dodji Seketeli Applied to master. --- doc/manuals/libabigail-concepts.rst | 25 ++++++ include/abg-suppression.h | 6 ++ src/abg-suppression-priv.h | 1 + src/abg-suppression.cc | 84 +++++++++++++++--- tests/data/Makefile.am | 15 ++++ ...merator-changes-enumerator-changes-1.suppr | 3 + ...merator-changes-enumerator-changes-2.suppr | 3 + ...merator-changes-enumerator-changes-3.suppr | 3 + ...merator-changes-enumerator-changes-4.suppr | 3 + ...merator-changes-enumerator-changes-5.suppr | 3 + ...or-changes-enumerator-changes-report-0.txt | 29 ++++++ ...or-changes-enumerator-changes-report-1.txt | 21 +++++ ...or-changes-enumerator-changes-report-2.txt | 21 +++++ ...or-changes-enumerator-changes-report-3.txt | 13 +++ ...or-changes-enumerator-changes-report-4.txt | 21 +++++ ...or-changes-enumerator-changes-report-5.txt | 3 + ...enumerator-changes-enumerator-changes-v0.c | 37 ++++++++ ...enumerator-changes-enumerator-changes-v0.o | Bin 0 -> 3944 bytes ...enumerator-changes-enumerator-changes-v1.c | 40 +++++++++ ...enumerator-changes-enumerator-changes-v1.o | Bin 0 -> 4064 bytes tests/test-diff-suppr.cc | 60 +++++++++++++ 21 files changed, 381 insertions(+), 10 deletions(-) create mode 100644 tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-1.suppr create mode 100644 tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-2.suppr create mode 100644 tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-3.suppr create mode 100644 tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-4.suppr create mode 100644 tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-5.suppr create mode 100644 tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-0.txt create mode 100644 tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-1.txt create mode 100644 tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-2.txt create mode 100644 tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-3.txt create mode 100644 tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-4.txt create mode 100644 tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-5.txt create mode 100644 tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-v0.c create mode 100644 tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-v0.o create mode 100644 tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-v1.c create mode 100644 tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-v1.o new file mode 100644 index 00000000..e7f1bcc7 index 1a06e043..8c9ad070 100644 diff --git a/doc/manuals/libabigail-concepts.rst b/doc/manuals/libabigail-concepts.rst index f64f5229..324c5162 100644 --- a/doc/manuals/libabigail-concepts.rst +++ b/doc/manuals/libabigail-concepts.rst @@ -353,6 +353,31 @@ The potential properties of this sections are listed below: changed_enumerators = LAST_ENUMERATORS0, LAST_ENUMERATOR1 +.. _suppr_changed_enumerators_regexp_label: + +* ``changed_enumerators_regexp`` + + Usage: + + ``changed_enumerators_regexp`` ``=`` + + Suppresses change reports involving changes in the value of + enumerators of a given enum type. This property is applied if the + ``type_kind`` property is set to the value ``enum``, at least. The + value of the ``changed_enumerators_regexp`` property is a + comma-separated list of regular expressions that should match the + names of the enumerators that the user expects to change. For + instance: :: + + changed_enumerators_regexp = .*_MAX$, .*_LAST$, .*_NUM$, .*_NBITS$ + + In the example above, change reports to any enumerator which name + ends with _MAX, _LAST, _NUM or _NBITS will be suppressed. + + Note that for this property to be applied to changes to an enum + type, the size of the enum type must *NOT* have changed. + + * ``drop`` Usage: diff --git a/include/abg-suppression.h b/include/abg-suppression.h index 6b62f64d..cbb16207 100644 --- a/include/abg-suppression.h +++ b/include/abg-suppression.h @@ -330,6 +330,12 @@ public: void set_changed_enumerator_names(const vector&); + const vector& + get_changed_enumerators_regexp() const; + + void + set_changed_enumerators_regexp(const vector&); + virtual bool suppresses_diff(const diff* diff) const; diff --git a/src/abg-suppression-priv.h b/src/abg-suppression-priv.h index cf66a9f1..351c5965 100644 --- a/src/abg-suppression-priv.h +++ b/src/abg-suppression-priv.h @@ -585,6 +585,7 @@ class type_suppression::priv string source_location_to_keep_regex_str_; mutable regex::regex_t_sptr source_location_to_keep_regex_; mutable vector changed_enumerator_names_; + mutable vector changed_enumerators_regexp_; priv(); diff --git a/src/abg-suppression.cc b/src/abg-suppression.cc index 7053e728..f8d065f6 100644 --- a/src/abg-suppression.cc +++ b/src/abg-suppression.cc @@ -770,6 +770,28 @@ void type_suppression::set_changed_enumerator_names(const vector& n) {priv_->changed_enumerator_names_ = n;} +/// Getter of the vector of the regular expression strings for changed +/// enumerators that are supposed to be suppressed. Note that this +/// will be "valid" only if the type suppression has the +/// 'type_kind = enum' property. +/// +/// @return the vector of the regular expression strings that are +/// supposed to match enumertor names to be suppressed. +const vector& +type_suppression::get_changed_enumerators_regexp() const +{return priv_->changed_enumerators_regexp_;} + +/// Setter of the vector of the regular expression strings for changed +/// enumerators that are supposed to be suppressed. Note that this +/// will be "valid" only if the type suppression has the +/// 'type_kind = enum' property. +/// +/// @param n the vector of the regular expression strings that are +/// supposed to match enumertor names to be suppressed. +void +type_suppression::set_changed_enumerators_regexp(const vector& n) +{priv_->changed_enumerators_regexp_ = n;} + /// Evaluate this suppression specification on a given diff node and /// say if the diff node should be suppressed or not. /// @@ -1002,9 +1024,12 @@ type_suppression::suppresses_diff(const diff* diff) const // ... and yet carries some changed enumerators! && !enum_dif->changed_enumerators().empty()) { - // Make sure that all changed enumerators are listed in the - // vector of enumerator names returned by the - // get_changed_enumerator_names() member function. + + // Make sure that all changed enumerators are either: + // 1. listed in the vector of enumerator names returned + // by the get_changed_enumerator_names() member function + // 2. match a regular expression returned by the + // get_changed_enumerators_regexp() member function bool matched = true; for (string_changed_enumerator_map::const_iterator i = enum_dif->changed_enumerators().begin(); @@ -1012,13 +1037,20 @@ type_suppression::suppresses_diff(const diff* diff) const ++i) { matched &= true; - if (std::find(get_changed_enumerator_names().begin(), - get_changed_enumerator_names().end(), - i->first) == get_changed_enumerator_names().end()) - { - matched &= false; - break; - } + if ((std::find(get_changed_enumerator_names().begin(), + get_changed_enumerator_names().end(), + i->first) == get_changed_enumerator_names().end()) + && + (std::find_if(get_changed_enumerators_regexp().begin(), + get_changed_enumerators_regexp().end(), + [&] (const regex_t_sptr& enum_regexp) + { + return regex::match(enum_regexp, i->first); + }) == get_changed_enumerators_regexp().end())) + { + matched &= false; + break; + } } if (!matched) return false; @@ -2162,6 +2194,34 @@ read_type_suppression(const ini::config::section& section) changed_enumerator_names.push_back(p->get_value()->as_string()); } + /// Support 'changed_enumerators_regexp = .*_foo, bar_[0-9]+, baz' + /// + /// If the current type is an enum and if it carries changed + /// enumerators that match regular expressions listed in the + /// changed_enumerators_regexp property value then it should be + /// suppressed. + + ini::property_sptr changed_enumerators_regexp_prop = + section.find_property("changed_enumerators_regexp"); + + vector changed_enumerators_regexp; + if (changed_enumerators_regexp_prop) + { + if (ini::list_property_sptr p = + is_list_property(changed_enumerators_regexp_prop)) + { + for (string e : p->get_value()->get_content()) + changed_enumerators_regexp.push_back(regex::compile(e)); + } + else if (ini::simple_property_sptr p = + is_simple_property(changed_enumerators_regexp_prop)) + { + changed_enumerators_regexp.push_back( + regex::compile(p->get_value()->as_string()) + ); + } + } + if (section.get_name() == "suppress_type") result.reset(new type_suppression(label_str, name_regex_str, name_str)); else if (section.get_name() == "allow_type") @@ -2225,6 +2285,10 @@ read_type_suppression(const ini::config::section& section) && !changed_enumerator_names.empty()) result->set_changed_enumerator_names(changed_enumerator_names); + if (result->get_type_kind() == type_suppression::ENUM_TYPE_KIND + && !changed_enumerators_regexp.empty()) + result->set_changed_enumerators_regexp(changed_enumerators_regexp); + return result; } diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am index d1c767b3..1aa37b16 100644 --- a/tests/data/Makefile.am +++ b/tests/data/Makefile.am @@ -1760,6 +1760,21 @@ test-diff-suppr/test39-public-headers-dir/test39-header-v0.h \ test-diff-suppr/test39-public-headers-dir/test39-header-v1.h \ test-diff-suppr/libtest40-enumerator-changes-v0.so \ test-diff-suppr/libtest40-enumerator-changes-v1.so \ +test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-1.suppr \ +test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-2.suppr \ +test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-3.suppr \ +test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-4.suppr \ +test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-5.suppr \ +test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-0.txt \ +test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-1.txt \ +test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-2.txt \ +test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-3.txt \ +test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-4.txt \ +test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-5.txt \ +test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-v0.c \ +test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-v1.c \ +test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-v0.o \ +test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-v1.o \ test-diff-suppr/libtest41-enumerator-changes-v0.so \ test-diff-suppr/libtest41-enumerator-changes-v1.so \ test-diff-suppr/test40-enumerator-changes-0.suppr \ diff --git a/tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-1.suppr b/tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-1.suppr new file mode 100644 index 00000000..cbe76ab8 --- /dev/null +++ b/tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-1.suppr @@ -0,0 +1,3 @@ +[suppress_type] + type_kind = enum + changed_enumerators_regexp = ^.*_LAST$ diff --git a/tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-2.suppr b/tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-2.suppr new file mode 100644 index 00000000..0ab63c10 --- /dev/null +++ b/tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-2.suppr @@ -0,0 +1,3 @@ +[suppress_type] + type_kind = enum + changed_enumerators_regexp = ^.*_MAX$ diff --git a/tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-3.suppr b/tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-3.suppr new file mode 100644 index 00000000..e8bb9117 --- /dev/null +++ b/tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-3.suppr @@ -0,0 +1,3 @@ +[suppress_type] + type_kind = enum + changed_enumerators_regexp = ^.*_LAST$, ^.*_MAX$ \ No newline at end of file diff --git a/tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-4.suppr b/tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-4.suppr new file mode 100644 index 00000000..492dd336 --- /dev/null +++ b/tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-4.suppr @@ -0,0 +1,3 @@ +[suppress_type] + type_kind = enum + changed_enumerators_regexp = ^LAST_.*$ \ No newline at end of file diff --git a/tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-5.suppr b/tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-5.suppr new file mode 100644 index 00000000..3ee5d407 --- /dev/null +++ b/tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-5.suppr @@ -0,0 +1,3 @@ +[suppress_type] + type_kind = enum + changed_enumerators_regexp = ^.*_LAST$, ^.*_MAX$, ^LAST_.*$ \ No newline at end of file diff --git a/tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-0.txt b/tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-0.txt new file mode 100644 index 00000000..26435de3 --- /dev/null +++ b/tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-0.txt @@ -0,0 +1,29 @@ +Functions changes summary: 0 Removed, 3 Changed, 0 Added functions +Variables changes summary: 0 Removed, 0 Changed, 0 Added variable + +3 functions with some indirect sub-type change: + + [C] 'function void fun0(Enum0)' at test40.1-enumerator-changes-enumerator-changes-v0.c:25:1 has some indirect sub-type changes: + parameter 1 of type 'enum Enum0' has sub-type changes: + type size hasn't changed + 1 enumerator insertion: + 'Enum0::ENUM0_E1' value '1' + 1 enumerator change: + 'Enum0::ENOM0_LAST' from value '1' to '2' at test40.1-enumerator-changes-enumerator-changes-v1.c:6:1 + + [C] 'function void fun1(Enum1)' at test40.1-enumerator-changes-enumerator-changes-v0.c:30:1 has some indirect sub-type changes: + parameter 1 of type 'enum Enum1' has sub-type changes: + type size hasn't changed + 1 enumerator insertion: + 'Enum1::ENUM1_E1' value '1' + 1 enumerator change: + 'Enum1::ENUM1_MAX' from value '1' to '2' at test40.1-enumerator-changes-enumerator-changes-v1.c:13:1 + + [C] 'function void fun2(Enum2)' at test40.1-enumerator-changes-enumerator-changes-v0.c:35:1 has some indirect sub-type changes: + parameter 1 of type 'enum Enum2' has sub-type changes: + type size hasn't changed + 1 enumerator insertion: + 'Enum2::ENUM2_E1' value '1' + 1 enumerator change: + 'Enum2::LAST_ENUM1_ENUMERATOR' from value '1' to '2' at test40.1-enumerator-changes-enumerator-changes-v1.c:20:1 + diff --git a/tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-1.txt b/tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-1.txt new file mode 100644 index 00000000..ff415ac5 --- /dev/null +++ b/tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-1.txt @@ -0,0 +1,21 @@ +Functions changes summary: 0 Removed, 2 Changed (1 filtered out), 0 Added functions +Variables changes summary: 0 Removed, 0 Changed, 0 Added variable + +2 functions with some indirect sub-type change: + + [C] 'function void fun1(Enum1)' at test40.1-enumerator-changes-enumerator-changes-v0.c:30:1 has some indirect sub-type changes: + parameter 1 of type 'enum Enum1' has sub-type changes: + type size hasn't changed + 1 enumerator insertion: + 'Enum1::ENUM1_E1' value '1' + 1 enumerator change: + 'Enum1::ENUM1_MAX' from value '1' to '2' at test40.1-enumerator-changes-enumerator-changes-v1.c:13:1 + + [C] 'function void fun2(Enum2)' at test40.1-enumerator-changes-enumerator-changes-v0.c:35:1 has some indirect sub-type changes: + parameter 1 of type 'enum Enum2' has sub-type changes: + type size hasn't changed + 1 enumerator insertion: + 'Enum2::ENUM2_E1' value '1' + 1 enumerator change: + 'Enum2::LAST_ENUM1_ENUMERATOR' from value '1' to '2' at test40.1-enumerator-changes-enumerator-changes-v1.c:20:1 + diff --git a/tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-2.txt b/tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-2.txt new file mode 100644 index 00000000..7e4093ca --- /dev/null +++ b/tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-2.txt @@ -0,0 +1,21 @@ +Functions changes summary: 0 Removed, 2 Changed (1 filtered out), 0 Added functions +Variables changes summary: 0 Removed, 0 Changed, 0 Added variable + +2 functions with some indirect sub-type change: + + [C] 'function void fun0(Enum0)' at test40.1-enumerator-changes-enumerator-changes-v0.c:25:1 has some indirect sub-type changes: + parameter 1 of type 'enum Enum0' has sub-type changes: + type size hasn't changed + 1 enumerator insertion: + 'Enum0::ENUM0_E1' value '1' + 1 enumerator change: + 'Enum0::ENOM0_LAST' from value '1' to '2' at test40.1-enumerator-changes-enumerator-changes-v1.c:6:1 + + [C] 'function void fun2(Enum2)' at test40.1-enumerator-changes-enumerator-changes-v0.c:35:1 has some indirect sub-type changes: + parameter 1 of type 'enum Enum2' has sub-type changes: + type size hasn't changed + 1 enumerator insertion: + 'Enum2::ENUM2_E1' value '1' + 1 enumerator change: + 'Enum2::LAST_ENUM1_ENUMERATOR' from value '1' to '2' at test40.1-enumerator-changes-enumerator-changes-v1.c:20:1 + diff --git a/tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-3.txt b/tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-3.txt new file mode 100644 index 00000000..9f4bbcb2 --- /dev/null +++ b/tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-3.txt @@ -0,0 +1,13 @@ +Functions changes summary: 0 Removed, 1 Changed (2 filtered out), 0 Added functions +Variables changes summary: 0 Removed, 0 Changed, 0 Added variable + +1 function with some indirect sub-type change: + + [C] 'function void fun2(Enum2)' at test40.1-enumerator-changes-enumerator-changes-v0.c:35:1 has some indirect sub-type changes: + parameter 1 of type 'enum Enum2' has sub-type changes: + type size hasn't changed + 1 enumerator insertion: + 'Enum2::ENUM2_E1' value '1' + 1 enumerator change: + 'Enum2::LAST_ENUM1_ENUMERATOR' from value '1' to '2' at test40.1-enumerator-changes-enumerator-changes-v1.c:20:1 + diff --git a/tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-4.txt b/tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-4.txt new file mode 100644 index 00000000..e09641c6 --- /dev/null +++ b/tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-4.txt @@ -0,0 +1,21 @@ +Functions changes summary: 0 Removed, 2 Changed (1 filtered out), 0 Added functions +Variables changes summary: 0 Removed, 0 Changed, 0 Added variable + +2 functions with some indirect sub-type change: + + [C] 'function void fun0(Enum0)' at test40.1-enumerator-changes-enumerator-changes-v0.c:25:1 has some indirect sub-type changes: + parameter 1 of type 'enum Enum0' has sub-type changes: + type size hasn't changed + 1 enumerator insertion: + 'Enum0::ENUM0_E1' value '1' + 1 enumerator change: + 'Enum0::ENOM0_LAST' from value '1' to '2' at test40.1-enumerator-changes-enumerator-changes-v1.c:6:1 + + [C] 'function void fun1(Enum1)' at test40.1-enumerator-changes-enumerator-changes-v0.c:30:1 has some indirect sub-type changes: + parameter 1 of type 'enum Enum1' has sub-type changes: + type size hasn't changed + 1 enumerator insertion: + 'Enum1::ENUM1_E1' value '1' + 1 enumerator change: + 'Enum1::ENUM1_MAX' from value '1' to '2' at test40.1-enumerator-changes-enumerator-changes-v1.c:13:1 + diff --git a/tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-5.txt b/tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-5.txt new file mode 100644 index 00000000..97239c74 --- /dev/null +++ b/tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-5.txt @@ -0,0 +1,3 @@ +Functions changes summary: 0 Removed, 0 Changed (3 filtered out), 0 Added functions +Variables changes summary: 0 Removed, 0 Changed, 0 Added variable + diff --git a/tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-v0.c b/tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-v0.c new file mode 100644 index 00000000..7b32ee8b --- /dev/null +++ b/tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-v0.c @@ -0,0 +1,37 @@ +/** + * compile this with: + * gcc -g -c test40.1-enumerator-changes-enumerator-changes-v0.c + */ + +enum Enum0 +{ + ENUM0_E0, + ENOM0_LAST +}; + +enum Enum1 +{ + ENUM1_E0, + ENUM1_MAX +}; + +enum Enum2 +{ + ENUM2_E0, + LAST_ENUM1_ENUMERATOR +}; + +void +fun0(enum Enum0 p __attribute__((unused))) +{ +} + +void +fun1(enum Enum1 p __attribute__((unused))) +{ +} + +void +fun2(enum Enum2 p __attribute__((unused))) +{ +} diff --git a/tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-v0.o b/tests/data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-v0.o new file mode 100644 index 0000000000000000000000000000000000000000..8234f05d0e157a66a88be438cbe4a1f17c2fa01f GIT binary patch literal 3944 zcmc&$&2Jl35TEthaf%b?t3XUj<4{o2s$PGP21rTbD3~T9Ng*^65+Cl`UVl(~ZQ1K6 z1OYu26*#mKhaNa0AtVGvAWod%!e0QKI8li!M+69FcIT}(&l?Hl!dUxe<~JX2-rIR^ z{Z4N4*?^*eAO)78rwJ6GdS6e@+F}+?!UXKD-@JG8t-o%)`n{j@2YQA;8Ki&^4G+`c zrPCfIK=KAY12i~Q*rNgi!7v$JkD+U_hie+YA)A5}dWHrfu@L2>&rwrbaE5XPZr8!~ za|`PE{pk3eexCj8Qk0mxO+8P{7Sq@ZlsQnNry`g;sHoB9nQ&w#xG}Lfqg;$UH8Y@0 z;N&4t2N@XKmLQM?i7bS^=a4Ik@@I6I7_Ao{6sGN^2bAf+ zh?CY13n_5IRn?f%&EhYhVnA;D@>VLpx%%Q2=$f5c#WYIsnrXqM?cMlV`iXctt<7uc zcqWy3JhhOz5TDyYhjrazLn3oFo@iKI(^#q)rqQkyQPtbU>eBv`3yFpK#9k(zs6cLe zcPo?6r66Z^8#tnxvQ-q)Jz;D0C7@FBih{?PM89R+|kY zS!$MEuO%xrD_O4<^g^wo*XqfZZWXIWCutcStCKA0mTrrQQmtH0bh@op8^|=D($Wb7 zD>K@<)odqag0&BwqIdnjbY)_LB=_vavj@j4FranfU9E9Kh=`$dJt?LIP z?zZ_MyNVV+Qk|Qn&!oaYA4Y%*_6^f#Q{hA(=J?|!<3lP8`Jj{^Zwnt%VZ;X||KUFT z0wUv{{SkNIBI80Ae1&oG{sn%lvtb`kaZodMZQ^31yxv_El@m_8hgYmk(?dxHtQmvsPhxXKVUBQO}zgvq&%Oo{eeXPkP++do+e7wf$$;bPxF z>%7sh^a66L?eMCQEMwmSjlMvj6*?Wz+D2X1N=Bhu$=A$s6K%Gv7Yc1-?~qw<+h3zY zSiNQ%A_S)pBEflEFE$$u13%-M*|ZD|zX6Gkr5CSp5~G?gxAlf-JYLUn*%SuSo_fzV z<;v24B>$BmUoXv|LYRC*zvgxF$a4HF+UR^AH=g=M&PmgW`Tr)xL$WXRA^ktidVEOy zfj4B7n`#U(@)LKFxbNuRk#iyhFEjWaDISu2>A$axk^4OcQ=V87W#8uz^Q-@7E>y%* z{b79M`b$1J5rX@9-Bh2KKdDzanC2%)p1*|{YbO{)@C9qCv>Qhq%e{UW{bf_fy7rxvqPQYPdt;mW3wxcW zMF_;9qQIf8IFt_|B)A}PsKh_OhXfZcoH!x%0218b1QJLv^LEDGJZ~hF3uEnjGr#%G zyxI5VeKo!Eq)*cXizenp$6{27J9l;TlvGpVs2CPoOV@tB_R8Papa0rR3qqtE<J7hvgi zaSZeNZj^=OMZl2K;r#+O@FLGZk33nHHtv)RSceI$af4Vwn-Y3xJP0v-F z^6+d#I~{y163~VrX^+tR2pC!(_KgVPH?%XOdWb-6a&$;L(wiE&GK&13A?=~ia8REZ zn?QK*9+B`EaRf zi}c#oY9h0`a9*5U+X^ox9tkHB#rP``EW?Y&uFenLTItnlo0;|k8g<+fC zSlC?O5ZkS45}O1zPCAHzq)8Dg)+$ykU(3H(iWN$BtX#^P*;2tQm1A|&&K0d@%(j|# zGnO}PQ>xK?X?r``Y}M-xfv)Mek%(H5%xai+tr5)?&1%7FdOTsX?#qa-gIRJo-?F9qgJ_LLGI(WQ9ckZ1omo5Tb7y`O;|8)6uai|M( z_;3Yzh%OF$pqL--5)aYEfCq~F{x19!AV*yD!#CtC;cRn%hHzeg#t(En_XVIGN&JQgBDOSO0{I&ov+vbKyAd>txR<_#0#| zD)j@K%dk`O%6e*1J`(99Ro;P7MFIQ|c3%%WN`XXz# zwQCCl|ICDuZ8n9`u*#;9x3aB5rc~XoflumYHrudv_PEW4{A1gLl}lBNLtqG25za_E zSF2Pk_*gKiHQO@a?=EUK6`~k(OnDRprzk*X3V zkN20F6Vp@(d=m|qsN8elQ!%9fL15e!i>k_f3NWww&*5PP;drbczv9*U^MI*20TPq+ z-dLYoRBi^GUgN(;<6od)93LTd{5oKmlj{Uk$|V~AM+T_p@wtB)aIg4H+E61*+$a96 zed5dbQXu@lHJpaG2gXfR!Pe4IxiUI2H z(EKlvjq{IRGaS$R7wb{S#*h)Z+;36A_LK3)#(YJ^%m! literal 0 HcmV?d00001 diff --git a/tests/test-diff-suppr.cc b/tests/test-diff-suppr.cc --- a/tests/test-diff-suppr.cc +++ b/tests/test-diff-suppr.cc @@ -1836,6 +1836,66 @@ InOutSpec in_out_specs[] = "data/test-diff-suppr/test40-enumerator-changes-report-0.txt", "output/test-diff-suppr/test40-enumerator-changes-report-0.txt" }, + { + "data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-v0.o", + "data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-v1.o", + "", + "", + "", + "--no-default-suppression", + "data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-0.txt", + "output/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-0.txt" + }, + { + "data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-v0.o", + "data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-v1.o", + "", + "", + "data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-1.suppr", + "--no-default-suppression", + "data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-1.txt", + "output/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-1.txt" + }, + { + "data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-v0.o", + "data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-v1.o", + "", + "", + "data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-2.suppr", + "--no-default-suppression", + "data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-2.txt", + "output/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-2.txt" + }, + { + "data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-v0.o", + "data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-v1.o", + "", + "", + "data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-3.suppr", + "--no-default-suppression", + "data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-3.txt", + "output/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-3.txt" + }, + { + "data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-v0.o", + "data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-v1.o", + "", + "", + "data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-4.suppr", + "--no-default-suppression", + "data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-4.txt", + "output/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-4.txt" + }, + { + "data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-v0.o", + "data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-v1.o", + "", + "", + "data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-5.suppr", + "--no-default-suppression", + "data/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-5.txt", + "output/test-diff-suppr/test40.1-enumerator-changes-enumerator-changes-report-5.txt" + }, { "data/test-diff-suppr/libtest41-enumerator-changes-v0.so", "data/test-diff-suppr/libtest41-enumerator-changes-v1.so", From patchwork Fri Oct 20 09:58:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dodji Seketeli X-Patchwork-Id: 78213 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 329B6385841B for ; Fri, 20 Oct 2023 09:58:49 +0000 (GMT) X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id E944A3858D20 for ; Fri, 20 Oct 2023 09:58:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E944A3858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E944A3858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697795925; cv=none; b=T3XQH65iqKrLFDZiersfqXbaJrVJq2rkm0TTz21nQhV7VK8jpx4gw0Hwe0wmyCA1v6pD4GqMOzARpP+FhOmUzbYJ/bMtAm6oC6F+C6m37v7oiYHe1dlodcxhtCF1po2gFcz2FcW/lWLt4OM150uq+xv8OOuQXcyCqH0PV9fPij4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697795925; c=relaxed/simple; bh=cgrmZL6qeyx9Gn1SXkVdEieYP3tDmHpUXPsBKVAeCAU=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Yfe6d1l9TWnAay5XYqrRocD8R9EcgjonyWrwmpK55UAuGTToIixI+uSsJHJvdz8PKWKRX1wgzr3N+b1Jhrap753fqzvO4TMdUFqyHPQhp8IG5w7VUAr8KvcO7FBDUt0hHtJg85gm20ifa98rbdTq0j7H8qjzJAYSxPF/gMR+sFY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697795923; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=2W9kaM1PDB+KJrcYA5R/KolxKmKZMdH7rXSmVTWuGrA=; b=PaKzWhUNh5XJ7Sa7ZB0dNSieW7SFzQ2P+wOdhWBG6Yj1oZRLLHjGDk9Whn5w+jIFZcbZSi LGs18zDKTkGllVRzpx9M2zXn292hv/jHtE9bgW8+inw76VkeAMSOt9Yi6XVPUkmcZfJ+bG 5HgrFrr7duga8IYvIN0NiB1ZvGJ3J9c= Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-118-c8vdAmb-O9y60xA9UDWjFg-1; Fri, 20 Oct 2023 05:58:26 -0400 X-MC-Unique: c8vdAmb-O9y60xA9UDWjFg-1 Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-4180bc4227bso27506151cf.1 for ; Fri, 20 Oct 2023 02:58:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697795906; x=1698400706; h=mime-version:user-agent:message-id:in-reply-to:date:references :organization:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2W9kaM1PDB+KJrcYA5R/KolxKmKZMdH7rXSmVTWuGrA=; b=WevzaCVLezDbLf0GUVhfE1uSlHbYkTrePic+rccdZBMOVGdf5ac+Z3noAEKLUWECGV AN/UuvMBrUYbd7xPhqWn9ur5vdlmecD/+VXFDRBsB0Jsz2WgKGeopKbfmvb3/s5k51Qk yUUVpBRc/ehsXwjMdy90Pqj/QP6J0Pxe//fA24r6icNXqJ2sJsRXjNp1PMfbz943zJOp 1NGK6oFJlbGhLtGW2EtXeqOfrPBWUo0E06XnRvDfQOLxEV1KmSf7xg+F5U9Zd9Wtd6ym USTlHfyFtP5hwUfOFuEsFVQIiF4vROKQ9ufONInnRcL0khQSYaA5wv7xRD2Z5OaBK5r9 3E1g== X-Gm-Message-State: AOJu0YxVzqdVCYwNRHQBI1fRmDRvA6omeTyq9RIg4MNPE41OdFrWaXxG RkCocqwyzYJaI2a7mawsq4DDIyDYrH+E4gQWjVQg5Owz0+lqMHj7LvmJ8PvKwaZIzqTCwHR+zjy Z4hEP7Zzel+KQISiBUvBG X-Received: by 2002:ac8:5c04:0:b0:3f9:d1c3:cc45 with SMTP id i4-20020ac85c04000000b003f9d1c3cc45mr5832395qti.28.1697795906437; Fri, 20 Oct 2023 02:58:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFRUUyFmxLFwevYFLo1aDtAPMkcbXV8sqHUmX0SXimFEecvrumkeM6NAkrSGZieh13ZubK7Jg== X-Received: by 2002:ac8:5c04:0:b0:3f9:d1c3:cc45 with SMTP id i4-20020ac85c04000000b003f9d1c3cc45mr5832387qti.28.1697795906171; Fri, 20 Oct 2023 02:58:26 -0700 (PDT) Received: from localhost ([88.120.130.27]) by smtp.gmail.com with ESMTPSA id g14-20020ac84b6e000000b00419cb97418bsm476064qts.15.2023.10.20.02.58.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 02:58:25 -0700 (PDT) Received: by localhost (Postfix, from userid 1000) id 243045077C49; Fri, 20 Oct 2023 11:58:24 +0200 (CEST) From: Dodji Seketeli To: Dodji Seketeli Cc: John Moon , Trilok Soni , Satya Durga Srinivasu Prabhala , libabigail@sourceware.org Subject: [PATCH 2/7, applied] default-reporter,reporter-priv: Do not report names of anonymous enums Organization: Red Hat / France References: <87cyx97h4j.fsf@redhat.com> X-Operating-System: AlmaLinux 9.2 X-URL: http://www.redhat.com Date: Fri, 20 Oct 2023 11:58:24 +0200 In-Reply-To: <87cyx97h4j.fsf@redhat.com> (Dodji Seketeli's message of "Fri, 20 Oct 2023 11:55:24 +0200") Message-ID: <874jil7gzj.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libabigail-bounces+patchwork=sourceware.org@sourceware.org Hello, When reporting changes of anonymous enums, do not try to report their qualified name as that doesn't make any sense -- they are anonymous. Similarly, in report_name_size_and_alignment_changes do not try to report about changes in the name of an anonymous enum. * src/abg-default-reporter.cc (default_reporter::report): In the overload for enum_diff, do not get the qualified name of anonymous enums. * src/abg-reporter-priv.cc (report_name_size_and_alignment_changes): Do not report about name changes for anonymous enums. Signed-off-by: Dodji Seketeli Applied to master. --- src/abg-default-reporter.cc | 12 +++++++++--- src/abg-reporter-priv.cc | 3 ++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/abg-default-reporter.cc b/src/abg-default-reporter.cc index b1df9300..c71f8d56 100644 --- a/src/abg-default-reporter.cc +++ b/src/abg-default-reporter.cc @@ -162,7 +162,9 @@ default_reporter::report(const enum_diff& d, ostream& out, { out << indent << " '" - << i->get_qualified_name() + << (first->get_is_anonymous() + ? i->get_name() + : i->get_qualified_name()) << "' value '" << i->get_value() << "'"; @@ -181,7 +183,9 @@ default_reporter::report(const enum_diff& d, ostream& out, { out << indent << " '" - << i->get_qualified_name() + << (second->get_is_anonymous() + ? i->get_name() + :i->get_qualified_name()) << "' value '" << i->get_value() << "'"; @@ -201,7 +205,9 @@ default_reporter::report(const enum_diff& d, ostream& out, { out << indent << " '" - << i->first.get_qualified_name() + << (first->get_is_anonymous() + ? i->first.get_name() + : i->first.get_qualified_name()) << "' from value '" << i->first.get_value() << "' to '" << i->second.get_value() << "'"; diff --git a/src/abg-reporter-priv.cc b/src/abg-reporter-priv.cc index 63a45b80..cc38f240 100644 --- a/src/abg-reporter-priv.cc +++ b/src/abg-reporter-priv.cc @@ -965,7 +965,8 @@ report_name_size_and_alignment_changes(decl_base_sptr first, string fn = first->get_qualified_name(), sn = second->get_qualified_name(); - if (fn != sn) + if (!(first->get_is_anonymous() && second->get_is_anonymous()) + && fn != sn) { if (!(ctxt->get_allowed_category() & HARMLESS_DECL_NAME_CHANGE_CATEGORY) && filtering::has_harmless_name_change(first, second)) From patchwork Fri Oct 20 09:59:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dodji Seketeli X-Patchwork-Id: 78214 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 09A693858D20 for ; Fri, 20 Oct 2023 10:00:43 +0000 (GMT) X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 4F4773858D20 for ; Fri, 20 Oct 2023 09:59:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4F4773858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4F4773858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697796007; cv=none; b=D+G0CsWSx7NLlPNRlqoqqnGRNS+EbmNS7muIBd7vGKPcq6AxH6eUA2HotZkwl/X6PjX2BfLxHdavSIr//nwy5sWGXPlVXAeD62dCUgo3uBhX5LzfUbo1U6yoi9l7lMIf3sM3QKD+U+/TMWCbGpl8lrGDNSZrwNOJ1xVL7l0o+bU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697796007; c=relaxed/simple; bh=lrAW5LOvaoIFWuTDlc6yWvnGwYiKG/3JIKAMyJhXJJw=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=S1d0WIxNsZS6vw8CSKqEY3L1NbU8Htk0Os70WpVp2IbTvdDjVNwajwiRE7TV20v83vRi6RiOt/hjiL/sICBHiB0E3guxTQaS4ywHZkQ6ZgzLP8wKpb5/6OE4vqauITWHtSEZmV7lSoIYYxlS/yaabkwZSOMmo1CISU2Xe03eVpE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697795985; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ohMjWKMRpG1GWosvpu/X6TGUf2yd76S0cNsV4OPOf64=; b=FoiRlqMTc7uDthlnz98Yjmju5XsIYBrIyiNp0Nhwbjbl1/6JP5R4oun5iDSRJUFQh7PKuQ Hiwm2tslRhi+aEWSHZr7sKT65wKdSiauI1ez36AE6vOzzVcPSSPc6wNNz0y3UrVM0HEMHL R1wUl1r5IJTgSEOQY/K69GFEaXMwpcg= Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-323-F_HhjiSCMuGTQCfBWes7NQ-1; Fri, 20 Oct 2023 05:59:21 -0400 X-MC-Unique: F_HhjiSCMuGTQCfBWes7NQ-1 Received: by mail-qv1-f71.google.com with SMTP id 6a1803df08f44-66d24cdf232so8459686d6.1 for ; Fri, 20 Oct 2023 02:59:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697795960; x=1698400760; h=mime-version:user-agent:message-id:in-reply-to:date:references :organization:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ohMjWKMRpG1GWosvpu/X6TGUf2yd76S0cNsV4OPOf64=; b=Er2LBZWzxjXIVl1EopM0/S3IOiM7zTIySp8eBzV97lHCLzlocwGp8Ju6x5QD19xbSY msX5TvD7Iz/5FB9675UbERf8+GygF+KXqHBLQnRoowWdzS1KmMbJVnIDJ556KHa4UuMk Ktd8rDrQPX5pRtUs7BK/7eZsgQMQHWa6Te0XcmL2RYeXKGzGNGZl0OwBJ4F+eRVdePn/ l1UiGeV3UbKvNu53EeAmU01qfmXsvBzeJGq6GELYbl3bESxIutjkmZl7FzMX/ToReeT5 uZrSLAlFLMZ1jEs5Zu6xechLySOnV9x8UozVAiiKBw3HFhNxP6CH65G32NHyeVTejlL6 aaVw== X-Gm-Message-State: AOJu0YwlPrWMEzDulYoihJlhe/xtV6qK+YsZa1kAXI00F/j2lNpkTsjw DDj1yP9lfkMRgTILh07pHEGOGLKvjHDBn9R3wjCXd0jusgy7suSPooyplP8GXVLmkBNx/g0xNuc cs4tKaQYEf/wEjr9RJmnp X-Received: by 2002:ad4:4ea4:0:b0:66d:299d:e4c with SMTP id ed4-20020ad44ea4000000b0066d299d0e4cmr1585391qvb.20.1697795959562; Fri, 20 Oct 2023 02:59:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGGe553ODPghpCK8qmaSGTrx6wMKNMOOFGQtkLPqelPum9I0vUkaE4KrD9MYjLh6d+kFUMN0Q== X-Received: by 2002:ad4:4ea4:0:b0:66d:299d:e4c with SMTP id ed4-20020ad44ea4000000b0066d299d0e4cmr1585358qvb.20.1697795958415; Fri, 20 Oct 2023 02:59:18 -0700 (PDT) Received: from localhost ([88.120.130.27]) by smtp.gmail.com with ESMTPSA id u12-20020a05621411ac00b0066d5220d860sm560674qvv.18.2023.10.20.02.59.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 02:59:17 -0700 (PDT) Received: by localhost (Postfix, from userid 1000) id 93C065077C49; Fri, 20 Oct 2023 11:59:14 +0200 (CEST) From: Dodji Seketeli To: Dodji Seketeli Cc: John Moon , Trilok Soni , Satya Durga Srinivasu Prabhala , libabigail@sourceware.org Subject: [PATCH 3/7, applied] ir,comparison,corpus: Better support anonymous enums comparison Organization: Red Hat / France References: <87cyx97h4j.fsf@redhat.com> X-Operating-System: AlmaLinux 9.2 X-URL: http://www.redhat.com Date: Fri, 20 Oct 2023 11:59:14 +0200 In-Reply-To: <87cyx97h4j.fsf@redhat.com> (Dodji Seketeli's message of "Fri, 20 Oct 2023 11:55:24 +0200") Message-ID: <87zg0d62dp.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libabigail-bounces+patchwork=sourceware.org@sourceware.org Hello, Anonymous enums are designated using their internal names which are automatically generated. The problem however is that whenever a new anonymous enum gets inserted in the translation unit, that can randomly change the name of existing anonymous enums. This makes reporting of changes in anonymous enums essentially useless. To address this issue, this patch uses flat representation for anonymous enums, for the purpose of designating them outside of the context of type canonicalization. This is like what is done already for anonymous classes and unions. * include/abg-fwd.h (get_enum_flat_representation) (get_class_or_enum_flat_representation): Declare new functions. * include/abg-ir.h (enum_type_decl::get_sorted_enumerators): Declare new member functions. * src/abg-comparison.cc (corpus_diff::priv::{ensure_lookup_tables_populated, added_unreachable_type_is_suppressed, deleted_unreachable_type_is_suppressed, record_type_as_reachable_from_public_interfaces}): Use non-internal pretty representation to designate ABI artifacts so that anonymous enums get designated by their flat representation. * src/abg-corpus.cc (corpus::type_is_reachable_from_public_interfaces): Likewise. * src/abg-ir.cc (get_type_name): The type name of an anonymous enum or class should is now the flat representation if we are not in the context of type canonicalization. (enum_type_decl::get_pretty_representation): If we are not in the context of type canonicalization, the pretty representation of an enum is its flat representation. (get_enum_flat_representation) (get_class_or_enum_flat_representation): Define new functions. (enum_type_decl::get_sorted_enumerators): Likewise. * tests/data/test-annotate/libtest23.so.abi: Adjust. * tests/data/test-annotate/test-anonymous-members-0.o.abi: Likewise. * tests/data/test-annotate/test15-pr18892.so.abi: Likewise. * tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi: Likewise. * tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi: Likewise. * tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi: Likewise. * tests/data/test-diff-dwarf/test43-PR22913-report-0.txt: Likewise. * tests/data/test-read-dwarf/PR22122-libftdc.so.abi: Likewise. * tests/data/test-read-dwarf/libtest23.so.abi: Likewise. * tests/data/test-read-dwarf/test-libandroid.so.abi: Likewise. * tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise. * tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi: Likewise. * tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi: Likewise. Signed-off-by: Dodji Seketeli Applied to master. --- include/abg-fwd.h | 27 + include/abg-ir.h | 3 + src/abg-comparison.cc | 10 +- src/abg-corpus.cc | 4 +- src/abg-ir.cc | 203 +- tests/data/test-annotate/libtest23.so.abi | 224 +- .../test-anonymous-members-0.o.abi | 22 +- .../data/test-annotate/test15-pr18892.so.abi | 8 +- ...st18-pr19037-libvtkRenderingLIC-6.1.so.abi | 54 +- ...19-pr19023-libtcmalloc_and_profiler.so.abi | 10 +- ...st20-pr19025-libvtkParallelCore-6.1.so.abi | 2 +- .../test43-PR22913-report-0.txt | 4 +- .../test-read-dwarf/PR22122-libftdc.so.abi | 12416 ++++++++-------- tests/data/test-read-dwarf/libtest23.so.abi | 216 +- .../test-read-dwarf/test-libandroid.so.abi | 44 +- .../test-read-dwarf/test16-pr18904.so.abi | 1816 +-- ...st18-pr19037-libvtkRenderingLIC-6.1.so.abi | 40 +- .../test22-pr19097-libstdc++.so.6.0.17.so.abi | 60 +- 18 files changed, 7637 insertions(+), 7526 deletions(-) diff --git a/include/abg-fwd.h b/include/abg-fwd.h index 0afb2122..e494de07 100644 --- a/include/abg-fwd.h +++ b/include/abg-fwd.h @@ -1097,6 +1097,33 @@ get_class_or_union_flat_representation(const class_or_union_sptr& cou, bool internal, bool qualified_name = true); +string +get_enum_flat_representation(const enum_type_decl& enum_type, + const string& indent, + bool one_line, + bool internal, + bool qualified_names); + +string +get_enum_flat_representation(const enum_type_decl* enum_type, + const string& indent, + bool one_line, + bool internal, + bool qualified_names); + +string +get_enum_flat_representation(const enum_type_decl_sptr& enum_type, + const string& indent, + bool one_line, + bool qualified_names); + +string +get_class_or_enum_flat_representation(const type_base& coe, + const string& indent, + bool one_line, + bool internal, + bool qualified_name); + string get_debug_representation(const type_or_decl_base*); diff --git a/include/abg-ir.h b/include/abg-ir.h index 5a9aed9a..3729e84a 100644 --- a/include/abg-ir.h +++ b/include/abg-ir.h @@ -2728,6 +2728,9 @@ public: const enumerators& get_enumerators() const; + const enumerators& + get_sorted_enumerators() const; + enumerators& get_enumerators(); diff --git a/src/abg-comparison.cc b/src/abg-comparison.cc index 16afd556..61fe89e0 100644 --- a/src/abg-comparison.cc +++ b/src/abg-comparison.cc @@ -9551,7 +9551,8 @@ corpus_diff::priv::ensure_lookup_tables_populated() if (!is_user_defined_type(t)) continue; - string repr = abigail::ir::get_pretty_representation(t, true); + string repr = + abigail::ir::get_pretty_representation(t, /*internal=*/false); deleted_unreachable_types_[repr] = t; } @@ -9573,7 +9574,8 @@ corpus_diff::priv::ensure_lookup_tables_populated() if (!is_user_defined_type(t)) continue; - string repr = abigail::ir::get_pretty_representation(t, true); + string repr = + abigail::ir::get_pretty_representation(t, /*internal=*/false); // Let's see if the inserted type we are looking at was // reported as deleted as well. @@ -9857,7 +9859,7 @@ corpus_diff::priv::added_unreachable_type_is_suppressed(const type_base *t)const if (!t) return false; - string repr = abigail::ir::get_pretty_representation(t, /*internal=*/true); + string repr = abigail::ir::get_pretty_representation(t, /*internal=*/false); string_type_base_sptr_map::const_iterator i = suppressed_added_unreachable_types_.find(repr); if (i == suppressed_added_unreachable_types_.end()) @@ -9879,7 +9881,7 @@ corpus_diff::priv::deleted_unreachable_type_is_suppressed(const type_base *t) co if (!t) return false; - string repr = abigail::ir::get_pretty_representation(t, /*internal=*/true); + string repr = abigail::ir::get_pretty_representation(t, /*internal=*/false); string_type_base_sptr_map::const_iterator i = suppressed_deleted_unreachable_types_.find(repr); if (i == suppressed_deleted_unreachable_types_.end()) diff --git a/src/abg-corpus.cc b/src/abg-corpus.cc index 7cf2d11d..4a4cb8bc 100644 --- a/src/abg-corpus.cc +++ b/src/abg-corpus.cc @@ -774,7 +774,7 @@ corpus::recording_types_reachable_from_public_interface_supported() void corpus::record_type_as_reachable_from_public_interfaces(const type_base& t) { - string repr = get_pretty_representation(&t, /*internal=*/true); + string repr = get_pretty_representation(&t, /*internal=*/false); interned_string s = t.get_environment().intern(repr); priv_->get_public_types_pretty_representations()->insert(s); } @@ -792,7 +792,7 @@ corpus::record_type_as_reachable_from_public_interfaces(const type_base& t) bool corpus::type_is_reachable_from_public_interfaces(const type_base& t) const { - string repr = get_pretty_representation(&t, /*internal=*/true); + string repr = get_pretty_representation(&t, /*internal=*/false); interned_string s = t.get_environment().intern(repr); return (priv_->get_public_types_pretty_representations()->find(s) diff --git a/src/abg-ir.cc b/src/abg-ir.cc index fc3437d6..06dfbe20 100644 --- a/src/abg-ir.cc +++ b/src/abg-ir.cc @@ -8845,6 +8845,8 @@ get_type_name(const type_base* t, bool qualified, bool internal) return fn_type->get_cached_name(internal); } + const environment&env = d->get_environment(); + // All anonymous types of a given kind get to have the same internal // name for internal purpose. This to allow them to be compared // among themselves during type canonicalization. @@ -8863,10 +8865,18 @@ get_type_name(const type_base* t, bool qualified, bool internal) if (qualified) return d->get_qualified_name(internal); - const environment&env = d->get_environment(); return env.intern(get_internal_integral_type_name(t)); } + if (d->get_is_anonymous()) + { + if (is_class_or_union_type(t) || is_enum_type(t)) + return env.intern + (get_class_or_enum_flat_representation (*t, "", + /*one_line=*/true, + internal, qualified)); + } + if (qualified) return d->get_qualified_name(internal); return d->get_name(); @@ -9563,6 +9573,165 @@ get_class_or_union_flat_representation(const class_or_union_sptr& cou, internal, qualified_names);} +/// Get the flat representation of an instance of @ref enum_type_decl +/// type. +/// +/// The flat representation of a given @ref enum_type_decl type is the +/// actual definition of the type, for instance: +/// +/// enum {E_0 =0, E_1 = 1} +/// +///@param enum_type the enum type to consider. +/// +///@param indent the identation spaces to use in the representation. +/// +///@param one_line if true, then the flat representation stands on one +///line. Otherwise, it stands on multiple lines. +/// +///@param qualified_names use qualified names when applicable. +///Typically, if this is true, the name of the enum is going to be +///qualified. +/// +///@return the resulting flat representation. +string +get_enum_flat_representation(const enum_type_decl& enum_type, + const string& indent, bool one_line, + bool qualified_names) +{ + string repr; + std::ostringstream o; + string local_indent = " "; + + repr = indent + "enum "; + + if (!enum_type.get_is_anonymous()) + o << (qualified_names + ? enum_type.get_qualified_name() + : enum_type.get_name()) + " "; + + o << "{"; + + if (!one_line) + o << "\n"; + + for (const auto &enumerator : enum_type.get_sorted_enumerators()) + { + if (!one_line) + o << "\n" + indent; + + o << enumerator.get_name() + "=" << enumerator.get_value() << ", "; + } + + if (!one_line) + o << "\n" + indent << "}"; + else + o << "}"; + + repr =o.str(); + + return repr; +} + +/// Get the flat representation of an instance of @ref enum_type_decl +/// type. +/// +/// The flat representation of a given @ref enum_type_decl type is the +/// actual definition of the type, for instance: +/// +/// enum {E_0 =0, E_1 = 1} +/// +///@param enum_type the enum type to consider. +/// +///@param indent the identation spaces to use in the representation. +/// +///@param one_line if true, then the flat representation stands on one +///line. Otherwise, it stands on multiple lines. +/// +///@param qualified_names use qualified names when applicable. +///Typically, if this is true, the name of the enum is going to be +///qualified. +/// +///@return the resulting flat representation. +string +get_enum_flat_representation(const enum_type_decl* enum_type, + const string& indent, bool one_line, + bool qualified_names) +{ + if (!enum_type) + return ""; + + return get_enum_flat_representation(*enum_type, indent, + one_line, qualified_names); +} + +/// Get the flat representation of an instance of @ref enum_type_decl +/// type. +/// +/// The flat representation of a given @ref enum_type_decl type is the +/// actual definition of the type, for instance: +/// +/// enum {E_0 =0, E_1 = 1} +/// +///@param enum_type the enum type to consider. +/// +///@param indent the identation spaces to use in the representation. +/// +///@param one_line if true, then the flat representation stands on one +///line. Otherwise, it stands on multiple lines. +/// +///@param qualified_names use qualified names when applicable. +///Typically, if this is true, the name of the enum is going to be +///qualified. +/// +///@return the resulting flat representation. +string +get_enum_flat_representation(const enum_type_decl_sptr& enum_type, + const string& indent, bool one_line, + bool qualified_names) +{ + return get_enum_flat_representation(enum_type.get(), + indent, one_line, + qualified_names); +} + +/// Get the flat representation of an instance of @ref enum_type_decl +/// type. +/// +/// The flat representation of a given @ref enum_type_decl type is the +/// actual definition of the type, for instance: +/// +/// enum {E_0 =0, E_1 = 1} +/// +///@param enum_type the enum type to consider. +/// +///@param indent the identation spaces to use in the representation. +/// +///@param one_line if true, then the flat representation stands on one +///line. Otherwise, it stands on multiple lines. +/// +///@param qualified_names use qualified names when applicable. +///Typically, if this is true, the name of the enum is going to be +///qualified. +/// +///@return the resulting flat representation. +string +get_class_or_enum_flat_representation(const type_base& coe, + const string& indent, + bool one_line, + bool internal, + bool qualified_name) + +{ + string repr; + if (const class_or_union* cou = is_class_or_union_type(&coe)) + repr = get_class_or_union_flat_representation(cou, indent, one_line, + internal, qualified_name); + else if (const enum_type_decl* enom = is_enum_type(&coe)) + repr = get_enum_flat_representation(*enom, indent, one_line, qualified_name); + + return repr; +} + /// Get the textual representation of a type for debugging purposes. /// /// If the type is a class/union, this shows the data members, virtual @@ -18578,6 +18747,7 @@ class enum_type_decl::priv { type_base_sptr underlying_type_; enumerators enumerators_; + mutable enumerators sorted_enumerators_; friend class enum_type_decl; @@ -18643,6 +18813,33 @@ enum_type_decl::enumerators& enum_type_decl::get_enumerators() {return priv_->enumerators_;} +/// Get the lexicographically sorted vector of enumerators. +/// +/// @return the lexicographically sorted vector of enumerators. +const enum_type_decl::enumerators& +enum_type_decl::get_sorted_enumerators() const +{ + if (priv_->sorted_enumerators_.empty()) + { + for (auto e = get_enumerators().rbegin(); + e != get_enumerators().rend(); + ++e) + priv_->sorted_enumerators_.push_back(*e); + + std::sort(priv_->sorted_enumerators_.begin(), + priv_->sorted_enumerators_.end(), + [](enum_type_decl::enumerator& l, + enum_type_decl::enumerator& r) + { + if (l.get_name() == r.get_name()) + return l.get_value() < r.get_value(); + return (l.get_name() < r.get_name()); + }); + } + + return priv_->sorted_enumerators_; +} + /// Get the pretty representation of the current instance of @ref /// enum_type_decl. /// @@ -18668,6 +18865,10 @@ enum_type_decl::get_pretty_representation(bool internal, if (internal && get_is_anonymous()) r += get_type_name(this, qualified_name, /*internal=*/true); + else if (get_is_anonymous()) + r += get_enum_flat_representation(*this, "", + /*one_line=*/true, + qualified_name); else r += decl_base::get_pretty_representation(internal, qualified_name); diff --git a/tests/data/test-annotate/libtest23.so.abi b/tests/data/test-annotate/libtest23.so.abi index dcbf8edc..6ca5c79d 100644 --- a/tests/data/test-annotate/libtest23.so.abi +++ b/tests/data/test-annotate/libtest23.so.abi @@ -137,54 +137,54 @@ - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + @@ -201,7 +201,7 @@ - + @@ -209,11 +209,11 @@ - + - + @@ -235,12 +235,12 @@ - + - + @@ -263,7 +263,7 @@ - + @@ -311,7 +311,7 @@ - + @@ -321,7 +321,7 @@ - + @@ -330,7 +330,7 @@ - + @@ -341,9 +341,9 @@ - + - + @@ -352,13 +352,13 @@ - + - + - + - + @@ -367,13 +367,13 @@ - + - + - + - + @@ -384,11 +384,11 @@ - + - + @@ -399,7 +399,7 @@ - + @@ -412,9 +412,9 @@ - + - + @@ -427,7 +427,7 @@ - + @@ -467,7 +467,7 @@ - + @@ -491,12 +491,12 @@ - + - + - - + + @@ -505,7 +505,7 @@ - + @@ -514,7 +514,7 @@ - + @@ -525,7 +525,7 @@ - + @@ -534,7 +534,7 @@ - + @@ -543,18 +543,18 @@ - + - + - + - + @@ -563,9 +563,9 @@ - + - + @@ -574,7 +574,7 @@ - + @@ -583,18 +583,18 @@ - + - + - + - + @@ -603,7 +603,7 @@ - + @@ -612,16 +612,16 @@ - + - + - + @@ -632,7 +632,7 @@ - + @@ -643,7 +643,7 @@ - + @@ -677,7 +677,7 @@ - + @@ -690,18 +690,18 @@ - + - + - + @@ -712,7 +712,7 @@ - + @@ -721,31 +721,31 @@ - + - + - + - + - + - + @@ -754,7 +754,7 @@ - + @@ -763,7 +763,7 @@ - + @@ -772,7 +772,7 @@ - + @@ -783,7 +783,7 @@ - + @@ -794,7 +794,7 @@ - + @@ -805,7 +805,7 @@ - + @@ -827,7 +827,7 @@ - + @@ -835,7 +835,7 @@ - + @@ -847,7 +847,7 @@ - + @@ -857,7 +857,7 @@ - + @@ -866,7 +866,7 @@ - + @@ -879,7 +879,7 @@ - + @@ -890,7 +890,7 @@ - + @@ -898,7 +898,7 @@ - + @@ -906,9 +906,9 @@ - + - + @@ -918,7 +918,7 @@ - + @@ -927,7 +927,7 @@ - + @@ -936,9 +936,9 @@ - + - + @@ -1002,7 +1002,7 @@ - + @@ -1024,9 +1024,9 @@ - + - + @@ -1080,9 +1080,9 @@ - + - + diff --git a/tests/data/test-annotate/test-anonymous-members-0.o.abi b/tests/data/test-annotate/test-anonymous-members-0.o.abi index e272d213..d75e67ee 100644 --- a/tests/data/test-annotate/test-anonymous-members-0.o.abi +++ b/tests/data/test-annotate/test-anonymous-members-0.o.abi @@ -13,15 +13,15 @@ - - + + - - + + - + @@ -29,11 +29,11 @@ - - + + - - + + @@ -103,7 +103,7 @@ - + @@ -111,7 +111,7 @@ - + diff --git a/tests/data/test-annotate/test15-pr18892.so.abi b/tests/data/test-annotate/test15-pr18892.so.abi index d3616699..b749a0a6 100644 --- a/tests/data/test-annotate/test15-pr18892.so.abi +++ b/tests/data/test-annotate/test15-pr18892.so.abi @@ -10883,7 +10883,7 @@ - + @@ -35469,7 +35469,7 @@ - + @@ -35517,9 +35517,9 @@ - + - + diff --git a/tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi b/tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi index 0a6893b4..adff58f8 100644 --- a/tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi +++ b/tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi @@ -8146,7 +8146,7 @@ - + @@ -12813,7 +12813,7 @@ - + @@ -21260,18 +21260,8 @@ - - - - - - - - - - - - + + @@ -21279,6 +21269,16 @@ + + + + + + + + + + @@ -24118,18 +24118,8 @@ - - - - - - - - - - - - + + @@ -24137,6 +24127,16 @@ + + + + + + + + + + @@ -27487,7 +27487,7 @@ - + diff --git a/tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi b/tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi index ea12beac..97490f59 100644 --- a/tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi +++ b/tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi @@ -20183,7 +20183,7 @@ - + @@ -25068,21 +25068,21 @@ - + - + - + @@ -32572,7 +32572,7 @@ - + diff --git a/tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi b/tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi index 4b4166bf..3de32474 100644 --- a/tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi +++ b/tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi @@ -21731,7 +21731,7 @@ - + diff --git a/tests/data/test-diff-dwarf/test43-PR22913-report-0.txt b/tests/data/test-diff-dwarf/test43-PR22913-report-0.txt index fc35f21d..d0515c69 100644 --- a/tests/data/test-diff-dwarf/test43-PR22913-report-0.txt +++ b/tests/data/test-diff-dwarf/test43-PR22913-report-0.txt @@ -4,8 +4,8 @@ Variables changes summary: 0 Removed, 0 Changed, 0 Added variable 1 function with some indirect sub-type change: [C] 'function char f1(Struct1Ptr)' has some indirect sub-type changes: - parameter 1 of type 'typedef Struct1Ptr' has sub-type changes: - underlying type '__anonymous_struct__1*' changed: + parameter 1 of type 'typedef Struct1Ptr' changed: + underlying type 'struct {char m1; char m2;}*' changed: in pointed to type 'struct {char m1; char m2;}': type size changed from 16 to 8 (in bits) 1 data member deletion: diff --git a/tests/data/test-read-dwarf/PR22122-libftdc.so.abi b/tests/data/test-read-dwarf/PR22122-libftdc.so.abi index a1f8778c..501658df 100644 --- a/tests/data/test-read-dwarf/PR22122-libftdc.so.abi +++ b/tests/data/test-read-dwarf/PR22122-libftdc.so.abi @@ -357,136 +357,133 @@ - - - - - + + + + + - - - - + + - - - + + - - - + + - - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + - + - - + + - - + + - + - + - + - + - + - + - + - + - + - + @@ -494,105 +491,105 @@ - + - + - + - + - + - + - + - + - - + + - + - + - + - + - + - + - + - + @@ -600,91 +597,91 @@ - + - + - + - + - + - + - + - + - + - - - - + + + + - + - + - + - + - + - - - + + + - + @@ -692,96 +689,96 @@ - + - + - - + + - + - + - + - - + + - + - + - + - + - + - + - - + + - + - + - + - - - + + + - - - - + + + + - - - + + + - + - + - - - + + + - + @@ -790,7 +787,7 @@ - + @@ -800,90 +797,90 @@ - + - - + + - + - + - + - + - + - + - + - + - + - + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - + - - - - + + + + @@ -891,13 +888,13 @@ - + - + @@ -915,26 +912,26 @@ - + - + - - + + - + @@ -946,19 +943,19 @@ - + - + - + @@ -970,90 +967,90 @@ - - + + - - + + - + - + - + - - + + - + - - + + - - - + + + - - + + - + - - + + - - + + @@ -1061,8 +1058,8 @@ - - + + @@ -1070,8 +1067,8 @@ - - + + @@ -1079,29 +1076,29 @@ - + - - + + - - + + - - + + @@ -1109,14 +1106,14 @@ - + - - + + @@ -1124,8 +1121,8 @@ - - + + @@ -1133,8 +1130,8 @@ - - + + @@ -1142,7 +1139,7 @@ - + @@ -1150,246 +1147,246 @@ - + - - + + - - + + - + - - + + - + - + - + - - + + - + - + - - + + - + - + - - + + - - - + + + - - + + - - + + - - + + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - - + + - + - + - - + + - + - + - + - + - + - + - + @@ -1528,7 +1525,7 @@ - + @@ -1653,14 +1650,14 @@ - + - + @@ -1678,7 +1675,7 @@ - + @@ -1692,7 +1689,7 @@ - + @@ -1704,7 +1701,7 @@ - + @@ -1762,28 +1759,28 @@ - + - + - + - + - + - - + + - + @@ -1795,15 +1792,15 @@ - + - + - + @@ -1814,11 +1811,11 @@ - + - + @@ -1876,34 +1873,34 @@ - - + + - + - - + + - + - + - + - - + + - + - + @@ -2310,7 +2307,7 @@ - + @@ -2956,12 +2953,12 @@ - - + + - + @@ -2969,133 +2966,133 @@ - + - + - + - + - + - + - + - + - + - + - - - + + + - - - - + + + + - + - + - + - + - - + + - + - - + + - + - - - + + + - - + + - + - + - - + + - + - + - - + + - + - + - + @@ -3103,499 +3100,489 @@ - - + + - + - + - + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - - - + + + - - - + + + - + - + - + - + - + - + - + - + - + - + - - - + + + - - - + + + - - - + + + - - + + - + - + - + - + - + - + - + - + - + - + - - + + - + - + - + - - + + - - + + - + - + - + - - + + - + - + - - + + - - - + + + - + - + - - + + - - - + + + - - - + + + - + - + - - - + + + - - + + - + - - - - - + + + + + + + - - - - - + + + + + - + - - - - + + + + - - + + - - - - - - - - + + + + - - - - - - - - - - - - + + + + + + + + + - + - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + - - + + - + - + - + - + - - - + + + - - + + - + - - + + - - + + - + - + @@ -3603,429 +3590,429 @@ - - - + + + - + - - - - + + + + - - - - + + + + - + - - + + - + - + - + - + - + - - + + - - - + + + - + - - + + - + - - + + - + - - - - + + + + - + - + - + - + - - + + - - + + - - + + - + - + - + - + - - + + - + - + - + - + - - - + + + - - - + + + - + - - - + + + - - - + + + - + - - - - + + + + - - - - + + + + - + - - - + + + - + - - - + + + - - - - + + + + - - - - + + + + - - - + + + - + - - - + + + - + - - - + + + - + - + - + - + - - + + - + - + - - - - + + + + - + - - - + + + - + - + - + - - - - + + + + - + - + - - + + - + - + - - - + + + - + - - - - + + + + - + - - - + + + - + - - + + - - - + + + - - + + - + - + - - - - + + + + - + - - + + - - + + - + - + - - + + - + - + - + - + @@ -4035,384 +4022,384 @@ - + - - + + - - + + - - + + - + - - + + - - + + - + - + - + - - + + - + - + - + - - + + - - + + - + - + - + - + - + - + - + - + - + - + - - + + - + - + - - + + - + - + - + - + - + - + - - - + + + - - - + + + - + - - + + - - + + - + - + - - - + + + - - - + + + - - + + - + - - + + - - + + - + - + - - + + - + - - + + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - - - + + + - + - - + + - + - + - + - + - - + + - - - + + + - + - + - + - + - + - + - - - + + + - + - + - - + + - + - + - + @@ -4420,566 +4407,535 @@ - - + + - + - + - + - + - + - + - + - - + + - + - - + + - + - + - + - - + + - + - + - + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - + - + - + - - + + - + - + - - + + - + - - + + - - + + - + - + - - + + - + - - + + - + - - + + - + - - + + - - + + - + - - + + - - + + - + - - + + - - - + + + - + - - - + + + - - + + - - - + + + - - - + + + - - + + - + - - - + + + - - - + + + - + - - + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + - - - - - - + + + + - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + - - - - - + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + - - + + - - - - - + + + + + - - - + + + - + - + - + - + - - + + - + - - + + - - + + - - - + + + - - - + + + - + - + - + - + - + - + - - - + + + - - - + + + - + - + - - + + - + @@ -4987,963 +4943,963 @@ - + - + - - + + - - - - + + + + - - - + + + - + - - - - + + + + - - - - + + + + - - - + + + - - - + + + - + - + - + - + - - - + + + - + - - - + + + - + - - - + + + - - - + + + - + - - - + + + - - - + + + - + - - - - + + + + - - - + + + - + - - - + + + - + - + - + - + - - - - + + + + - + - - - - + + + + - + - + - + - - - + + + - + - + - - + + - + - + - + - + - + - + - + - - + + - + - + - - - + + + - - - + + + - + - - - + + + - - - + + + - + - - - - + + + + - - - + + + - + - - - - - + + + + + - - - + + + - + - - + + - + - + - + - - + + - - + + - + - + - + - + - + - + - + - + - + - - - + + + - - - + + + - - - + + + - - + + - + - + - - + + - + - - - + + + - - + + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - - + + - + - + - + - + - + - + - + - - + + - + - - + + - - + + - + - + - - - + + + - - - + + + - + - + - + - + - - + + - - + + - - + + - + - + - - + + - - - + + + - - - + + + - - - + + + - + - + - - + + - - - + + + - + - + - - + + - + - + - - - - - + + + + + - + - + - + - + - - - + + + - - - + + + - - - + + + - - + + - - - + + + - + - - - + + + - - - + + + - + - + - - + + - - - + + + - - - + + + - + - - - + + + - - - - + + + + - - - - + + + + - - + + - - + + - - + + - + - - + + - + - - + + - + - + - + - + - + - + - - + + - + - - - + + + - + - - + + - + - + - + - + - + - + - - + + - + - + - - + + - + - + - - + + - + - + - - + + @@ -5952,1659 +5908,1629 @@ - - + + - + - - + + - + - - + + - + - - + + - + - - - + + + - - - + + + - - - + + + - + - - - + + + - + - + - - - + + + - - + + - + - + - - + + - - + + - + - + - + - - + + - - + + - - + + - - - + + + - + - - - + + + - - + + - - - + + + - + - - + + - + - - + + - - - + + + - + - + - - + + - - + + - + - + - - + + - - + + - - - + + + - + - + - + - - - + + + - - - + + + - + - + - - - + + + - - - + + + - - + + - + - + - + - - + + - - + + - - - + + + - - + + - - - + + + - - - + + + - + - + - - + + - - + + - - - + + + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - - + + - - + + - - + + - - + + - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + - - - - - - - - + + + + + - - - + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - + - + - + - + - - - - + + + + - - + + - - + + - + - - + + - + - + - - + + - + - - - + + + - - + + - + - - + + - + - - - + + + - - - + + + - - - + + + - - - + + + - + - - + + - - + + - - - - - - + + + + + + - - - + + + - + - - - - + + + + - + - + - + - + - - + + - + - - + + - + - - - - + + + + - - - + + + - - - - + + + + - - + + - + - - - + + + - - - + + + - + - - + + - - + + - + - - + + - - + + - + - - + + - - + + - + - - - - + + + + - - - - + + + + - + - + - - + + - - - + + + - - + + - - + + - + - + - + - + - - + + - - + + - - - + + + - - - + + + - - - + + + - - + + - - + + - + - + - - - + + + - - - + + + - + - + - - - + + + - - + + - + - - - - - + + + + + - - + + - + - - - - - + + + + + - + - - - - + + + + - - + + - - + + - - + + - - + + - - - + + + - + - - + + - - - + + + - - + + - + - - + + - - - + + + - + - + - + - - - + + + - - + + - + - + - - + + - - - + + + - - + + - + - + - - + + - - - + + + - + - - - + + + - - - + + + - + - - + + - + - - + + - + - - - + + + - + - - - + + + - + - - - + + + - - - + + + - + - - - + + + - - - - + + + + - - - - + + + + - - - + + + - + - + - - - + + + - - - + + + - - - + + + - - + + - - + + - + - + - + - + - - + + - + - + - + - - - - + + + + - - - + + + - + - - + + - + - - - + + + - + - + - + - - + + - + - - + + - + - + - + - - - + + + - + - - - - + + + + - + - - - + + + - + - + - - + + - - + + - - + + - + - + - - + + - + - + - + - + - - + + - - + + - + - + - - - - + + + + - - - + + + - + - + - - - + + + - - - + + + - - - + + + - + - + - - + + - + - + - - - + + + - - - + + + - - - + + + - + - + - + - + - - - + + + - - - + + + - - - + + + - - + + - - + + - - + + - - + + - + - + - - + + - + - - - + + + - + - - + + - - + + - - + + - - + + - + - + - - + + - + - + - + @@ -7612,724 +7538,713 @@ - - + + - + - + - + - + - - - + + + - + - + - + - - + + - - + + - - - + + + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - - - + + + - - - + + + - + - + - + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - + - + - + - - - + + + - + - + - + - - - + + + - - - + + + - - - + + + - + - + - + - - + + - + - - + + - - + + - - + + - + - + - - - + + + - - - + + + - + - - - + + + - + - - - + + + - - - + + + - + - + - - + + - - - + + + - - - + + + - - + + - + - - - + + + - + - - + + - + - + - - - + + + - - + + - - + + - + - + - - - + + + - + - + - + - + - - - + + + - - - + + + - - + + - - + + - - - + + + - + - + - + - + - - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - + + + - + - + - - + + - + - + - - + + - + - + - + - - - + + + - + - + - - + + - + - + - + - + - - + + - - + + - + - + - - + + - - - + + + - + - - - + + + - - + + - - + + - - - + + + - - - + + + - - + + - + - + - - - + + + - + - + - + @@ -8337,1252 +8252,1298 @@ - - - + + + - - - + + + - + - - - - + + + + - - - - + + + + - + - + - + - + - - - - + + + + - - - - + + + + - + - - - + + + - + - - + + - + - + - + - - + + - + - - + + - + - + - - + + - + - + - + - + - - + + - - + + - + - + - + - + - + - + - + - - + + - - - + + + - + - + - - + + - + - + - + - + - + - - + + - - - + + + - - + + - - + + - + - + - + - + - - - + + + - + - - - + + + - + - + - + - - + + - + - - + + - + - + - + - - + + - - + + - + - + - + - - - - + + + + - + - - + + - - - - + + + + - - + + - + - + - + - + - + - - - + + + - - - + + + - - + + - + - + - + - + - + - + - + - - - + + + - - - + + + - + - - - + + + - - + + - - - + + + - - + + - - - + + + - - - + + + - - + + - + - + - + - - + + - - - + + + - - - + + + - - + + - - + + - - + + - + - + - - + + - - - + + + - + - - + + - - - + + + - - + + - - - + + + - - + + - + - + - - + + - + - - - + + + - + - - + + - + - + - + - - + + - - - + + + - - - + + + - - - + + + - + - - - + + + - - + + - + - - - + + + - + - + - - + + - - + + - + - - + + - - - + + + - - - + + + - + - - + + - - - + + + - + - - + + - + - + - - - + + + - + - - + + - + - + - - - + + + - + - + - + - - - + + + - + - + - + - - - + + + - + - - + + - + - + - - + + - + - - - + + + - + - - - + + + - + - - - + + + - + - + - + - - - + + + - + - - - + + + - - + + - + - - + + - + - + - - + + - - - + + + - + - + - - + + - - + + - + - - + + - - - + + + - - - + + + - - + + - - - + + + - + - + - + - - + + - - + + - - + + - - - + + + - + - + - - + + - - + + - + - + - + - + - - + + - - - + + + - - - + + + - + - + - - + + - - + + - - - + + + - + - + - + - - + + - - + + - - - + + + - - + + - - - + + + - - - + + + - + - - + + - - + + - - - + + + - + - + - + - - + + - - + + - - + + - - + + - - - + + + - + - - + + - + - + - + - + - + - + - + - + - + - + - - + + - - + + - - + + - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + @@ -9592,278 +9553,212 @@ - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - + - - - - + + + - - - + + - - - + + - - - - - + + + - - - - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + - + - - + + - + - - + + - - + + - - + + - - - - - - - - + + + + + + + + - + - + - + - + - - + + - - + + - - - + + + - - + + - - + + - - + + - + - + @@ -9871,170 +9766,170 @@ - - - + + + - + - - + + - - - + + + - + - - - - + + + + - + - + - - + + - + - - + + - + - - + + - - + + - + - - + + - + - - + + - - + + - + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - - - + + + - - + + - + - - + + - + - + @@ -10042,861 +9937,861 @@ - - - + + + - + - - - - - + + + + + - - - + + + - + - + - + - + - - - + + + - + - - - - + + + + - - - + + + - + - + - - + + - + - - + + - - + + - + - - + + - + - + - + - + - + - - + + - + - - - - + + + + - + - + - + - + - - + + - + - - + + - - + + - + - - + + - + - + - + - + - + - - + + - + - - - - + + + + - + - + - +