blob: e419237bbbac375f2947e9876145c44b8c5fabb8 [file] [log] [blame]
Fariborz Jahanianaae7fef2014-10-03 20:05:33 +00001// 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)
Fariborz Jahanian2618dba2014-10-06 16:46:02 +000014- (void)MethCAT __attribute__((availability(macosx,introduced=10_1_0,deprecated=10_2)));
Fariborz Jahanianaae7fef2014-10-03 20:05:33 +000015@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@end
21
22// CHECK: @protocol P
Manman Renccf25bb2016-06-28 20:55:30 +000023// CHECK: - (void) MethP __attribute__((availability(macos, introduced=10.1.0, deprecated=10.2)));
Fariborz Jahanianaae7fef2014-10-03 20:05:33 +000024// CHECK: @end
25
26// CHECK: @interface I : NSObject<P>
Manman Renccf25bb2016-06-28 20:55:30 +000027// CHECK: - (void) MethI __attribute__((availability(macos, introduced=10.1.0, deprecated=10.2)));
Fariborz Jahanianaae7fef2014-10-03 20:05:33 +000028// CHECK: @end
29
30// CHECK: @interface I(CAT)
Manman Renccf25bb2016-06-28 20:55:30 +000031// CHECK: - (void) MethCAT __attribute__((availability(macos, introduced=10_1_0, deprecated=10_2)));
Fariborz Jahanianaae7fef2014-10-03 20:05:33 +000032// CHECK: @end
33
34// CHECK: @implementation I
Manman Renccf25bb2016-06-28 20:55:30 +000035// CHECK: - (void) MethP __attribute__((availability(macos, introduced=10.1.0, deprecated=10.2))) {
Fariborz Jahanianaae7fef2014-10-03 20:05:33 +000036// CHECK: }
37
Manman Renccf25bb2016-06-28 20:55:30 +000038// CHECK: - (void) MethI __attribute__((availability(macos, introduced=10.1.0, deprecated=10.2))) {
Fariborz Jahanianaae7fef2014-10-03 20:05:33 +000039// CHECK: }
40
41// CHECK: @end
Akira Hatanaka3d173132016-09-10 03:29:43 +000042
43@class C1;
44struct __attribute__((objc_bridge_related(C1,,))) S1;
45
46// CHECK: @class C1;
47// CHECK: struct __attribute__((objc_bridge_related(C1, , ))) S1;