| 1 |
// RUN: %clang_cc1 -verify -fobjc-disable-direct-methods-for-testing %s |
| 2 |
|
| 3 |
// expected-no-diagnostics |
| 4 |
|
| 5 |
#define DIRECT __attribute__((objc_direct)) |
| 6 |
#define DIRECT_MEMBERS __attribute__((objc_direct_members)) |
| 7 |
|
| 8 |
__attribute__((objc_root_class)) |
| 9 |
@interface X |
| 10 |
-(void)direct_method DIRECT; |
| 11 |
@end |
| 12 |
|
| 13 |
@implementation X |
| 14 |
-(void)direct_method DIRECT {} |
| 15 |
@end |
| 16 |
|
| 17 |
__attribute__((objc_root_class)) |
| 18 |
DIRECT_MEMBERS |
| 19 |
@interface Y |
| 20 |
-(void)direct_method2; |
| 21 |
@end |
| 22 |
|
| 23 |
@implementation Y |
| 24 |
-(void)direct_method2 {} |
| 25 |
@end |
| 26 |
|
| 27 |
__attribute__((objc_root_class)) |
| 28 |
@interface Z |
| 29 |
@property (direct) int direct_property; |
| 30 |
@end |
| 31 |
|
| 32 |
@implementation Z @end |