================
@@ -107,106 +107,81 @@ struct on_pointer_anon_count {
// field being unavailable.
struct on_member_pointer_complete_ty_ty_pos {
- // TODO: Allow this
- // expected-error@+1{{use of undeclared identifier 'size'}}
struct size_known *__sized_by(size) buf;
int size;
};
struct on_member_pointer_incomplete_ty_ty_pos {
- // TODO: Allow this
- // expected-error@+1{{use of undeclared identifier 'size'}}
struct size_unknown * __sized_by(size) buf;
int size;
};
struct on_member_pointer_const_incomplete_ty_ty_pos {
- // TODO: Allow this
- // expected-error@+1{{use of undeclared identifier 'size'}}
const struct size_unknown * __sized_by(size) buf;
int size;
};
struct on_member_pointer_void_ty_ty_pos {
- // TODO: This should fail because the attribute is
- // on a pointer with the pointee being an incomplete type.
- // expected-error@+1{{use of undeclared identifier 'size'}}
void *__sized_by(size) buf;
int size;
};
// -
struct on_member_pointer_fn_ptr_ty_pos {
- // TODO: buffer of `size` function pointers should be allowed
- // but fails because this isn't late parsed.
- // expected-error@+1{{use of undeclared identifier 'size'}}
void (** __sized_by(size) fn_ptr)(void);
int size;
};
struct on_member_pointer_fn_ptr_ty_ptr_ty_pos {
- // TODO: buffer of `size` function pointers should be allowed
- // but fails because this isn't late parsed.
- // expected-error@+1{{use of undeclared identifier 'size'}}
fn_ptr_ty* __sized_by(size) fn_ptr;
int size;
};
struct on_member_pointer_fn_ty_ty_pos {
- // TODO: This should fail because the attribute is
- // on a pointer with the pointee being a function type.
- // expected-error@+1{{use of undeclared identifier 'size'}}
+ // expected-error@+1{{'sized_by' cannot be applied to a pointer with pointee
of unknown size because 'void (void)' is a function type}}
void (* __sized_by(size) fn_ptr)(void);
int size;
};
struct on_member_pointer_fn_ptr_ty_ty_pos {
- // TODO: buffer of `size` function pointers should be allowed
- // expected-error@+1{{use of undeclared identifier 'size'}}
void (** __sized_by(size) fn_ptr)(void);
int size;
};
struct on_member_pointer_fn_ptr_ty_typedef_ty_pos {
- // TODO: This should be allowed with sized_by.
- // expected-error@+1{{use of undeclared identifier 'size'}}
+ // expected-error@+1{{'sized_by' cannot be applied to a pointer with pointee
of unknown size because 'void (void)' is a function type}}
fn_ptr_ty __sized_by(size) fn_ptr;
int size;
};
struct on_member_pointer_fn_ptr_ty_ty_pos_inner {
- // TODO: This should be allowed with sized_by.
- // expected-error@+1{{use of undeclared identifier 'size'}}
+ // expected-error@+1{{}}
----------------
rapidsna wrote:
Fixed!
https://github.com/llvm/llvm-project/pull/166491
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits