diff options
Diffstat (limited to 'clang/test/Sema/attr-malloc.c')
-rw-r--r-- | clang/test/Sema/attr-malloc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/test/Sema/attr-malloc.c b/clang/test/Sema/attr-malloc.c index 36e8b1d6994..2ad71efebd0 100644 --- a/clang/test/Sema/attr-malloc.c +++ b/clang/test/Sema/attr-malloc.c @@ -12,6 +12,7 @@ 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 * xalloc(unsigned n) { return malloc(n); } // no-warning |