[PATCH] D102325: [clang-tidy] cppcoreguidelines-virtual-base-class-destructor: a new check

Eugene Zelenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat May 15 05:57:59 PDT 2021


Eugene.Zelenko added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/VirtualBaseClassDestructorCheck.cpp:22
+void VirtualBaseClassDestructorCheck::registerMatchers(MatchFinder *Finder) {
+  ast_matchers::internal::Matcher<CXXRecordDecl> inheritsVirtualMethod =
+      hasAnyBase(hasType(cxxRecordDecl(has(cxxMethodDecl(isVirtual())))));
----------------
Please fix `readability-identifier-naming` warning.


================
Comment at: clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-virtual-base-class-destructor.rst:16
+
+This check implements `C.35 <https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#c35-a-base-class-destructor-should-be-either-public-and-virtual-or-protected-and-non-virtual>`_ from the CppCoreGuidelines.
+
----------------
Links to documentation usually placed at the end. See other checks documentation.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102325



More information about the cfe-commits mailing list