diff options
Diffstat (limited to 'clang/test/Sema/alloc_size.c')
| -rw-r--r-- | clang/test/Sema/alloc_size.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/Sema/alloc_size.c b/clang/test/Sema/alloc_size.c index ae3b4763ccd..e2f52987d1d 100644 --- a/clang/test/Sema/alloc_size.c +++ b/clang/test/Sema/alloc_size.c @@ -20,3 +20,7 @@ void* fn7(unsigned) __attribute__((alloc_size)); // expected-error {{attribute t void *fn8(int, int) __attribute__((alloc_size(1, 1))); // OK void* fn9(unsigned) __attribute__((alloc_size(12345678901234567890123))); // expected-warning {{integer constant is too large for its type}} // expected-error {{attribute parameter 1 is out of bounds}} + +void* fn10(size_t, size_t) __attribute__((alloc_size(1,2))); // expected-error{{redefinition of parameter}} \ + // expected-error{{a parameter list without types is only allowed in a function definition}} \ + // expected-warning{{alloc_size attribute only applies to functions and methods}} |

