From patchwork Wed Jun 10 11:59:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giuliano Procida X-Patchwork-Id: 39548 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 0B6F4386EC42; Wed, 10 Jun 2020 11:59:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0B6F4386EC42 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1591790391; bh=Nc/ivmDPmQ8ca/XA6rcwgvk8cbp8a1/vzaUhuJJ7sYY=; h=Date:In-Reply-To:References:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Help:List-Subscribe:From:Reply-To:Cc:From; b=i8E0iaDun6cg65LWWiAUCou1sv41kbnw6GHevLe5DzcK+rN9iYH3FmQCa0f8V1Cw5 9u4F/GiY9wtyE5nLWbxE+LB6CU00/+RPv7fkH+RrkTqZX3/61rvsSkhQnFFnMPWN+2 wJ19nZjS1NpxknD2fC9PpOKjWCS7gANcsBRP3838= X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from mail-qk1-x74a.google.com (mail-qk1-x74a.google.com [IPv6:2607:f8b0:4864:20::74a]) by sourceware.org (Postfix) with ESMTPS id 19FF9386EC42 for ; Wed, 10 Jun 2020 11:59:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 19FF9386EC42 Received: by mail-qk1-x74a.google.com with SMTP id 140so1751817qko.23 for ; Wed, 10 Jun 2020 04:59:48 -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=Nc/ivmDPmQ8ca/XA6rcwgvk8cbp8a1/vzaUhuJJ7sYY=; b=Ma/0946jNy72Hz37M3rMG3hlSZsVdaYF4KXTFF8fc+LhGUtudmcMK+7NmLMLtbCUGy tS8/GgIMUC8qI616M9AK5HsAI4Zj2qa/LtZjZtTT49FVjK1yATuBoHbtKybLrL2FlQ7B XgtkoQI4ayG1IVcSNMe5b6cOyEnYHIjc3hS1soHxQV/XZ4zEKrG1E9IVX8dHOVUI20PR pYUSQLRDElsqP43EWXvhVp6NKi6GAZrOi9WfEbqrVm0VbMPei6UqRb/+8/t0KiFA/jI1 Xyn1xf+FP9vARq/RUS0+KS9qs/2G9nHe+NFdnH1OXouwLrKmjaaCIOAFXpyFxoXF5aI4 m2eQ== X-Gm-Message-State: AOAM533sQ5qXfuhPVWFcxmX6cb3foeC100elqLaeiCk/dld1yGnM3F4t YLfs4CzahPG2+Z7w7aauhv7dEKbnhw+DjoxJ14cH/l74jIaLyvZ77cYqyUtgikBicjSdD+LZVMZ bu9wtN+Qsrv/bB6mHU/T97/g4+UZXpx7/1Dd6F1uVQB5L2aR3DUL18ejGXkHSFh1ToE+t8zQ= X-Google-Smtp-Source: ABdhPJxsol7eAfy0h21a99eaooCT/foa8MDMCC6T7GTFD/YR1G2xrJw9hbAmRlChcMtJjIg+I2OrBjAdOiBZFQ== X-Received: by 2002:ad4:48c8:: with SMTP id v8mr2764957qvx.15.1591790387565; Wed, 10 Jun 2020 04:59:47 -0700 (PDT) Date: Wed, 10 Jun 2020 12:59:31 +0100 In-Reply-To: <20200610115940.26035-1-gprocida@google.com> Message-Id: <20200610115940.26035-3-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 02/11] Improve code comments and whitespace. To: libabigail@sourceware.org X-Spam-Status: No, score=-25.0 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" These are zero impact changes. * include/abg-fwd.h: Correct doc-comment reference to enum_type_decl. * src/abg-comp-filter.cc: Fix doc-comment syntax. * src/abg-comparison.cc (operator<<): In the diff_category overload, fix code indentation. * src/abg-default-reporter.cc (report): In the class_or_union_diff overload, adjust comment to reflect that the code is reporting changes between declaration-only and defined types, in either direction. Signed-off-by: Giuliano Procida --- include/abg-fwd.h | 2 +- src/abg-comp-filter.cc | 4 ++-- src/abg-comparison.cc | 8 ++++---- src/abg-default-reporter.cc | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/abg-fwd.h b/include/abg-fwd.h index f6e0c5b2..999b071b 100644 --- a/include/abg-fwd.h +++ b/include/abg-fwd.h @@ -152,7 +152,7 @@ typedef weak_ptr typedef_decl_wptr; class enum_type_decl; -/// Convenience typedef for shared pointer on enum_type_decl. +/// Convenience typedef for shared pointer to a @ref enum_type_decl. typedef shared_ptr enum_type_decl_sptr; class class_or_union; diff --git a/src/abg-comp-filter.cc b/src/abg-comp-filter.cc index 67c2a180..36fca73d 100644 --- a/src/abg-comp-filter.cc +++ b/src/abg-comp-filter.cc @@ -961,8 +961,8 @@ has_class_decl_only_def_change(const class_or_union_sptr& first, /// other one is defined. /// /// @param diff the diff node to consider. -//// -//// @return true if the class_or_union_diff carries a change in which +/// +/// @return true if the class_or_union_diff carries a change in which /// the two classes are different by the fact that one is a decl-only /// and the other one is defined. bool diff --git a/src/abg-comparison.cc b/src/abg-comparison.cc index 7305a71a..857ffa8a 100644 --- a/src/abg-comparison.cc +++ b/src/abg-comparison.cc @@ -3132,7 +3132,7 @@ operator<<(ostream& o, diff_category c) emitted_a_category |= true; } - if (c & FN_RETURN_TYPE_CV_CHANGE_CATEGORY) + if (c & FN_RETURN_TYPE_CV_CHANGE_CATEGORY) { if (emitted_a_category) o << "|"; @@ -3140,7 +3140,7 @@ operator<<(ostream& o, diff_category c) emitted_a_category |= true; } - if (c & VAR_TYPE_CV_CHANGE_CATEGORY) + if (c & VAR_TYPE_CV_CHANGE_CATEGORY) { if (emitted_a_category) o << "|"; @@ -3148,7 +3148,7 @@ operator<<(ostream& o, diff_category c) emitted_a_category |= true; } - if (c & VOID_PTR_TO_PTR_CHANGE_CATEGORY) + if (c & VOID_PTR_TO_PTR_CHANGE_CATEGORY) { if (emitted_a_category) o << "|"; @@ -3156,7 +3156,7 @@ operator<<(ostream& o, diff_category c) emitted_a_category |= true; } - if (c & BENIGN_INFINITE_ARRAY_CHANGE_CATEGORY) + if (c & BENIGN_INFINITE_ARRAY_CHANGE_CATEGORY) { if (emitted_a_category) o << "|"; diff --git a/src/abg-default-reporter.cc b/src/abg-default-reporter.cc index 80cb6638..7c98d8d7 100644 --- a/src/abg-default-reporter.cc +++ b/src/abg-default-reporter.cc @@ -844,7 +844,7 @@ default_reporter::report(const class_or_union_diff& d, const diff_context_sptr& ctxt = d.context(); - // Report class decl-only -> definition change. + // Report class decl-only <-> definition change. if (ctxt->get_allowed_category() & CLASS_DECL_ONLY_DEF_CHANGE_CATEGORY) if (filtering::has_class_decl_only_def_change(first, second)) {