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

Jonas Toth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 19 13:13:19 PST 2019


JonasToth added inline comments.


================
Comment at: clang-tidy/misc/NonPrivateMemberVariablesInClassesCheck.cpp:22
 AST_MATCHER(CXXRecordDecl, hasMethods) {
-  return std::distance(Node.method_begin(), Node.method_end()) != 0;
+  for (const auto &Method : Node.methods()) {
+    if (Method->isImplicit())
----------------
maybe `return llvm::any_of(Node.methods(), [](const CXXMethodDecl /* dunno which type this would be */& M) { return !M->isImplicit(); });`?


Repository:
  rCTE Clang Tools Extra

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

https://reviews.llvm.org/D56966





More information about the cfe-commits mailing list