aaron.ballman added inline comments.
================
Comment at: clang-tidy/misc/CopyConstructorInitCheck.cpp:69
+ (Ctor->getAccess() == AS_private || Ctor->isDeleted())) {
+ NonCopyableBase = true;
+ break;
----------------
xazax.hun wrote:
> aaron.ballman wrote:
> > What if the base class is inherited privately? e.g.,
> > ```
> > struct Base {
> > Base(const Base&) {}
> > };
> >
> > struct Derived : private Base {
> > Derived(const Derived &) {}
> > };
> > ```
> We warn in that case too. I added a test to demonstrate this. I think we
> still want to copy private bases in copy ctors if they are not empty and
> copyable.
Good, thank you for adding the test (and I agree, we want to warn in that case).
https://reviews.llvm.org/D33722
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits