[-Wunsafe-buffer-usage] Fix-Its transforming `&DRE[any]` to `&DRE.data()[any]`
For an expression of the form `&DRE[any]` under an Unspecified Pointer Context (UPC), we generate a fix-it for it with respect to a strategy. In case the strategy is `std::span` (it is the only supported one for now), the fix-it replaces the expression with `&DRE.data()[any]`. A UPC includes at least the contexts where - the expression is being casted to an integer; and - the expression is an argument of a call to a function that is not marked unsafe. Reviewed by: NoQ, malavikasamak, t-rasmud, jkorous Differential revision: https://reviews.llvm.org/D143128
Loading