1// RUN: not %clang_cc1 -triple x86_64-apple-darwin10 -fdiagnostics-parseable-fixits -x objective-c -fobjc-arc %s 2>&1 | FileCheck %s 2// RUN: not %clang_cc1 -triple x86_64-apple-darwin10 -fdiagnostics-parseable-fixits -x objective-c++ -fobjc-arc %s 2>&1 | FileCheck %s 3// rdar://15932435 4 5typedef struct __attribute__((objc_bridge_related(UIColor,colorWithCGColor:,CGColor))) CGColor *CGColorRef; 6 7@interface UIColor 8+ (UIColor *)colorWithCGColor:(CGColorRef)cgColor; 9- (CGColorRef)CGColor; 10@end 11 12@interface UIButton 13@property(nonatomic,retain) UIColor *tintColor; 14@end 15 16void test(UIButton *myButton) { 17 CGColorRef cgColor = (CGColorRef)myButton.tintColor; 18 cgColor = myButton.tintColor; 19 20 cgColor = (CGColorRef)[myButton.tintColor CGColor]; 21 22 cgColor = (CGColorRef)[myButton tintColor]; 23} 24 25// CHECK: {17:36-17:36}:"[" 26// CHECK: {17:54-17:54}:" CGColor]" 27 28// CHECK: {18:13-18:13}:"[" 29// CHECK: {18:31-18:31}:" CGColor]" 30 31// CHECK: {22:25-22:25}:"[" 32// CHECK: {22:45-22:45}:" CGColor]" 33 34@interface ImplicitPropertyTest 35- (UIColor *)tintColor; 36@end 37 38void test1(ImplicitPropertyTest *myImplicitPropertyTest) { 39 CGColorRef cgColor = (CGColorRef)[myImplicitPropertyTest tintColor]; 40} 41 42// CHECK: {39:36-39:36}:"[" 43// CHECK: {39:70-39:70}:" CGColor]" 44