2011-03-29 00:23:34 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -fblocks -verify %s
|
2012-10-19 20:44:48 +08:00
|
|
|
// expected-no-diagnostics
|
2011-03-28 03:53:47 +08:00
|
|
|
// rdar://9181463
|
|
|
|
|
|
|
|
typedef struct objc_class *Class;
|
|
|
|
|
|
|
|
typedef struct objc_object {
|
|
|
|
Class isa;
|
|
|
|
} *id;
|
|
|
|
|
|
|
|
@interface NSObject
|
|
|
|
+ (id) alloc;
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
|
void foo(Class self) {
|
|
|
|
[self alloc];
|
2011-03-29 00:23:34 +08:00
|
|
|
(^() {
|
|
|
|
[self alloc];
|
|
|
|
})();
|
2011-03-28 03:53:47 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void bar(Class self) {
|
|
|
|
Class y = self;
|
|
|
|
[y alloc];
|
|
|
|
}
|
|
|
|
|