1// RUN: %clang_cc1 -fblocks -fsyntax-only -verify -Wno-objc-root-class %s 2// RUN: %clang_cc1 -x objective-c++ -fblocks -fsyntax-only -verify -Wno-objc-root-class %s 3// RUN: %clang_cc1 -fblocks -fobjc-arc -fsyntax-only -verify -Wno-objc-root-class %s 4// RUN: %clang_cc1 -x objective-c++ -fblocks -fobjc-arc -fsyntax-only -verify -Wno-objc-root-class %s 5// expected-no-diagnostics 6// rdar://17259812 7 8typedef void (^BT) (); 9 10BT foo() __attribute__((ns_returns_retained)); 11 12@interface I 13BT foo() __attribute__((ns_returns_retained)); 14- (BT) Meth __attribute__((ns_returns_retained)); 15+ (BT) ClsMeth __attribute__((ns_returns_retained)); 16@end 17 18@implementation I 19BT foo() __attribute__((ns_returns_retained)) {return ^{}; } 20- (BT) Meth {return ^{}; } 21+ (BT) ClsMeth {return ^{}; } 22@end 23