<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">This isn’t a style checker, this is to make sure you are not overriding something by accident.</div><div class=""><br class=""></div><div class="">It needs to be off-by-default due to the vast amount of C++ code that exists out there, but we can have it enabled when you create a new project.</div><br class=""><div><blockquote type="cite" class=""><div class="">On Sep 24, 2014, at 4:16 PM, David Blaikie <<a href="mailto:dblaikie@gmail.com" class="">dblaikie@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><br class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">On Wed, Sep 24, 2014 at 3:57 PM, jahanian <span dir="ltr" class=""><<a href="mailto:fjahanian@apple.com" target="_blank" class="">fjahanian@apple.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi all,<br class="">
<br class="">
We have an enhancement request  from our users to provide<br class="">
warning if ‘override’ control is missing. This warning is off by default as it will<br class="">
be noisy (but it will show itself with -Weverything).<br class="">
Is such a patch useful enough to go into the trunk? Also, comment on the patch is appreciated.<br class="">
I will provide ‘fixit’ later if this is a worthwhile patch.<br class=""></blockquote><div class=""><br class=""></div><div class="">While I rather like the idea of such a warning, the usual bar has been a strong aversion to adding off-by-default warnings. I think the theoretical future might be building warnings like this into clang-tidy, then providing some plugin-like option to enable certain clang-tidy warnings in your normal builds.<br class=""><br class="">(because I was curious, I went back & found some choice quotes from Doug Gregor on warnings like this (this is what he told me, years ago, when I proposed adding a warning for null pointers that aren't nullptr*):<br class=""><br class=""><div class=""><div class=""><font face="arial, helvetica, sans-serif" class=""><span class="">"Off</span>-by-<span class="">default</span> <span class="">warnings</span> are not a mechanism to subvert our normal processes for vetting a<span class="">warning</span>. In general, we should avoid <span class="">off</span>-by-<span class="">default</span> <span class="">warnings</span>: if it's not good enough to turn on by <span class="">default</span>, why do we have it at all? The vast majority of users will never see an <span class="">off</span>-by-<span class="">default</span> <span class="">warning</span>."</font></div><div class=""><font face="arial, helvetica, sans-serif" class="">"A compiler is not a style checker, nor should it ever be."</font></div></div><div class=""><font face="arial, helvetica, sans-serif" class=""><span class="">"Warnings</span> are intended to find potential problems in the source code. Style migration is the domain of separate tools.")<br class=""><br class="">(& cc'ing Doug in case there's something about this that's different/things have changed over the years)</font></div><br class="">* today, I'd probably be able to get that in on the basis of compatibility with GCC's <span style="font-family: monospace; font-size: inherit;" class="">-Wzero-as-null-pointer-constant</span></div><div class=""> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br class="">
- Fariborz<br class="">
<br class="">
        <br class="">_______________________________________________<br class="">
cfe-commits mailing list<br class="">
<a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank" class="">cfe-commits@cs.uiuc.edu</a><br class="">
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank" class="">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br class="">
<br class=""></blockquote></div><br class=""></div></div>
_______________________________________________<br class="">cfe-commits mailing list<br class=""><a href="mailto:cfe-commits@cs.uiuc.edu" class="">cfe-commits@cs.uiuc.edu</a><br class="">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits<br class=""></div></blockquote></div><br class=""></body></html>