From patchwork Wed Jun 10 11:59:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giuliano Procida X-Patchwork-Id: 39549 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 511B0386EC42; Wed, 10 Jun 2020 11:59:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 511B0386EC42 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1591790392; bh=3KwIh7u9jSd1yMuNMGrcyP9h+r1hayyIxisx2GV7Puw=; h=Date:In-Reply-To:References:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Help:List-Subscribe:From:Reply-To:Cc:From; b=qVir5dYrnza7ykjiaIkkkf+csgw5hW8aOVsBh++5xJVpt/kbV0cTtkvYmWOoPc/TE uSwgi79F2iVJrjsuUFMOdT+xHqvlaogLYBDo+JXXKB6PQel6A6MRA0hJqgBmeE3ARd 22EdFQrct4Njo0NixaHInY1pYprc+lq+RnWBlS3I= X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from mail-qt1-x849.google.com (mail-qt1-x849.google.com [IPv6:2607:f8b0:4864:20::849]) by sourceware.org (Postfix) with ESMTPS id 352D03851C11 for ; Wed, 10 Jun 2020 11:59:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 352D03851C11 Received: by mail-qt1-x849.google.com with SMTP id u48so1601664qth.17 for ; Wed, 10 Jun 2020 04:59:50 -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; bh=3KwIh7u9jSd1yMuNMGrcyP9h+r1hayyIxisx2GV7Puw=; b=Yut2mRlhnvATGh9Dg5DuwBwq9vLdo1Surv5yF00sQuYNfBhoidIKwlK/heuJISVSfq 6sPJt5ArVwqPnpz2PwOfhRvv4ECYbniPLabugF51VO6Xtcz9N5hl5N/giB4iVdCvR0Rq 5epCPj++RmZH8eyyfCTe0nRF0aYoFpe0POBKHXwlwUf2JJsnoFD5l3pLxD/z61VKgs+7 Rz/8iof2PRapWSURMjQhGC1EOwST0FYdomeUfkfvPiX2MiujCkVx+ZD3BAsUoBQrKtJP eLlPoH3Qo6o4OMdQpOBVluKWb/e/w8WZ2IAFBYMYaSDqJsmx6Ext/Q8aRGkmqL6YAXsC 6NHw== X-Gm-Message-State: AOAM530xmamhA4oX2QPBvuXjSP1aaQBw9736Sv9J/gPAfXVJ5T5MDIAJ l3hR3/CjLZqiV03MSeSrAJ3T4HH2OWKKz2ybdQR7pEmxBTSJBBgURT/nnYRd+s/jvtbjG5J51pI 8WCJHG57yBhX8rf+XvASLRSAVM2WxvXB5sBRliarwCVcPK/G4ohHGrbtwrDdhWO2qV2OpvkQ= X-Google-Smtp-Source: ABdhPJzfs/agMLO09UhecatT7CJfU7/Oxoi5FdBDidozs8G3L1MwK8mbG9u5fvZFjV251Kn/cM1qy5KxBXc5xg== X-Received: by 2002:ad4:5511:: with SMTP id az17mr2735069qvb.146.1591790389741; Wed, 10 Jun 2020 04:59:49 -0700 (PDT) Date: Wed, 10 Jun 2020 12:59:32 +0100 In-Reply-To: <20200610115940.26035-1-gprocida@google.com> Message-Id: <20200610115940.26035-4-gprocida@google.com> Mime-Version: 1.0 References: <20200610115940.26035-1-gprocida@google.com> X-Mailer: git-send-email 2.27.0.278.ge193c7cf3a9-goog Subject: [PATCH 03/11] Refactor d.context() as ctxt in report(enum_diff). To: libabigail@sourceware.org X-Spam-Status: No, score=-23.2 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, 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: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-Patchwork-Original-From: Giuliano Procida via Libabigail From: Giuliano Procida Reply-To: Giuliano Procida Cc: kernel-team@android.com, gprocida@google.com Errors-To: libabigail-bounces@sourceware.org Sender: "Libabigail" * src/abg-default-reporter.cc (report): In the enum_diff overload, introduce the name ctxt to replace four occurrences of d.context(). Signed-off-by: Giuliano Procida --- src/abg-default-reporter.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/abg-default-reporter.cc b/src/abg-default-reporter.cc index 7c98d8d7..42851346 100644 --- a/src/abg-default-reporter.cc +++ b/src/abg-default-reporter.cc @@ -98,9 +98,10 @@ default_reporter::report(const enum_diff& d, ostream& out, enum_type_decl_sptr first = d.first_enum(), second = d.second_enum(); - report_name_size_and_alignment_changes(first, second, d.context(), + const diff_context_sptr& ctxt = d.context(); + report_name_size_and_alignment_changes(first, second, ctxt, out, indent); - maybe_report_diff_for_member(first, second, d.context(), out, indent); + maybe_report_diff_for_member(first, second, ctxt, out, indent); //underlying type d.underlying_type_diff()->report(out, indent); @@ -165,12 +166,12 @@ default_reporter::report(const enum_diff& d, ostream& out, << "' from value '" << i->first.get_value() << "' to '" << i->second.get_value() << "'"; - report_loc_info(second, *d.context(), out); + report_loc_info(second, *ctxt, out); out << "\n"; } } - if (d.context()->show_leaf_changes_only()) + if (ctxt->show_leaf_changes_only()) maybe_report_interfaces_impacted_by_diff(&d, out, indent); d.reported_once(true);