llvm-project
16 строк · 432.0 Байт
1// RUN: %clang_cc1 -fsyntax-only -fobjc-arc -verify -fblocks %s
2// expected-no-diagnostics
3
4struct X0 {
5static id makeObject1() __attribute__((ns_returns_retained));
6id makeObject2() __attribute__((ns_returns_retained));
7};
8
9void test_X0(X0 x0, X0 *x0p) {
10X0::makeObject1();
11x0.makeObject2();
12x0p->makeObject2();
13id (X0::*pmf)() __attribute__((ns_returns_retained)) = &X0::makeObject2;
14(x0.*pmf)();
15(x0p->*pmf)();
16}
17