xref: /llvm-project/clang/test/SemaObjCXX/overload-gc.mm (revision c6e68daac0fa6e77a89f3ca72f266a528503dd1c)
1713dab56SDouglas Gregor// RUN: %clang_cc1 -fsyntax-only -triple i386-apple-darwin9 -fobjc-gc -verify %s
2*c6e68daaSAndy Gibbs// expected-no-diagnostics
3aec25847SDouglas Gregor
4f30053d1SDouglas Gregorvoid f0(__weak id *);
5aec25847SDouglas Gregor
6aec25847SDouglas Gregorvoid test_f0(id *x) {
7f30053d1SDouglas Gregor  f0(x);
8aec25847SDouglas Gregor}
9aec25847SDouglas Gregor
10aec25847SDouglas Gregor@interface A
11aec25847SDouglas Gregor@end
12aec25847SDouglas Gregor
13aec25847SDouglas Gregorvoid f1(__weak id*);
14aec25847SDouglas Gregorvoid test_f1(__weak A** a) {
15aec25847SDouglas Gregor  f1(a);
16aec25847SDouglas Gregor}
17aec25847SDouglas Gregor
18aec25847SDouglas Gregor@interface B : A
19aec25847SDouglas Gregor@end
20aec25847SDouglas Gregor
21aec25847SDouglas Gregorvoid f2(__weak A**);
22aec25847SDouglas Gregorvoid test_f2(__weak B** b) {
23aec25847SDouglas Gregor  f2(b);
24aec25847SDouglas Gregor}
25aec25847SDouglas Gregor
26