blob: a1a5df96eb163521cbef3441603d3bda1336d110 [file] [log] [blame]
Ted Kremenek527042b2009-08-14 20:49:40 +00001// RUN: clang-cc -verify -fsyntax-only -fblocks %s
2
Ted Kremenek527042b2009-08-14 20:49:40 +00003@interface TestAttrMallocOnMethods {}
4- (id) test1 __attribute((malloc)); // expected-warning{{'malloc' attribute only applies to function types}}
5- (int) test2 __attribute((malloc)); // expected-warning{{'malloc' attribute only applies to function types}}
6@end
7
8id bar(void) __attribute((malloc)); // no-warning
9
10typedef void (^bptr)(void);
11bptr baz(void) __attribute((malloc)); // no-warning
12