Debian Codegraph @

clang/test/FixIt/fixit-objc-direct.m

raw
1 // Objective-C recovery
2 // RUN: not %clang_cc1 -triple x86_64-apple-darwin10 -fdiagnostics-parseable-fixits -x objective-c %s 2>&1 | FileCheck -check-prefix=CHECK-MRR %s
3 // RUN: not %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-arc -fdiagnostics-parseable-fixits -x objective-c %s 2>&1 | FileCheck -check-prefix=CHECK-ARC %s
4
5 __attribute__((objc_root_class))
6 @interface Root
7 + (void)classDirectMethod __attribute__((objc_direct));
8 + (void)classDirectMethod2 __attribute__((objc_direct));
9 - (void)instanceDirectMethod __attribute__((objc_direct));
10 @end
11
12 @interface A : Root
13 @end
14
15 @implementation A
16 + (void)classMethod {
17 // CHECK-MRR: {18:4-18:8}:"Root"
18 [self classDirectMethod];
19 }
20 + (void)classMethod2 {
21 // CHECK-MRR: {23:4-23:9}:"Root"
22 // CHECK-ARC: {23:4-23:9}:"self"
23 [super classDirectMethod2];
24 }
25 - (void)instanceMethod {
26 // CHECK-MRR: {28:4-28:9}:"self"
27 // CHECK-ARC: {28:4-28:9}:"self"
28 [super instanceDirectMethod];
29 }
30 @end