Lines Matching refs:malloc
6 // Declare malloc here explicitly so we don't depend on system headers.
7 void * malloc(size_t) __attribute((malloc));
9 int no_vars __attribute((malloc)); // expected-warning {{functions returning a pointer type}}
11 void returns_void (void) __attribute((malloc)); // expected-warning {{functions returning a pointer type}}
12 int returns_int (void) __attribute((malloc)); // expected-warning {{functions returning a pointer type}}
13 int * returns_intptr(void) __attribute((malloc)); // no-warning
15 iptr returns_iptr (void) __attribute((malloc)); // no-warning
17 __attribute((malloc)) void *(*f)(); // expected-warning{{'malloc' attribute only applies to functions returning a pointer type}}
18 __attribute((malloc)) int (*g)(); // expected-warning{{'malloc' attribute only applies to functions returning a pointer type}}
20 __attribute((malloc))
21 void * xalloc(unsigned n) { return malloc(n); } // no-warning
26 void * xalloc2(unsigned n) { return malloc(n); }