<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jul 27, 2012, at 11:55 , John McCall <<a href="mailto:rjmccall@apple.com">rjmccall@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Jul 26, 2012, at 9:37 AM, Jordan Rose wrote:</div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>On Jul 26, 2012, at 9:29 , jahanian <<a href="mailto:fjahanian@apple.com">fjahanian@apple.com</a>> wrote:</div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><blockquote type="cite">-    for (Decl::redecl_iterator I = MD->redecls_begin(), E = MD->redecls_end();<br>-         I != E; ++I) {<br>-      if (cast<ObjCMethodDecl>(*I)->isThisDeclarationADefinition())<br>-        return *I;<br>+    const ObjCMessageExpr *E = getOriginExpr();<br></blockquote><div><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">getOriginExpr may return null. You should check for that.</div></div></blockquote><div><br></div><div>Right now it's safe to assume all ObjCMethodCalls have origin expressions, because all our implicit message sends are already abstracted using PseudoObjectExpr. I guess that may change in the future.</div></div></blockquote><br></div><div>The only implicit message sends that aren't directly represented in the AST these days are:</div><div>  (1) the implicit [super dealloc] in an ARC dealloc method, because it has destructor-like semantics, i.e. it needs to be run even on early exits from the function;</div><div>  (2) the message sends implementing literals, because we don't actually guarantee that they'll always be message sends — if we decide it's worthwhile to implement them as runtime calls, we will;</div><div>  (3) the message sends implementing the ObjC "fast enumeration" loop.</div></div></blockquote><br></div><div>We should probably start modelling (1) and (2) (and someday (3)), but what I meant is that since the CFG does not include any implicit message sends, the analyzer won't see them either. Thanks for the summary of when that occurs, though.</div><div><br></div><div>Jordan</div></body></html>