blob: 5b13645d49a575e20d3199d0fbd7a5edf979cf88 [file] [log] [blame]
Fariborz Jahanian88b68982013-12-10 23:18:06 +00001// 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// rdar://15517899
5
6typedef struct __attribute__((objc_bridge_related(NSColor,colorWithCGColor:,CGColor))) CGColor *CGColorRef;
7
8@interface NSColor
9+ (NSColor *)colorWithCGColor:(CGColorRef)cgColor;
10@property CGColorRef CGColor;
11@end
12
13@interface NSTextField
14- (void)setBackgroundColor:(NSColor *)color;
15- (NSColor *)backgroundColor;
16@end
17
18CGColorRef Test(NSTextField *textField, CGColorRef newColor) {
19 newColor = textField.backgroundColor;
20 return textField.backgroundColor;
21}
22// CHECK:{19:38-19:38}:".CGColor"
23// CHECK:{20:34-20:34}:".CGColor"