mbox series

[0/3] clang-tidy error and warning fixes

Message ID 20200903132205.589136-1-gprocida@google.com
Headers show
Series clang-tidy error and warning fixes | expand

Message

Giuliano Procida Sept. 3, 2020, 1:22 p.m. UTC
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(-)