[cfe-commits] r143965 - /cfe/trunk/lib/Sema/SemaPseudoObject.cpp

Chandler Carruth chandlerc at google.com
Mon Nov 7 10:40:19 PST 2011


On Mon, Nov 7, 2011 at 10:14 AM, David Blaikie <dblaikie at gmail.com> wrote:

> > Appease -Wnon-virtual-dtor
>
> > +    virtual ~PseudoOpBuilder() {}
> > +
>
> It looks like the right thing to do is to make the dtor protected and
> non-virtual (this should still silence the warning), as no users
> actually try to destroy these objects polymorphically. (
> http://www.gotw.ca/publications/mill18.htm )
>

This has come up fairly frequently, and if this technique actually silences
the warnings (I thought GCC's warning was... too "clever" for this), I
think it would be good to document it in
http://llvm.org/docs/ProgrammersManual.html or
http://llvm.org/docs/CodingStandards.html (whichever seems more
appropriate).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20111107/0a450b37/attachment.html>


More information about the cfe-commits mailing list