[clang] [WIP][-Wunsafe-buffer-usage] Start emitting std::array fixits (PR #68037)

Artem Dergachev via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 11 14:25:10 PDT 2023


haoNoQ wrote:

We will need a new warning text here. "To preserve bounds information" isn't our goal; the traditional C array already preserves bounds information as part of the type. Theoretically, we could teach the compiler to harden all raw C array operations without converting it to `std::array`; the bounds information is already there. The message should say that `std::array` is beneficial because it takes advantage of *library*-level hardening.

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


More information about the cfe-commits mailing list