<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 10:34 , Ted Kremenek <<a href="mailto:kremenek@apple.com">kremenek@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><blockquote type="cite" style="font-family: monospace; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><blockquote type="cite">// Don't check for uninitialized field values in arguments if the<br>// caller has a body that is available and we have the chance to inline it.<br>// This is a hack, but is a reasonable compromise betweens sometimes warning<br>// and sometimes not depending on if we decide to inline a function.<br>const Decl *D = Call.getDecl();<br>const bool checkUninitFields =<br>-    !(C.getAnalysisManager().shouldInlineCall() &&<br>-      (D && D->getBody()));<br>+    !(C.getAnalysisManager().shouldInlineCall() && (D && D->getBody()));<span class="Apple-converted-space"> </span><br></blockquote><br>Yeah, this should be refactored into CallEvent anyway, either CallEvent::mayBeInlined or CallEvent::willBeInlined. The test is wrong because a CallEvent's decl is often not the decl with the definition.<br></blockquote><br style="font-family: monospace; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span style="font-family: monospace; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; display: inline !important; float: none; ">Interesting.  All I did was change the indentation.  Perhaps something like "Call.getDefininingDecl()" which returns the correct Decl* if it exists?</span></blockquote></div><br><div>Anna's recent simplification of getDefinition (and name change to getRuntimeDefinition) does maybe 80% of this. The remaining 20% is the other conditions we check in ExprEngine::inlineCall and ExprEngine::shouldInlineDecl. This is already on my queue (from Anna's comments a week ago).</div></body></html>