<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jul 26, 2012, at 9:29 , jahanian <<a href="mailto:fjahanian@apple.com">fjahanian@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><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></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><br></div></div></body></html>