<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Oct 14, 2011, at 12:08 PM, jahanian 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; "><br><div><div>On Oct 14, 2011, at 11:40 AM, Douglas Gregor wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><br>On Oct 14, 2011, at 11:31 AM, Fariborz Jahanian wrote:<br><br><blockquote type="cite">Author: fjahanian<br></blockquote><blockquote type="cite">Date: Fri Oct 14 13:31:36 2011<br></blockquote><blockquote type="cite">New Revision: 141966<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">URL: <a href="http://llvm.org/viewvc/llvm-project?rev=141966&view=rev">http://llvm.org/viewvc/llvm-project?rev=141966&view=rev</a><br></blockquote><blockquote type="cite">Log:<br></blockquote><blockquote type="cite">Make value kind based on the return type of the getter, not<br></blockquote><blockquote type="cite">property type, for when getter may be a reference type.<br></blockquote><blockquote type="cite">// <a href="rdar://10188258">rdar://10188258</a> revised.<br></blockquote><br>Dare I ask for a test case?<br></div></blockquote><div><br></div>Interesting that you asked. Currently, we warn for the getter (but not on the setter!). Need to fix it before sending a test case.</div><div><br></div><div><div>struct Foo {int i;};</div><div><br></div><div>@interface ObjCTest  { }</div><div>@property (nonatomic, readonly) Foo FooProperty;</div><div>- (Foo &) FooProperty;</div><div>- (void)  SetFooProperty : (Foo &) arg;</div><div>@end</div><div><br></div><div><div>% clang -fsyntax-only ref-bug.mm </div><div>ref-bug.mm:4:37: warning: type of property 'FooProperty' does not match type of accessor 'FooProperty'</div><div>@property (nonatomic, readonly) Foo FooProperty;</div><div>                                    ^</div><div>ref-bug.mm:5:1: note: declared here</div><div>- (Foo &) FooProperty;</div><div>^</div><div>1 warning generated.</div></div></div></div></blockquote><br></div><div>Ah, interesting. It seems like we should allow the getter/setter to return/take parameters by reference.</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">   </span>- Doug</div><br></body></html>