Quuxplusone added a comment.

In D82617#2117441 <https://reviews.llvm.org/D82617#2117441>, @sammccall wrote:
> In D82617#2117086 <https://reviews.llvm.org/D82617#2117086>, @Quuxplusone 
> wrote:
>
> > FWIW, I think the example you gave is **correct** for GCC to warn on.
>
>
> Everything the warning says is correct, but in this pattern the polymorphic 
> usage is the whole point of the hierarchy, the subclasses are never exposed. 
> There's no actual danger of confusion.


If you intend for the method to never be called from a subclass, it should be 
private in that subclass.
This morning I left a comment on https://reviews.llvm.org/D81920#inline-760189 
indicating how I would disentangle that code if I owned it. Hopefully that 
comment clarifies my position somewhat.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D82617



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to