[clang] [Clang] Implement the 'counted_by' attribute (PR #76348)

Sean McBride via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 19 19:06:05 PST 2024


seanm wrote:

@bwendling is there any plan / possibility for simple expressions (with no side effects)?  Like:

```c
struct libusb_bos_dev_capability_descriptor {
	uint8_t  bLength;
	uint8_t  bDescriptorType;
	uint8_t  bDevCapabilityType;
	uint8_t  dev_capability_data[] __attribute__((counted_by(bLength - 3)));
};
```


https://github.com/llvm/llvm-project/pull/76348


More information about the cfe-commits mailing list