Eugene.Zelenko added inline comments.
================ Comment at: clang-tidy/bugprone/ParentVirtualCallCheck.cpp:26 + +bool IsParentOf(const CXXRecordDecl *Parent, const CXXRecordDecl *ThisClass) { + assert(Parent); ---------------- Please make this function static and remove anonymous namespace. ================ Comment at: clang-tidy/bugprone/ParentVirtualCallCheck.cpp:40 + +bool IsRecursiveParentOf(const CXXRecordDecl *Parent, + const CXXRecordDecl *ThisClass) { ---------------- Please make this function static and remove anonymous namespace. ================ Comment at: clang-tidy/bugprone/ParentVirtualCallCheck.cpp:48 +std::list<const CXXRecordDecl *> +GetParentsByGrandParent(const CXXRecordDecl *GrandParent, + const CXXRecordDecl *ThisClass) { ---------------- Please make this function static and remove anonymous namespace. ================ Comment at: clang-tidy/bugprone/ParentVirtualCallCheck.cpp:66 +// PrintingPolicy for anonymous namespaces. +std::string GetNameAsString(const NamedDecl &Decl) { + PrintingPolicy PP(Decl.getASTContext().getPrintingPolicy()); ---------------- Please make this function static and remove anonymous namespace. ================ Comment at: clang-tidy/bugprone/ParentVirtualCallCheck.cpp:91 +void ParentVirtualCallCheck::check(const MatchFinder::MatchResult &Result) { + + const auto *MatchedDecl = Result.Nodes.getNodeAs<CXXMemberCallExpr>("call"); ---------------- Please remove this line. ================ Comment at: docs/ReleaseNotes.rst:76 + + Warns if one calls grand-..parent's virtual method in child's virtual + method instead of parent's. Can automatically fix such cases by retargeting ---------------- Please make description here and first statement in documentation same. ================ Comment at: docs/clang-tidy/checks/bugprone-parent-virtual-call.rst:9 + +class A { +... ---------------- Please add .. code-block:: c++ Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44295 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits