blob: a37e6af5c41e55d4cfb4ecb283dff166369a5d85 [file] [log] [blame]
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fblocks -fsyntax-only -fobjc-arc -x objective-c %s.result -D__IPHONE_OS_VERSION_MIN_REQUIRED=50000
// RUN: arcmt-test --args -arch x86_64 %s -D__IPHONE_OS_VERSION_MIN_REQUIRED=50000 > %t
// RUN: diff %t %s.result
#include "Common.h"
@interface Foo : NSObject
-(Foo *)something;
@end
void bar(void (^block)());
void test1(Foo *p) {
__weak Foo *x = p; // __block used just to break cycle.
bar(^{
[x something];
});
}
void test2(Foo *p) {
__block Foo *x; // __block used as output variable.
bar(^{
x = [p something];
});
}