2013-09-28 04:21:48 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class -disable-objc-default-synthesize-properties %s
|
2010-01-20 09:51:55 +08:00
|
|
|
|
|
|
|
@protocol PROTOCOL0
|
|
|
|
@required
|
2011-08-28 05:55:47 +08:00
|
|
|
@property float MyProperty0; // expected-note 2 {{property declared}}
|
2010-01-20 09:51:55 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
@protocol PROTOCOL<PROTOCOL0>
|
|
|
|
@required
|
2011-08-28 05:55:47 +08:00
|
|
|
@property float MyProperty; // expected-note 2 {{property declared}}
|
2010-01-20 09:51:55 +08:00
|
|
|
@optional
|
|
|
|
@property float OptMyProperty;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface I <PROTOCOL>
|
|
|
|
@end
|
|
|
|
|
2011-08-28 05:55:47 +08:00
|
|
|
@implementation I @end // expected-warning {{property 'MyProperty0' requires method 'MyProperty0' to be defined}} \
|
|
|
|
// expected-warning {{property 'MyProperty0' requires method 'setMyProperty0:' to be defined}}\
|
|
|
|
// expected-warning {{property 'MyProperty' requires method 'MyProperty' to be defined}} \
|
|
|
|
// expected-warning {{property 'MyProperty' requires method 'setMyProperty:' to be defined}}
|
2011-09-27 08:23:52 +08:00
|
|
|
|
|
|
|
// rdar://10120691
|
|
|
|
// property is implemented in super class. No warning
|
|
|
|
|
|
|
|
@protocol PROTOCOL1
|
|
|
|
@property int MyProp;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface superclass
|
|
|
|
@property int MyProp;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface childclass : superclass <PROTOCOL1>
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation childclass
|
|
|
|
@end
|
|
|
|
|