More tests for // rdar://17259812

llvm-svn: 210798
This commit is contained in:
Fariborz Jahanian 2014-06-12 16:55:43 +00:00
parent fd85bb3424
commit 8456406cdf
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,17 @@
// RUN: %clang_cc1 -fblocks -fsyntax-only -verify %s
// RUN: %clang_cc1 -fblocks -fobjc-arc -fsyntax-only -verify %s
// expected-no-diagnostics
// rdar://17259812
typedef void (^BT) ();
class S {
BT br() __attribute__((ns_returns_retained)) {
return ^{};
}
BT br1() __attribute__((ns_returns_retained));
};
BT S::br1() {
return ^{};
}

View File

@ -11,8 +11,12 @@ BT foo() __attribute__((ns_returns_retained));
@interface I
BT foo() __attribute__((ns_returns_retained));
- (BT) Meth __attribute__((ns_returns_retained));
+ (BT) ClsMeth __attribute__((ns_returns_retained));
@end
@implementation I
BT foo() __attribute__((ns_returns_retained)) {return ^{}; }
- (BT) Meth {return ^{}; }
+ (BT) ClsMeth {return ^{}; }
@end