llvm-project
3d333bcc - [Clang][counted_by][NFC] Add missing tests for counted_by and __builtin_counted_by_ref (#232223)

Commit
4 days ago
[Clang][counted_by][NFC] Add missing tests for counted_by and __builtin_counted_by_ref (#232223) Add Sema coverage for __builtin_counted_by_ref: - a bit-field counter on a 'counted_by' pointer (not just a FAM), - the '_or_null' and 'sized_by' variants, which return 'void *', - qualified, enum, and typedef counter types, which determine the returned pointee type, - nested, anonymous, by-value, and subscripted bases. Add CodeGen coverage for the base-expression shapes reaching a counted_by flexible array member, for both __builtin_dynamic_object_size and -fsanitize=array-bounds: call and side-effecting bases (which __bdos must not re-evaluate), pointer chains, conditional bases, negative constant indices, enum counters, and mixed index widths.
Author
Parents
Loading