<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 Apr 9, 2013, at 2:10 PM, jahanian <<a href="mailto:fjahanian@apple.com">fjahanian@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=windows-1252"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Apr 9, 2013, at 1:47 PM, Douglas Gregor <<a href="mailto:dgregor@apple.com">dgregor@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><br class="Apple-interchange-newline">On Apr 9, 2013, at 10:52 AM, Fariborz Jahanian <<a href="mailto:fjahanian@apple.com">fjahanian@apple.com</a>> wrote:</div><br class="Apple-interchange-newline" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Author: fjahanian<br>Date: Tue Apr  9 12:52:29 2013<br>New Revision: 179108<br><br>URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project?rev=179108&view=rev">http://llvm.org/viewvc/llvm-project?rev=179108&view=rev</a><br>Log:<br>Objective-C: This patch fixes a none-issuance of warning<br>when result type of protocol property and getter method<br>differ by fixing a more serious problem. When a forward<br>protocol declaration comes between its definition and<br>its use in class protocol list, the forward protocol<br>ast was being used in building the protocol list.<br>//<span class="Apple-converted-space"> </span><a href="rdar://12522752">rdar://12522752</a><br></div></blockquote><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><br></div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">Why is this a problem? The protocol list could have a reference to the protocol declaration that was actually visible, and the callers that need definitions should use getDefinition().</div></blockquote><div><br></div>When we lookup the property in class’s protocol list, we hit forward declarations in the list. It is better to fix the list in one place rather than everywhere we need to look into</div><div>the list. Does this cause a problem for modules? If so, I can move this to where property is looked up. But I think this is a better fix.</div></div></blockquote><br></div><div>I guess we've discussed this before. In general, I'd rather the AST reflect what was parsed, such that the result in the protocol list is precisely the declaration we saw. However, the Objective-C parts of Sema haven't been made robust against getting forward declarations, so just putting in the definition is livable until we find a better general solution.</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">   </span>- Doug</div><br></body></html>