[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / SemaObjC / disable-direct-method.m
bloba6fdaba3355117bcce64c8ff74fbdc8e3f97743c
1 // RUN: %clang_cc1 -verify -fobjc-disable-direct-methods-for-testing %s
3 // expected-no-diagnostics
5 #define DIRECT __attribute__((objc_direct))
6 #define DIRECT_MEMBERS __attribute__((objc_direct_members))
8 __attribute__((objc_root_class))
9 @interface X
10 -(void)direct_method DIRECT;
11 @end
13 @implementation X
14 -(void)direct_method DIRECT {}
15 @end
17 __attribute__((objc_root_class))
18 DIRECT_MEMBERS
19 @interface Y
20 -(void)direct_method2;
21 @end
23 @implementation Y
24 -(void)direct_method2 {}
25 @end
27 __attribute__((objc_root_class))
28 @interface Z
29 @property (direct) int direct_property;
30 @end
32 @implementation Z @end