[-Wunsafe-buffer-usage] Warning for unsafe invocation of span::data (#75650)
…-Wunsafe-buffer-usage,
there maybe accidental re-introduction of new OutOfBound accesses into
the code bases. One such case is invoking span::data() method on a span
variable to retrieve a pointer, which is then cast to a larger type and
dereferenced. Such dereferences can introduce OutOfBound accesses.
To address this, a new WarningGadget is being introduced to warn against
such invocations.
---------
Co-authored-by:
MalavikaSamak <malavika2@apple.com>
parent
e32b1d15
Please register or sign in to comment