1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fsyntax-only -fobjc-arc -verify -fblocks %s 2*f4a2713aSLionel Sambuc// expected-no-diagnostics 3*f4a2713aSLionel Sambuc 4*f4a2713aSLionel Sambucstruct X0 { 5*f4a2713aSLionel Sambuc static id makeObject1() __attribute__((ns_returns_retained)); 6*f4a2713aSLionel Sambuc id makeObject2() __attribute__((ns_returns_retained)); 7*f4a2713aSLionel Sambuc}; 8*f4a2713aSLionel Sambuc 9*f4a2713aSLionel Sambucvoid test_X0(X0 x0, X0 *x0p) { 10*f4a2713aSLionel Sambuc X0::makeObject1(); 11*f4a2713aSLionel Sambuc x0.makeObject2(); 12*f4a2713aSLionel Sambuc x0p->makeObject2(); 13*f4a2713aSLionel Sambuc id (X0::*pmf)() __attribute__((ns_returns_retained)) = &X0::makeObject2; 14*f4a2713aSLionel Sambuc (x0.*pmf)(); 15*f4a2713aSLionel Sambuc (x0p->*pmf)(); 16*f4a2713aSLionel Sambuc} 17