<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 23, 2016 at 11:03 AM, Alexander Kornienko via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">alexfh added a subscriber: alexfh.<br>
alexfh added a comment.<br>
<br>
As a data point: I ran -Wshadow on our code base with a similar, but simpler patch (<a href="http://reviews.llvm.org/D18395" rel="noreferrer" target="_blank">http://reviews.llvm.org/D18395</a>, just disables the warning on ctor parameters named after fields). It removes more than half of the hits (from ~100k initially) and a random sample of ~100 removed removed hits didn't contain any issues that we'd like to still be warning about.<br>
<br>
Ultimately, I think, this diagnostic should be made much less noisy to be actually useful. So maybe even starting with a removal of a larger subset of warnings (and then gradually adding back the cases that seem to be important to flag) would be better.<br></blockquote><div><br></div><div>Right - my concern is that for people who are already using the warning, that might be a loss of functionality for them (if they've gone to the hassle/code convention of not naming members the same as ctor parameters, etc) & so they'll start missing mistakes they thought they were guarded against.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
================<br>
Comment at: lib/Sema/SemaExpr.cpp:9887<br>
@@ -9854,1 +9886,3 @@<br>
     if (ConvTy == Compatible) {<br>
+      const Expr *InnerLHS = LHSExpr->IgnoreParenCasts();<br>
+      const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(InnerLHS);<br>
----------------<br>
Why this change?<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<a href="http://reviews.llvm.org/D18271" rel="noreferrer" target="_blank">http://reviews.llvm.org/D18271</a><br>
<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</div></div></blockquote></div><br></div></div>