summaryrefslogtreecommitdiff
path: root/test/Analysis/blocks.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/Analysis/blocks.m')
-rw-r--r--test/Analysis/blocks.m14
1 files changed, 11 insertions, 3 deletions
diff --git a/test/Analysis/blocks.m b/test/Analysis/blocks.m
index ff376d17a1a1..54ff58c64f42 100644
--- a/test/Analysis/blocks.m
+++ b/test/Analysis/blocks.m
@@ -26,10 +26,12 @@ typedef struct _NSZone NSZone;
@protocol NSCoding - (void)encodeWithCoder:(NSCoder *)aCoder; @end
@interface NSObject <NSObject> {}
+ (id)alloc;
+- (id)copy;
@end
extern id NSAllocateObject(Class aClass, NSUInteger extraBytes, NSZone *zone);
-@interface NSString : NSObject <NSCopying, NSMutableCopying, NSCoding> - (NSUInteger)length;
-- ( const char *)UTF8String;
+@interface NSString : NSObject <NSCopying, NSMutableCopying, NSCoding>
+- (NSUInteger)length;
+- (const char *)UTF8String;
- (id)initWithFormat:(NSString *)format arguments:(va_list)argList __attribute__((format(__NSString__, 1, 0)));
@end
@class NSString, NSData;
@@ -85,4 +87,10 @@ void test2_b() {
void test2_c() {
typedef void (^myblock)(void);
myblock f = ^() { f(); }; // expected-warning{{Variable 'f' is uninitialized when captured by block}}
-} \ No newline at end of file
+}
+
+
+void testMessaging() {
+ // <rdar://problem/12119814>
+ [[^(){} copy] release];
+}