1 // RUN: %clang_cc1 -triple x86_64-apple-darwin11 -emit-llvm -fobjc-arc -o - %s | FileCheck %s
3 typedef const struct __CFString * CFStringRef;
6 @property CFStringRef P;
7 - (CFStringRef) CFMeth __attribute__((cf_returns_retained));
8 - (CFStringRef) newSomething;
9 - (CFStringRef) P __attribute__((cf_returns_retained));
16 id p2 = (id)[p1 CFMeth];
17 id p3 = (id)[p1 newSomething];
20 - (CFStringRef) CFMeth { return 0; }
21 - (CFStringRef) newSomething { return 0; }
22 - (CFStringRef) P { return 0; }
23 - (void) setP : (CFStringRef)arg {}
26 CFStringRef SomeOtherFunc(void) __attribute__((cf_returns_retained));
29 id obj = (id)((CFStringRef) __builtin___CFStringMakeConstantString ("" "Some CF String" ""));
33 // CHECK-NOT: call i8* @llvm.objc.retainAutoreleasedReturnValue