1// RUN: %clang_cc1 -verify -fsyntax-only -fblocks %s 2 3@interface TestAttrMallocOnMethods {} 4- (id) test1 __attribute((malloc)); // expected-warning {{functions returning a pointer type}} 5- (int) test2 __attribute((malloc)); // expected-warning {{functions returning a pointer type}} 6@end 7 8id bar(void) __attribute((malloc)); // no-warning 9 10typedef void (^bptr)(void); 11bptr baz(void) __attribute((malloc)); // no-warning 12 13__attribute((malloc)) id (*f)(); // expected-warning {{functions returning a pointer type}} 14__attribute((malloc)) bptr (*g)(); // expected-warning {{functions returning a pointer type}} 15__attribute((malloc)) void *(^h)(); // expected-warning {{functions returning a pointer type}} 16 17