1 // RUN: %clang_cc1 -triple x86_64-apple-darwin11 -emit-llvm -fobjc-arc -o - %s | FileCheck %s
4 typedef const struct __CFString * CFStringRef;
7 @property CFStringRef P;
8 - (CFStringRef) CFMeth __attribute__((cf_returns_retained));
9 - (CFStringRef) newSomething;
10 - (CFStringRef) P __attribute__((cf_returns_retained));
17 id p2 = (id)[p1 CFMeth];
18 id p3 = (id)[p1 newSomething];
21 - (CFStringRef) CFMeth { return 0; }
22 - (CFStringRef) newSomething { return 0; }
23 - (CFStringRef) P { return 0; }
24 - (void) setP : (CFStringRef)arg {}
28 CFStringRef SomeOtherFunc() __attribute__((cf_returns_retained));
31 id obj = (id)((CFStringRef) __builtin___CFStringMakeConstantString ("" "Some CF String" ""));
35 // CHECK-NOT: call i8* @objc_retainAutoreleasedReturnValue