[Heikki Kultala] This patch contains the ABI changes for the TCE target.
[clang.git] / test / SemaObjC / attr-malloc.m
bloba504b333b51fa8b10d3840869e8d3ff0ca296b0f
1 // RUN: %clang_cc1 -verify -fsyntax-only -fblocks %s
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
8 id bar(void) __attribute((malloc)); // no-warning
10 typedef void (^bptr)(void);
11 bptr baz(void) __attribute((malloc)); // no-warning
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}}