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

Clement Courbet via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 19 23:37:20 PDT 2016


courbet added a comment.

Thanks for the review.


================
Comment at: clang-tidy/cppcoreguidelines/SlicingCheck.cpp:86
@@ +85,3 @@
+           "slicing object from type %0 to %1 discards override %2")
+          << &DerivedDecl << &BaseDecl << Method;
+    }
----------------
alexfh wrote:
> The "slicing ... discards x bytes of state" message is not going to be repeated for the same location, so it's fine on its own.
> 
> Re: the "discards override" messages, they quite infrequent, IIUC, so the risk of spamming people with diagnostics is rather low. In case it's still problematic, we can change the repeated parts to notes.
Thanks for the insight.


https://reviews.llvm.org/D21992





More information about the cfe-commits mailing list