llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[BoundsSafety] Support `counted_by` on `void *` (1-byte element semantics)

Open rapidsna opened this issue 1 year ago • 0 comments

Enable counted_by attribute on void * pointers to align with upstream behavior.

Changes needed:

  • Clang codegen: Handle void * with counted_by
  • Consteval: Treat void * as 1-byte element size

Upstream treats void * with counted_by as an array of 1-byte elements. Our implementation for -fbounds-safety should match this behavior to prevent divergence.

rapidsna avatar Nov 12 '25 16:11 rapidsna