John McCall | d1e40d5 | 2011-10-02 01:16:38 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -fobjc-arc -verify -fblocks %s |
Andy Gibbs | 8e8fb3b | 2012-10-19 12:44:48 +0000 | [diff] [blame] | 2 | // expected-no-diagnostics |
John McCall | f85e193 | 2011-06-15 23:02:42 +0000 | [diff] [blame] | 3 | |
| 4 | struct X0 { |
| 5 | static id makeObject1() __attribute__((ns_returns_retained)); |
| 6 | id makeObject2() __attribute__((ns_returns_retained)); |
| 7 | }; |
| 8 | |
| 9 | void 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 | } |