brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 16d2586 Raw
35 lines · plain
1// Objective-C recovery2// RUN: not %clang_cc1  -triple x86_64-apple-darwin10  -fdiagnostics-parseable-fixits -x objective-c %s 2>&1  | FileCheck %s3// RUN: not %clang_cc1  -triple x86_64-apple-darwin10  -fobjc-arc -fdiagnostics-parseable-fixits -x objective-c %s 2>&1  | FileCheck %s4// RUN: not %clang_cc1  -triple x86_64-apple-darwin10  -fdiagnostics-parseable-fixits -x objective-c++ %s 2>&1  | FileCheck %s5 6typedef struct __attribute__((objc_bridge_related(NSColor,colorWithCGColor:,CGColor))) CGColor *CGColorRef;7 8@interface NSColor9+ (NSColor *)colorWithCGColor:(CGColorRef)cgColor;10- (CGColorRef)CGColor;11@end12 13@interface NSTextField14- (void)setBackgroundColor:(NSColor *)color;15- (NSColor *)backgroundColor;16@end17 18NSColor * Test1(NSTextField *textField, CGColorRef newColor) {19 textField.backgroundColor = newColor;20 return newColor;21}22 23CGColorRef Test2(NSTextField *textField, CGColorRef newColor) {24 newColor = textField.backgroundColor; // [textField.backgroundColor CGColor]25 return textField.backgroundColor;26}27// CHECK: {19:30-19:30}:"[NSColor colorWithCGColor:"28// CHECK: {19:38-19:38}:"]"29// CHECK: {20:9-20:9}:"[NSColor colorWithCGColor:"30// CHECK: {20:17-20:17}:"]"31// CHECK: {24:13-24:13}:"["32// CHECK: {24:38-24:38}:" CGColor]"33// CHECK: {25:9-25:9}:"["34// CHECK: {25:34-25:34}:" CGColor]"35