[PowerPC] Collect some CallLowering arguments into a struct. [NFC]
[llvm-project.git] / clang / test / SemaObjC / attr-malloc.m
blob0874a476806ca6ce90c7c1bd29a5323835907161
1 // RUN: %clang_cc1 -verify -fsyntax-only -fblocks %s
3 @interface TestAttrMallocOnMethods {}
4 - (id) test1 __attribute((malloc)); //  expected-warning {{attribute only applies to functions}}
5 - (int) test2 __attribute((malloc)); //  expected-warning {{attribute only applies to functions}}
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 {{attribute only applies to functions}}
14 __attribute((malloc)) bptr (*g)(); //  expected-warning {{attribute only applies to functions}}
15 __attribute((malloc)) void *(^h)(); //  expected-warning {{attribute only applies to functions}}