From patchwork Tue May 25 09:38:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dodji Seketeli X-Patchwork-Id: 43561 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 ECD063896C25; Tue, 25 May 2021 09:38:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ECD063896C25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1621935529; bh=Nd8TxpF9Mc8CXp9AyhNr2a9ssTBqnELc3WIjfeRPoOk=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Help: List-Subscribe:From:Reply-To:From; b=DW/3RD9WjyTut/41cpmuBG2EG3QuPaZXrM9TiXDoqooanXrYNoyIXXcsUfM9seWLw qieItzuNLYwPHUf1dhVxngG9UW7RqsiyLirF/4V4c/PWPTvoc5r/nsldf3HJvIrGcK 9S5cLkezJDgr01wRkvHTjcuhq+hXX8ahuNcrRGXU= 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 ESMTP id B9A743896C25 for ; Tue, 25 May 2021 09:38:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B9A743896C25 Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-578-evULQfUwNRmEW41VA75BvQ-1; Tue, 25 May 2021 05:38:44 -0400 X-MC-Unique: evULQfUwNRmEW41VA75BvQ-1 Received: by mail-wm1-f72.google.com with SMTP id n20-20020a05600c4f94b029017f371265feso3416256wmq.5 for ; Tue, 25 May 2021 02:38:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:organization:date:message-id :user-agent:mime-version; bh=Nd8TxpF9Mc8CXp9AyhNr2a9ssTBqnELc3WIjfeRPoOk=; b=C6KJSQI1e/dHSnK4BUr4t9rdm+08F7bzyB6C0C/U5dvNl7kopBDrC6B74id/yFMrJJ uf3iVuFPot1sl3tMiF1AID6oUIl9QUbFGfcEPqUV6XaXt+84wG/tKP4mF5jf97fIWg2D hvKy+unmkB2yW26BMzh9zWp9TaSis90MK9RU7RgfedGKV4lj5kcq1pWUx1WAKa0W9Gqt 3d0LjT5EeHAYAQjo9pHHE5qHyPhTRNBJtFLoVulDW+ez1REkBUsRZ3ZFvwCCSW8pUtId a9ikuuY3wOA+I+v0f9G57MxWiDyIYwd3IuEb7W0QoDWCnPR8oi7GOtHJcAJnBx5qzkPK uFGw== X-Gm-Message-State: AOAM531VnK5pjeenFa6h/jmgiEVh679GdHuj66FT+R9GcOVBwCy+WIR9 EdOCTpN5q9G+ZG3zp1vqeVjO5AT0T3AOQ6fGl76Sx2BgI2r27jqq0dZfcDn9UFBDeJTsH+vX01e JTuuCIn4idnPRoksMjiWHytAoOHgVvlPvyT0XO+4nodRjuwDmLogfzgJhujfd6Cl9NyWB X-Received: by 2002:a7b:c759:: with SMTP id w25mr2965487wmk.54.1621935523649; Tue, 25 May 2021 02:38:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymkzoXTLdSPUziyQT9hTFCcUGbHQooJohuWjQmCoD0PosTP03HHViDILnOLJs3GleOnb9omA== X-Received: by 2002:a7b:c759:: with SMTP id w25mr2965477wmk.54.1621935523445; Tue, 25 May 2021 02:38:43 -0700 (PDT) Received: from localhost ([88.120.130.27]) by smtp.gmail.com with ESMTPSA id b10sm18021973wrr.27.2021.05.25.02.38.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 May 2021 02:38:43 -0700 (PDT) Received: by localhost (Postfix, from userid 1000) id 1E4B458000E; Tue, 25 May 2021 11:38:41 +0200 (CEST) To: libabigail@sourceware.org Subject: [PATCH, applied] Miscellaneous indentation and comments cleanups Organization: Red Hat / France X-Operating-System: Fedora 35 X-URL: http://www.redhat.com Date: Tue, 25 May 2021 11:38:41 +0200 Message-ID: <87cztf5f1a.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.7 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_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP 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: Dodji Seketeli via Libabigail From: Dodji Seketeli Reply-To: Dodji Seketeli Errors-To: libabigail-bounces@sourceware.org Sender: "Libabigail" Hello, While looking at something else, I did some indentation and comments cleanups. * src/abg-ir.cc (environment::priv::{config_, canonical_types_, sorted_canonical_types_, void_type_, variadic_marker_type_}): Re-indent these data members. (peel_typedef_pointer_or_reference_type): Fix comment. (var_decl::var_decl): Likewise. (function_decl::function_decl): Add a comment. * src/abg-reader.cc (handle_reference_type_def): Fix indentation of parameters. Signed-off-by: Dodji Seketeli Applied to master. --- src/abg-ir.cc | 33 ++++++++++++++++++++++++--------- src/abg-reader.cc | 4 ++-- 2 files changed, 26 insertions(+), 11 deletions(-) diff --git a/src/abg-ir.cc b/src/abg-ir.cc index 2ad7910b..85766edf 100644 --- a/src/abg-ir.cc +++ b/src/abg-ir.cc @@ -2776,11 +2776,11 @@ typedef unordered_map sorted_canonical_types_; - type_base_sptr void_type_; - type_base_sptr variadic_marker_type_; + config config_; + canonical_types_map_type canonical_types_; + mutable vector sorted_canonical_types_; + type_base_sptr void_type_; + type_base_sptr variadic_marker_type_; unordered_set classes_being_compared_; unordered_set fn_types_being_compared_; vector extra_live_types_; @@ -6061,8 +6061,8 @@ peel_qualified_or_typedef_type(const type_base_sptr &t) } /// Return the leaf underlying or pointed-to type node of a @ref -/// typedef_decl, @ref pointer_type_def or @ref reference_type_def -/// node. +/// typedef_decl, @ref pointer_type_def, @ref reference_type_def, +/// or @ref array_type_def node. /// /// @param type the type to peel. /// @@ -16465,11 +16465,11 @@ struct var_decl::priv {} }; // end struct var_decl::priv -/// Constructor +/// Constructor of the @ref var_decl type. /// /// @param name the name of the variable declaration /// -/// @param name the type of the variable declaration +/// @param type the type of the variable declaration /// /// @param locus the source location where the variable was defined. /// @@ -17745,6 +17745,21 @@ struct function_decl::priv {} }; // end sruct function_decl::priv +/// Constructor of the @ref function_decl. +/// +/// @param name the name of the function. +/// +/// @param function_type the type of the function. +/// +/// @param declared_inline wether the function is declared inline. +/// +/// @param locus the source location of the function. +/// +/// @param mangled_name the linkage name of the function. +/// +/// @param vis the visibility of the function. +/// +/// @param bind the binding of the function. function_decl::function_decl(const string& name, function_type_sptr function_type, bool declared_inline, diff --git a/src/abg-reader.cc b/src/abg-reader.cc index 39629314..05f1a6fa 100644 --- a/src/abg-reader.cc +++ b/src/abg-reader.cc @@ -5625,11 +5625,11 @@ handle_reference_type_def(read_context& ctxt, /// function_type is added to. static type_base_sptr handle_function_type(read_context& ctxt, - xmlNodePtr node, + xmlNodePtr node, bool add_to_current_scope) { function_type_sptr type = build_function_type(ctxt, node, - add_to_current_scope); + add_to_current_scope); ctxt.maybe_canonicalize_type(type, /*force_delay=*/true); return type; }