[PowerPC] Collect some CallLowering arguments into a struct. [NFC]
[llvm-project.git] / clang / test / SemaObjC / property-ambiguous-synthesis.m
blob5c652fa472e7c90d8f09e46e9fad5f56c3170fd7
1 // RUN: %clang_cc1  -fsyntax-only -verify -Wno-objc-root-class %s
2 // rdar://13075400
4 @protocol FooAsID
5 @property (assign) id foo; // expected-note 2 {{it could also be property of type 'id' declared here}} \\
6                          // expected-warning {{property of type 'id' was selected for synthesis}}
7 @end
9 @protocol FooAsDouble
10 @property double foo; // expected-warning 2 {{property of type 'double' was selected for synthesis}} \
11                       // expected-note {{it could also be property of type 'double' declared here}}
12 @end
14 @protocol FooAsShort
15 @property short foo; // expected-note {{it could also be property of type 'short' declared here}}
16 @end
18 @interface NSObject @end
20 @interface AnObject : NSObject<FooAsDouble,FooAsID>
21 @end
23 @interface Sub : AnObject
24 @end
26 @implementation Sub
27 @synthesize foo=_MyFooIvar; // expected-note {{property synthesized here}}
28 @end
31 @interface AnotherObject : NSObject<FooAsDouble, FooAsID,FooAsDouble, FooAsID, FooAsDouble,FooAsID>
32 @end
34 @implementation AnotherObject
35 @synthesize foo=_MyFooIvar; // expected-note {{property synthesized here}}
36 @end
39 @interface YetAnotherObject : NSObject<FooAsID,FooAsShort, FooAsDouble,FooAsID, FooAsShort>
40 @end
42 @implementation YetAnotherObject
43 @synthesize foo=_MyFooIvar; // expected-note {{property synthesized here}}
44 @end
46 double func(YetAnotherObject *object) {
47   return [object foo]; // expected-error {{returning 'id' from a function with incompatible result type 'double'}}