Debian Codegraph @

clang/test/FixIt/fixit-objc-bridge-related-property.m

raw
1 // RUN: not %clang_cc1 -triple x86_64-apple-darwin10 -fdiagnostics-parseable-fixits -x objective-c %s 2>&1 | FileCheck %s
2 // RUN: not %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-arc -fdiagnostics-parseable-fixits -x objective-c %s 2>&1 | FileCheck %s
3 // RUN: not %clang_cc1 -triple x86_64-apple-darwin10 -fdiagnostics-parseable-fixits -x objective-c++ %s 2>&1 | FileCheck %s
4
5 typedef struct __attribute__((objc_bridge_related(NSColor,colorWithCGColor:,CGColor))) CGColor *CGColorRef;
6
7 @interface NSColor
8 + (NSColor *)colorWithCGColor:(CGColorRef)cgColor;
9 @property CGColorRef CGColor;
10 @end
11
12 @interface NSTextField
13 - (void)setBackgroundColor:(NSColor *)color;
14 - (NSColor *)backgroundColor;
15 @end
16
17 CGColorRef Test(NSTextField *textField, CGColorRef newColor) {
18 newColor = textField.backgroundColor;
19 return textField.backgroundColor;
20 }
21 // CHECK:{18:38-18:38}:".CGColor"
22 // CHECK:{19:34-19:34}:".CGColor"