From patchwork Thu Sep 3 13:22:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giuliano Procida X-Patchwork-Id: 40355 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 2F8D9386102B; Thu, 3 Sep 2020 13:22:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2F8D9386102B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1599139334; bh=v92CyWkRhwzSKzI3Jv2Ha8n9JX3rC0p5FU/90vBRSMs=; h=Date:Subject:To:List-Id:List-Unsubscribe:List-Archive:List-Help: List-Subscribe:From:Reply-To:Cc:From; b=u1obHfRyw4jAnuMx3Ekhsnft7LzoLQLeEb8NAelhptIIgOwLy77+sAIYM3YOY5fhH zoPrnBPCP9ssgf5JQmbGrXo3S0NA9bgWbmyZteygeOUEU/ov+1GNErOeL6YV5A3ZdZ NghC1Z6HisEpTNzeFi/nROdt1rGo8efAh55hTDmI= X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from mail-wr1-x44a.google.com (mail-wr1-x44a.google.com [IPv6:2a00:1450:4864:20::44a]) by sourceware.org (Postfix) with ESMTPS id 8BDEE386102B for ; Thu, 3 Sep 2020 13:22:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8BDEE386102B Received: by mail-wr1-x44a.google.com with SMTP id l17so1068345wrw.11 for ; Thu, 03 Sep 2020 06:22:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:message-id:mime-version:subject:from :to:cc; bh=v92CyWkRhwzSKzI3Jv2Ha8n9JX3rC0p5FU/90vBRSMs=; b=dZJsXlbsPi8jC7OG9dZwKNorIv9nbbJYt+ltBfJ0RAJ9cS0ILoMpRTlfOhypZgUb4u R7hn3OF09EkOa53B98pDoeZaiLAkALWPKO6m9WNno2OEyVYco4fbuYnTbYXVCKMVF0iE tUvbuxB+Qt6H4TbKxDdNDDy5Lf/k7aoA97bM88C8ZG76Azhh0967EtZSsdC/qmlOiRAM UYXyhGS+P/bcWBarSFwy8BLoI3vYqvwTA1HBvO1OINeUxiipbBa5OJoy+raQqdIl9yAD 7dAIhwr2flI4MgRjHXTpY81pj4rJkzRl2lYWpN2NqWIzBB2lkVIKeB9Jre8lXq7Nnwvq 3Csg== X-Gm-Message-State: AOAM532ZXh70cWR3tlmLaZXbJqTScl3E/YMx4pJ7NBwMWIOnq8dELuNR perWcQvWSW0w2UWXB91c/exyi/u2xKYXalJcCBILRYvbKfrx6KPamzRLZzAZBxmCaeDooj9DMdD zgxy4f00sK69gT7zM9Dx2AyxQzJw9uYjvv+hJcPeINWNMF3Vbye+z6F3WrZtouRo/oLOJ3AM= X-Google-Smtp-Source: ABdhPJw1eiFChKABwRyE5FTeMFRIHZBUm7gqzt4wnRfALZSB+CAORl4GzMcohHWaS77qPyVfRo8bB7t6jAvELg== X-Received: from tef.lon.corp.google.com ([2a00:79e0:d:110:a6ae:11ff:fe11:4f04]) (user=gprocida job=sendgmr) by 2002:a5d:574e:: with SMTP id q14mr2318033wrw.281.1599139330036; Thu, 03 Sep 2020 06:22:10 -0700 (PDT) Date: Thu, 3 Sep 2020 14:22:02 +0100 Message-Id: <20200903132205.589136-1-gprocida@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.28.0.402.g5ffc5be6b7-goog Subject: [PATCH 0/3] clang-tidy error and warning fixes To: libabigail@sourceware.org X-Spam-Status: No, score=-17.5 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, 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: maennich@google.com, kernel-team@android.com Errors-To: libabigail-bounces@sourceware.org Sender: "Libabigail" Hi Dodji. We (also) build libabigail using Google's internal tooling and one thing we get for free is clang-tidy's report on the code. The internal branch of libabigail is essentially a subset of mm-next, so the figures below may not be accurate for master. The current counts (for */*.{h,cc}) are: 2 clang-diagnostic-error 2 readability-redundant-smartptr-get 14 performance-unnecessary-copy-initialization 21 readability-container-size-empty 49 bugprone-argument-comment 50 misc-unused-using-decls 54 clang-diagnostic-shadow-field 66 readability-inconsistent-declaration-parameter-name The commits in this series address the first 3 categories above. I'm proceeding on the assumption that there is value in reducing the counts to zero. However, it's possible that certain categories may not be aligned with an idealised libabigail coding standard. Do let us know. Thank you! Regards, Giuliano. Giuliano Procida (3): abg-corpus-priv.h: include abg-corpus.h Fix readability-redundant-smartptr-get warnings Fix performance-unnecessary-copy-initialization warnings include/abg-diff-utils.h | 2 +- src/abg-comparison-priv.h | 3 ++- src/abg-corpus-priv.h | 1 + src/abg-default-reporter.cc | 4 ++-- src/abg-dwarf-reader.cc | 2 +- src/abg-ir.cc | 11 ++++++----- src/abg-suppression.cc | 8 ++++---- tools/abipkgdiff.cc | 2 +- tools/kmidiff.cc | 4 ++-- 9 files changed, 20 insertions(+), 17 deletions(-)