xref: /aosp_15_r20/external/clang/test/FixIt/fixit-objc-bridge-related-property.m (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li// RUN: not %clang_cc1  -triple x86_64-apple-darwin10  -fdiagnostics-parseable-fixits -x objective-c %s 2>&1  | FileCheck %s
2*67e74705SXin Li// RUN: not %clang_cc1  -triple x86_64-apple-darwin10  -fobjc-arc -fdiagnostics-parseable-fixits -x objective-c %s 2>&1  | FileCheck %s
3*67e74705SXin Li// RUN: not %clang_cc1  -triple x86_64-apple-darwin10  -fdiagnostics-parseable-fixits -x objective-c++ %s 2>&1  | FileCheck %s
4*67e74705SXin Li// rdar://15517899
5*67e74705SXin Li
6*67e74705SXin Litypedef struct __attribute__((objc_bridge_related(NSColor,colorWithCGColor:,CGColor))) CGColor *CGColorRef;
7*67e74705SXin Li
8*67e74705SXin Li@interface NSColor
9*67e74705SXin Li+ (NSColor *)colorWithCGColor:(CGColorRef)cgColor;
10*67e74705SXin Li@property CGColorRef CGColor;
11*67e74705SXin Li@end
12*67e74705SXin Li
13*67e74705SXin Li@interface NSTextField
14*67e74705SXin Li- (void)setBackgroundColor:(NSColor *)color;
15*67e74705SXin Li- (NSColor *)backgroundColor;
16*67e74705SXin Li@end
17*67e74705SXin Li
18*67e74705SXin LiCGColorRef Test(NSTextField *textField, CGColorRef newColor) {
19*67e74705SXin Li newColor = textField.backgroundColor;
20*67e74705SXin Li return textField.backgroundColor;
21*67e74705SXin Li}
22*67e74705SXin Li// CHECK:{19:38-19:38}:".CGColor"
23*67e74705SXin Li// CHECK:{20:34-20:34}:".CGColor"
24