[PATCH] D21992: [clang-tidy] new cppcoreguidelines-slicing

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 7 05:46:32 PDT 2016

alexfh added a comment.

Thanks for the new awesome check!

Please run the check on LLVM and include your analysis of the results in the patch description. Another couple of comments below.

Comment at: clang-tidy/cppcoreguidelines/SlicingCheck.cpp:93
@@ +92,3 @@
+      continue;
+    CXXRecordDecl *BaseRecord =
+        cast_or_null<CXXRecordDecl>(BaseRecordType->getDecl()->getDefinition());
Please use `auto *`

Comment at: docs/clang-tidy/checks/cppcoreguidelines-slicing.rst:7
@@ +6,3 @@
+Flags slicing of member variables or vtable. See the relevant CppCoreGuidelines
+sections for details:
Links to the C++ Core Guidelines are good, but a few words of explanation and an example here wouldn't hurt either.


More information about the cfe-commits mailing list