[cfe-dev] Check C++ Bad Override

Arjun Singri arjunsingri at gmail.com
Fri Oct 7 17:30:10 PDT 2011

If you see the signatures of foo in the base class and the derived class,
you can see that the derived class version is missing the "const" keyword.

On Fri, Oct 7, 2011 at 5:12 PM, Don Quixote de la Mancha <
quixote at dulcineatech.com> wrote:

> On Fri, Oct 7, 2011 at 7:33 AM, Nico Weber <thakis at chromium.org> wrote:
> >> The attached patch adds a C++ Checker to clang, it checks whether
> >> there are mistakes in override.
> My understanding is that it is not actually necessary to declare
> member functions in subclasses as being virtual if the base class
> declares them virtual.  The compiler just assumes they are.
> That's my understanding anyway.  I do not own a copy of the C++ Spec
> so I can't Quote Scripture.
> I always declare them virtual anyway because it's confusing otherwise.
>  Is that what you're trying to catch?
> --
> Don Quixote de la Mancha
> Dulcinea Technologies Corporation
> Software of Elegance and Beauty
> http://www.dulcineatech.com
> quixote at dulcineatech.com
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20111007/1b1031cd/attachment.html>

More information about the cfe-dev mailing list