Hello Alexey Serbin, Andrew Wong,
I'd like you to do a code review. Please visit
http://gerrit.cloudera.org:8080/14930
to review the following change.
Change subject: clang-tidy: no warnings on structs with all public data members
......................................................................
clang-tidy: no warnings on structs with all public data members
Since the LLVM 9 upgrade clang-tidy has been warning on things like this:
src/kudu/tserver/tablet_copy_source_session.h:66:11: warning: member variable
'size' has public visibility [misc-non-private-member-variables-in-classes]
int64_t size;
^
'size' is indeed a public data member, but as per the Google Style Guide[1],
structs should consist of nothing but public data members.
I couldn't find a way to configure clang-tidy correctly on this issue, so
instead I reconfigured the corresponding check to not warn about any struct
or class where all data members are public. In the process, I rediscovered
our existing .clang-tidy configuration file and moved the recently disabled
checks there.
1. https://google.github.io/styleguide/cppguide.html#Structs_vs._Classes
Change-Id: Ibf9913fd0b0410b44cf36f044256ef0266949d95
---
M build-support/clang_tidy_gerrit.py
M src/kudu/.clang-tidy
2 files changed, 51 insertions(+), 28 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/30/14930/1
--
To view, visit http://gerrit.cloudera.org:8080/14930
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibf9913fd0b0410b44cf36f044256ef0266949d95
Gerrit-Change-Number: 14930
Gerrit-PatchSet: 1
Gerrit-Owner: Adar Dembo <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>