<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Apr 21, 2015 at 3:08 PM, Ehsan Akhgari <span dir="ltr"><<a href="mailto:ehsan.akhgari@gmail.com" target="_blank">ehsan.akhgari@gmail.com</a>></span> wrote:<br><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"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Tue, Apr 21, 2015 at 5:41 PM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br><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"><div class="gmail_extra">FWIW I'd be a bit concerned that this warning, while it might have a good false positive rate on a codebase with the particular idioms you've described, would have a false positive rate a bit too high for a normal diagnostic bar.<br><br>Only one way to find out, though.<br></div></blockquote><div><br></div></span><div>That is a good point.<br><br>FWIW, I don't think we should turn this warning on as part of -Wall, maybe as part of -Wextra?  I'm not at all familiar with what the usual process for turning on warnings by default looks like, so I would appreciate if someone can point me in the right direction there.<br></div></div></div></div></blockquote><div><br></div><div>Confusingly, "on by default" and "enabled by -Wall" are distinct in Clang, but I don't find the distinction is not very useful.</div><div><br></div><div>I would suggest adding the warning under -Wshadow-field, and make it a subgroup of -Wshadow. This way, -Wshadow users will get new warnings that they probably wanted anyway. -Wshadow is not part of -Wall, so -Wall won't enable it. Mark each new diagnostic as DefaultIgnore in DiagnosticSemaKinds.td, so that it will not be on by default.</div><div><br></div><div>Once it's in, we can try it out, and if it has a really low false-positive rate, then we can discuss enabling it by default and/or putting it in -Wall.</div></div></div></div>