New patch!<div><br></div><div>In this version:</div><div>* no longer uses <span style="font-family:arial,sans-serif;font-size:13px">FoldingSetNodeID, which hopefully addressed performance concerns (this means "s->a_ = s->a_" is no longer caught, but that has never happened to me anyway)</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px">* ObjC support as requested by Jordan</span></div><div><span style="font-family:arial,sans-serif;font-size:13px">* Fix to an existing ObjC test that triggered this warning (accidentally I think)</span></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jun 25, 2012 at 5:10 PM, Jordan Rose <span dir="ltr"><<a href="mailto:jordan_rose@apple.com" target="_blank">jordan_rose@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div class="h5"><br><div><div>On Jun 25, 2012, at 16:27 , Nico Weber <<a href="mailto:thakis@chromium.org" target="_blank">thakis@chromium.org</a>> wrote:</div>
<br><blockquote type="cite">On Mon, Jun 25, 2012 at 3:49 PM, Jordan Rose <<a href="mailto:jordan_rose@apple.com" target="_blank">jordan_rose@apple.com</a>> wrote:<br><blockquote type="cite"><br>On Jun 25, 2012, at 14:43 , Nico Weber <<a href="mailto:thakis@chromium.org" target="_blank">thakis@chromium.org</a>> wrote:<br>
<br><blockquote type="cite">Full build of the 'chrome' target with this warning on my MBP: real   31m41.500s<br>Same clang binary at the same revision, without the warning: real     31m53.572s<br><br>So the compile-time impact of the warning is below noise I'd say.<br>
<br>Nico<br></blockquote><br>Did you remember to add a guard around the "work" part of CheckIdentityMemvarAssignment? Or were you still doing the work and just not emitting the warning?<br></blockquote><br>I uncommented the call to "CheckIdentityMemvarAssignment" (and clang<br>
warned me that the static function CheckIdentityMemvarAssignment<br>wasn't used). With "same binary" I meant "built at the same revision"</blockquote><br></div></div></div><div>Okay, I see. I'm a little concerned along with Ted because copying over pieces of another struct does seem like something common enough to do, but I guess it's fine.</div>
<div><br></div><div>This probably won't catch "this->_a = _a", but maybe that's okay. It is a typo you might make in a setter, though.</div><div><br></div><div>BTW, this would be a good warning to have in Objective-C as well (<span style="font-family:Menlo;font-size:11px">ObjCIvarRefExpr</span>). The equivalent example there would be "self->_a = _a".</div>
<div><br></div><div>Thanks for working on this. I think over all it is a good warning to have.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Jordan</div></font></span></div></blockquote></div><br></div>