Adar Dembo has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/14930 )

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
Reviewed-on: http://gerrit.cloudera.org:8080/14930
Tested-by: Kudu Jenkins
Reviewed-by: Andrew Wong <[email protected]>
---
M build-support/clang_tidy_gerrit.py
M src/kudu/.clang-tidy
2 files changed, 51 insertions(+), 28 deletions(-)

Approvals:
  Kudu Jenkins: Verified
  Andrew Wong: Looks good to me, approved

--
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: merged
Gerrit-Change-Id: Ibf9913fd0b0410b44cf36f044256ef0266949d95
Gerrit-Change-Number: 14930
Gerrit-PatchSet: 3
Gerrit-Owner: Adar Dembo <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)

Reply via email to