| 1 |
// RUN: %clang_cc1 -ast-print %s -o - | FileCheck %s |
| 2 |
|
| 3 |
@interface NSObject @end |
| 4 |
|
| 5 |
@protocol P |
| 6 |
- (void)MethP __attribute__((availability(macosx,introduced=10.1.0,deprecated=10.2))); |
| 7 |
@end |
| 8 |
|
| 9 |
@interface I : NSObject <P> |
| 10 |
- (void)MethI __attribute__((availability(macosx,introduced=10.1.0,deprecated=10.2))); |
| 11 |
@end |
| 12 |
|
| 13 |
@interface I(CAT) |
| 14 |
- (void)MethCAT __attribute__((availability(macosx,introduced=10_1_0,deprecated=10_2))); |
| 15 |
@end |
| 16 |
|
| 17 |
@implementation I |
| 18 |
- (void)MethP __attribute__((availability(macosx,introduced=10.1.0,deprecated=10.2))) {} |
| 19 |
- (void)MethI __attribute__((availability(macosx,introduced=10.1.0,deprecated=10.2))) {} |
| 20 |
|
| 21 |
- (void)methodWithArg:(int)x andAnotherOne:(int)y { } |
| 22 |
@end |
| 23 |
|
| 24 |
__attribute__((availability(macosx,introduced=10.1.0,deprecated=10.2))) |
| 25 |
@interface InterfaceWithAttribute |
| 26 |
@end |
| 27 |
|
| 28 |
// CHECK: @protocol P |
| 29 |
// CHECK: - (void)MethP __attribute__((availability(macos, introduced=10.1.0, deprecated=10.2))); |
| 30 |
// CHECK: @end |
| 31 |
|
| 32 |
// CHECK: @interface I : NSObject<P> |
| 33 |
// CHECK: - (void)MethI __attribute__((availability(macos, introduced=10.1.0, deprecated=10.2))); |
| 34 |
// CHECK: @end |
| 35 |
|
| 36 |
// CHECK: @interface I(CAT) |
| 37 |
// CHECK: - (void)MethCAT __attribute__((availability(macos, introduced=10.1.0, deprecated=10.2))); |
| 38 |
// CHECK: @end |
| 39 |
|
| 40 |
// CHECK: @implementation I |
| 41 |
// CHECK: - (void)MethP __attribute__((availability(macos, introduced=10.1.0, deprecated=10.2))) { |
| 42 |
// CHECK: } |
| 43 |
|
| 44 |
// CHECK: - (void)MethI __attribute__((availability(macos, introduced=10.1.0, deprecated=10.2))) { |
| 45 |
// CHECK: } |
| 46 |
|
| 47 |
// CHECK: - (void)methodWithArg:(int)x andAnotherOne:(int)y { |
| 48 |
// CHECK: } |
| 49 |
|
| 50 |
// CHECK: @end |
| 51 |
|
| 52 |
// CHECK: __attribute__((availability(macos, introduced=10.1.0, deprecated=10.2))) |
| 53 |
// CHECK: @interface InterfaceWithAttribute |
| 54 |
// CHECK: @end |
| 55 |
|
| 56 |
@class C1; |
| 57 |
struct __attribute__((objc_bridge_related(C1,,))) S1; |
| 58 |
|
| 59 |
// CHECK: @class C1; |
| 60 |
// CHECK: struct __attribute__((objc_bridge_related(C1, , ))) S1; |
| 61 |
|
| 62 |
@interface ImplicitPropertyWithSetterOnly |
| 63 |
|
| 64 |
- (void)setX:(int)x; |
| 65 |
|
| 66 |
@end |
| 67 |
|
| 68 |
void printImplicitPropertyWithSetterOnly(ImplicitPropertyWithSetterOnly *x) { |
| 69 |
x.x = 313; // CHECK: x.x = 313; |
| 70 |
} |