blob: 09556e396cdd036e84ddd72e8aad84055130aca3 [file] [log] [blame]
John McCalld1e40d52011-10-02 01:16:38 +00001// RUN: %clang_cc1 -fsyntax-only -fobjc-arc -verify -fblocks %s
Andy Gibbs8e8fb3b2012-10-19 12:44:48 +00002// expected-no-diagnostics
John McCallf85e1932011-06-15 23:02:42 +00003
4struct X0 {
5 static id makeObject1() __attribute__((ns_returns_retained));
6 id makeObject2() __attribute__((ns_returns_retained));
7};
8
9void test_X0(X0 x0, X0 *x0p) {
10 X0::makeObject1();
11 x0.makeObject2();
12 x0p->makeObject2();
13 id (X0::*pmf)() __attribute__((ns_returns_retained)) = &X0::makeObject2;
14 (x0.*pmf)();
15 (x0p->*pmf)();
16}