[cfe-dev] Interest in a -Wimplicit-virtual?

Ted Kremenek kremenek at apple.com
Wed Mar 2 14:07:29 PST 2011


I'd be fine with this being an optional warning, but not on by default.

On Mar 2, 2011, at 2:01 PM, Elliot Glaysher (Chromium) wrote:

> In the chromium clang plugin, we check for the following case:
> 
> struct A {
>  virtual void method();
> };
> 
> struct B : public A {
>  void method(); // expected-warning {{Overridden method must have
> "virtual" keyword}}
> };
> 
> Our style guide requires people to not depend on virtual being
> implicit. Would there be interest in upstreaming this warning to the
> cfe proper?
> 
> -- Elliot Glaysher
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev




More information about the cfe-dev mailing list