<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br><div><div><div>On Oct 17, 2011, at 9:10 AM, 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 16, 2011, at 12:29 PM, Chad Rosier 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; ">Hi Fariborz,<div>I believe this commit is causing a failure.</div><div><span class="Apple-style-span" style="font-family: Times; "><pre style="font-family: 'Courier New', courier, monotype; "><span class="stdout" style="font-family: 'Courier New', courier, monotype; color: black; ">FAIL: SingleSource/UnitTests/ObjC++/property-reference-object.exec (742 of 868)</span></pre></span></div><div>Mind taking a look?</div></div></blockquote>Test is fixed in r142190.</div></div></blockquote><div><br></div><div>Great, thanks!</div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>- Fariborz</div><div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div> Chad</div><div><br></div><div><br><div><div>On Oct 15, 2011, at 10:36 AM, Fariborz Jahanian wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Author: fjahanian<br>Date: Sat Oct 15 12:36:49 2011<br>New Revision: 142075<br><br>URL: <a href="http://llvm.org/viewvc/llvm-project?rev=142075&view=rev">http://llvm.org/viewvc/llvm-project?rev=142075&view=rev</a><br>Log:<br>obj-c++: allow the getter/setter to return/take parameters<br>by reference. // <a href="rdar://10188258">rdar://10188258</a><br><br>Modified:<br> cfe/trunk/lib/Sema/SemaExpr.cpp<br> cfe/trunk/lib/Sema/SemaObjCProperty.cpp<br> cfe/trunk/test/CodeGenObjCXX/property-object-reference.mm<br><br>Modified: cfe/trunk/lib/Sema/SemaExpr.cpp<br>URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=142075&r1=142074&r2=142075&view=diff">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=142075&r1=142074&r2=142075&view=diff</a><br>==============================================================================<br>--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)<br>+++ cfe/trunk/lib/Sema/SemaExpr.cpp Sat Oct 15 12:36:49 2011<br>@@ -7264,13 +7264,14 @@<br> return;<br> }<br> }<br>- } else if (getLangOptions().ObjCAutoRefCount) {<br>+ } else {<br> const ObjCMethodDecl *setter<br> = PropRef->getExplicitProperty()->getSetterMethodDecl();<br> if (setter) {<br> ObjCMethodDecl::param_const_iterator P = setter->param_begin();<br> LHSTy = (*P)->getType();<br>- Consumed = (*P)->hasAttr<NSConsumedAttr>();<br>+ if (getLangOptions().ObjCAutoRefCount)<br>+ Consumed = (*P)->hasAttr<NSConsumedAttr>();<br> }<br> }<br><br>@@ -7285,6 +7286,7 @@<br> checkRetainCycles(const_cast<Expr*>(PropRef->getBase()), RHS.get());<br> }<br> }<br>+ LHSTy = LHSTy.getNonReferenceType();<br> }<br><br><br><br>Modified: cfe/trunk/lib/Sema/SemaObjCProperty.cpp<br>URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaObjCProperty.cpp?rev=142075&r1=142074&r2=142075&view=diff">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaObjCProperty.cpp?rev=142075&r1=142074&r2=142075&view=diff</a><br>==============================================================================<br>--- cfe/trunk/lib/Sema/SemaObjCProperty.cpp (original)<br>+++ cfe/trunk/lib/Sema/SemaObjCProperty.cpp Sat Oct 15 12:36:49 2011<br>@@ -948,7 +948,8 @@<br> ObjCMethodDecl *GetterMethod,<br> SourceLocation Loc) {<br> if (GetterMethod &&<br>- GetterMethod->getResultType() != property->getType()) {<br>+ GetterMethod->getResultType().getNonReferenceType() <br>+ != property->getType().getNonReferenceType()) {<br> AssignConvertType result = Incompatible;<br> if (property->getType()->isObjCObjectPointerType())<br> result = CheckAssignmentConstraints(Loc, GetterMethod->getResultType(),<br>@@ -1510,7 +1511,8 @@<br> Diag(SetterMethod->getLocation(), diag::err_setter_type_void);<br> if (SetterMethod->param_size() != 1 ||<br> !Context.hasSameUnqualifiedType(<br>- (*SetterMethod->param_begin())->getType(), property->getType())) {<br>+ (*SetterMethod->param_begin())->getType().getNonReferenceType(), <br>+ property->getType().getNonReferenceType())) {<br> Diag(property->getLocation(),<br> diag::warn_accessor_property_type_mismatch)<br> << property->getDeclName()<br><br>Modified: cfe/trunk/test/CodeGenObjCXX/property-object-reference.mm<br>URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/property-object-reference.mm?rev=142075&r1=142074&r2=142075&view=diff">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/property-object-reference.mm?rev=142075&r1=142074&r2=142075&view=diff</a><br>==============================================================================<br>--- cfe/trunk/test/CodeGenObjCXX/property-object-reference.mm (original)<br>+++ cfe/trunk/test/CodeGenObjCXX/property-object-reference.mm Sat Oct 15 12:36:49 2011<br>@@ -2,9 +2,14 @@<br> // <a href="rdar://10188258">rdar://10188258</a><br><br> struct Foo {int i;};<br>+static Foo gFoo;<br>+<br><br> @interface ObjCTest { }<br> @property (nonatomic, readonly) Foo& FooRefProperty;<br>+@property (nonatomic) Foo FooProperty;<br>+- (Foo &) FooProperty;<br>+- (void)setFooProperty : (Foo &) arg;<br> @end<br><br><br>@@ -13,11 +18,18 @@<br><br> -(void) test {<br> Foo& f = self.FooRefProperty;<br>+ Foo& f1 = self.FooProperty;<br> }<br>+- (Foo &) FooProperty { return gFoo; }<br>+- (void)setFooProperty : (Foo &) arg { };<br> @end<br><br> // CHECK: [[T0:%.*]] = load {{%.*}} [[S0:%.*]]<br> // CHECK: load i8** @"\01L_OBJC_SELECTOR_REFERENCES_<br> // CHECK: [[T2:%.*]] = bitcast {{%.*}} [[T0]] to i8*<br> // CHECK: @objc_msgSend<br>+// CHECK: [[R0:%.*]] = load {{%.*}} [[U0:%.*]]<br>+// CHECK: load i8** @"\01L_OBJC_SELECTOR_REFERENCES_<br>+// CHECK: [[R2:%.*]] = bitcast {{%.*}} [[R0]] to i8*<br>+// CHECK: @objc_msgSend<br><br><br><br>_______________________________________________<br>cfe-commits mailing list<br><a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br></div></blockquote></div><br></div></div></blockquote></div><br></div></blockquote></div><br></div></div></body></html>