On Oct 14, 2011, at 11:40 AM, Douglas Gregor wrote:

> 
> On Oct 14, 2011, at 11:31 AM, Fariborz Jahanian wrote:
> 
>> Author: fjahanian
>> Date: Fri Oct 14 13:31:36 2011
>> New Revision: 141966
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=141966&view=rev
>> Log:
>> Make value kind based on the return type of the getter, not
>> property type, for when getter may be a reference type.
>> // rdar://10188258 revised.
> 
> Dare I ask for a test case?

Interesting that you asked. Currently, we warn for the getter (but not on the 
setter!). Need to fix it before sending a test case.

struct Foo {int i;};

@interface ObjCTest  { }
@property (nonatomic, readonly) Foo FooProperty;
- (Foo &) FooProperty;
- (void)  SetFooProperty : (Foo &) arg;
@end

% clang -fsyntax-only ref-bug.mm 
ref-bug.mm:4:37: warning: type of property 'FooProperty' does not match type of 
accessor 'FooProperty'
@property (nonatomic, readonly) Foo FooProperty;
                                    ^
ref-bug.mm:5:1: note: declared here
- (Foo &) FooProperty;
^
1 warning generated.

- Fariborz



> 
>       - Doug
> 

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to