Could you add test cases for: - an ObjC method returning block and getting annotated with the attribute - a C++ method returning block
On Jun 11, 2014, at 2:22 PM, Fariborz Jahanian <[email protected]> wrote: > Added: 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=210706&view=auto > ============================================================================== > --- cfe/trunk/test/SemaObjC/ns_returns_retained_block_return.m (added) > +++ cfe/trunk/test/SemaObjC/ns_returns_retained_block_return.m Wed Jun 11 > 16:22:53 2014 > @@ -0,0 +1,18 @@ > +// RUN: %clang_cc1 -fblocks -fsyntax-only -verify -Wno-objc-root-class %s > +// RUN: %clang_cc1 -x objective-c++ -fblocks -fsyntax-only -verify > -Wno-objc-root-class %s > +// RUN: %clang_cc1 -fblocks -fobjc-arc -fsyntax-only -verify > -Wno-objc-root-class %s > +// RUN: %clang_cc1 -x objective-c++ -fblocks -fobjc-arc -fsyntax-only > -verify -Wno-objc-root-class %s > +// expected-no-diagnostics > +// rdar://17259812 > + > +typedef void (^BT) (); > + > +BT foo() __attribute__((ns_returns_retained)); > + > +@interface I > +BT foo() __attribute__((ns_returns_retained)); > +@end > + > +@implementation I > +BT foo() __attribute__((ns_returns_retained)) {return ^{}; } > +@end
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
