xazax.hun added a comment. In https://reviews.llvm.org/D33722#916990, @aaron.ballman wrote:
> In https://reviews.llvm.org/D33722#916540, @xazax.hun wrote: > > > Also, bugprone might be a better module to put this? > > > I don't have strong opinions on misc vs bugprone (they're both effectively > catch-alls for tidy checks, as best I can tell). @alexfh, do you have an opinion here? ================ Comment at: clang-tidy/misc/CopyConstructorInitCheck.cpp:69 + (Ctor->getAccess() == AS_private || Ctor->isDeleted())) { + NonCopyableBase = true; + break; ---------------- 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. https://reviews.llvm.org/D33722 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits