diff options
Diffstat (limited to 'clang/test/Sema/attr-malloc.c')
-rw-r--r-- | clang/test/Sema/attr-malloc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/test/Sema/attr-malloc.c b/clang/test/Sema/attr-malloc.c index 2ad71efebd0..1adcf074a49 100644 --- a/clang/test/Sema/attr-malloc.c +++ b/clang/test/Sema/attr-malloc.c @@ -3,16 +3,16 @@ #include <stdlib.h> -int no_vars __attribute((malloc)); // expected-warning {{only applies to function types}} +int no_vars __attribute((malloc)); // expected-warning {{functions returning a pointer type}} -void returns_void (void) __attribute((malloc)); // expected-warning {{functions returning pointer type}} -int returns_int (void) __attribute((malloc)); // expected-warning {{functions returning pointer type}} +void returns_void (void) __attribute((malloc)); // expected-warning {{functions returning a pointer type}} +int returns_int (void) __attribute((malloc)); // expected-warning {{functions returning a pointer type}} int * returns_intptr(void) __attribute((malloc)); // no-warning typedef int * iptr; iptr returns_iptr (void) __attribute((malloc)); // no-warning -__attribute((malloc)) void *(*f)(); // no-warning -__attribute((malloc)) int (*g)(); // expected-warning{{'malloc' attribute only applies to functions returning pointer type}} +__attribute((malloc)) void *(*f)(); // expected-warning{{'malloc' attribute only applies to functions returning a pointer type}} +__attribute((malloc)) int (*g)(); // expected-warning{{'malloc' attribute only applies to functions returning a pointer type}} __attribute((malloc)) void * xalloc(unsigned n) { return malloc(n); } // no-warning |