<div dir="ltr">Did you evaluate this on some large codebase for true and false positives? The current behavior of -Woverloaded-virtual was carefully chosen to be less noisy than gcc's version of the warning (clang's version is low enough on noise to be useful, gcc's isn't).</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Apr 4, 2014 at 10:54 AM, Lubos Lunak <span dir="ltr"><<a href="mailto:l.lunak@centrum.cz" target="_blank">l.lunak@centrum.cz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
 Testcase:<br>
<br>
struct B5 {<br>
    void func();<br>
};<br>
struct S5 : public B5 {<br>
    virtual void func();<br>
};<br>
<br>
 Here most likely S5::func() was meant to override B5::func() but doesn't<br>
because of missing 'virtual' in the base class. The attached patch warns<br>
about this case. I added the warning to -Woverloaded-virtual, because<br>
although technically it is not an overloaded virtual, it is exactly the same<br>
kind of a developer mistake, but if somebody insists I can update the patch<br>
to make it -Woverridden-non-virtual (which I think is a misnomer too :) ) or<br>
whatever you name it.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
 Lubos Lunak<br>
</font></span><br>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div>