| 1 |
// RUN: %clang_cc1 -ast-dump %s | FileCheck %s |
| 2 |
|
| 3 |
// Test that accessor stubs for default-synthesized ObjC accessors |
| 4 |
// have a valid source location. |
| 5 |
|
| 6 |
__attribute__((objc_root_class)) |
| 7 |
@interface NSObject |
| 8 |
+ (id)alloc; |
| 9 |
@end |
| 10 |
|
| 11 |
@interface NSString : NSObject |
| 12 |
@end |
| 13 |
|
| 14 |
@interface MyData : NSObject |
| 15 |
struct Data { |
| 16 |
NSString *name; |
| 17 |
}; |
| 18 |
@property struct Data data; |
| 19 |
@end |
| 20 |
// CHECK: ObjCImplementationDecl {{.*}}line:[[@LINE+2]]{{.*}} MyData |
| 21 |
// CHECK: ObjCMethodDecl {{.*}}col:23 implicit - setData: 'void' |
| 22 |
@implementation MyData |
| 23 |
@end |