[PATCH] D56966: [clang-tidy] misc-non-private-member-variables-in-classes: ignore implicit methods

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 20 05:54:13 PST 2019


lebedev.ri accepted this revision.
lebedev.ri added a comment.
This revision is now accepted and ready to land.

LG other than two nits, thank you!



================
Comment at: clang-tidy/misc/NonPrivateMemberVariablesInClassesCheck.cpp:25
 
 AST_MATCHER(CXXRecordDecl, hasNonStaticMethod) {
+  return hasMethod(unless(anyOf(isStaticStorageClass(), isImplicit())))
----------------
Please do rename it though, from `hasNonStaticMethod` to `hasNonStaticNonImplicitMethod` or something.


================
Comment at: test/clang-tidy/misc-non-private-member-variables-in-classes.cpp:38
 
+// Only data and implicit methods, do not warn
+
----------------
Can you please duplicate this test and add one static method (into `S1Implicit`, i think?).


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56966/new/

https://reviews.llvm.org/D56966





More information about the cfe-commits mailing list