Debian Codegraph @

clang/test/Sema/attr-sized-by-vla-sizeless-types.c

raw
1 // __SVInt8_t is specific to ARM64 so specify that in the target triple
2 // RUN: %clang_cc1 -triple arm64-apple-darwin -fsyntax-only -verify %s
3 // RUN: %clang_cc1 -fexperimental-late-parse-attributes -triple arm64-apple-darwin -fsyntax-only -verify %s
4
5 #define __sized_by(f) __attribute__((sized_by(f)))
6
7 struct on_sizeless_elt_ty {
8 int count;
9 // expected-error-re@+2{{'sized_by' only applies to pointers{{$}}}}
10 // expected-error@+1{{array has sizeless element type '__SVInt8_t'}}
11 __SVInt8_t arr[] __sized_by(count);
12 };