r210798 - More tests for // rdar://17259812
Fariborz Jahanian
fjahanian at apple.com
Thu Jun 12 09:55:43 PDT 2014
Author: fjahanian
Date: Thu Jun 12 11:55:43 2014
New Revision: 210798
URL: http://llvm.org/viewvc/llvm-project?rev=210798&view=rev
Log:
More tests for // rdar://17259812
Added:
cfe/trunk/test/SemaCXX/ns_returns_retained_block_return.cpp
Modified:
cfe/trunk/test/SemaObjC/ns_returns_retained_block_return.m
Added: cfe/trunk/test/SemaCXX/ns_returns_retained_block_return.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/ns_returns_retained_block_return.cpp?rev=210798&view=auto
==============================================================================
--- cfe/trunk/test/SemaCXX/ns_returns_retained_block_return.cpp (added)
+++ cfe/trunk/test/SemaCXX/ns_returns_retained_block_return.cpp Thu Jun 12 11:55:43 2014
@@ -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 ^{};
+}
Modified: cfe/trunk/test/SemaObjC/ns_returns_retained_block_return.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/ns_returns_retained_block_return.m?rev=210798&r1=210797&r2=210798&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/ns_returns_retained_block_return.m (original)
+++ cfe/trunk/test/SemaObjC/ns_returns_retained_block_return.m Thu Jun 12 11:55:43 2014
@@ -11,8 +11,12 @@ BT foo() __attribute__((ns_returns_reta
@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
More information about the cfe-commits
mailing list