<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Feb 25, 2010, at 10:11 AM, Fariborz Jahanian wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><br>On Feb 25, 2010, at 10:01 AM, Ted Kremenek wrote:<br><br><blockquote type="cite">Right now it is only used by the static analyzer, but I think the question is a bit ill-phrased.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">By the compiler, are you taking about code generation or warnings? Right now this attribute is only consulted for the purpose of omitting warnings. In this<br></blockquote>I meant warnings. I can't see how code generation can be involved here.<br></span></blockquote><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><font class="Apple-style-span" color="#000000"><br></font><blockquote type="cite">regards the static analyzer is just a more advanced tool for issuing warnings than the compiler, so there is no reason the compiler couldn't use it for this purpose as well if the need came up. I'm not being hypothetical here; I'm just saying this was added for the sake of better warnings.<br></blockquote><br>I am not sure how static analyzer can issue warning and not having many false positives. You need whole program analysis<br>to see all implementations (of class and its categories).</span></blockquote><div><br></div><div>For ivars, most of the time categories are declared within the same .m file as the @implementation. It's a heuristic, but it works fairly well. Yes there are false positives, but those are acceptable in the static analyzer as long as the false positive rate is reasonable.</div><div><br></div><div>As for whole-program analysis, we will eventually get there.</div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "> Also, ivars maybe be accessed through properties. Does<br>static analyzer consider this?</span></blockquote><div><br></div>Yes it does. This check has been around for a long time. People would have severely complained if that wasn't the case.<br><br></div><div><br></div></body></html>