2011-04-27 11:24:57 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -triple i386-apple-darwin9 -fobjc-gc -verify %s
|
2012-10-19 20:44:48 +08:00
|
|
|
// expected-no-diagnostics
|
2011-04-27 07:16:46 +08:00
|
|
|
|
2011-05-08 14:09:53 +08:00
|
|
|
void f0(__weak id *);
|
2011-04-27 07:16:46 +08:00
|
|
|
|
|
|
|
void test_f0(id *x) {
|
2011-05-08 14:09:53 +08:00
|
|
|
f0(x);
|
2011-04-27 07:16:46 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
@interface A
|
|
|
|
@end
|
|
|
|
|
|
|
|
void f1(__weak id*);
|
|
|
|
void test_f1(__weak A** a) {
|
|
|
|
f1(a);
|
|
|
|
}
|
|
|
|
|
|
|
|
@interface B : A
|
|
|
|
@end
|
|
|
|
|
|
|
|
void f2(__weak A**);
|
|
|
|
void test_f2(__weak B** b) {
|
|
|
|
f2(b);
|
|
|
|
}
|
|
|
|
|