[libcxx-commits] [libcxx] [libc++] Add unsafe-buffer-usage attributes to span, vector, string and string_view (PR #119603)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Dec 11 10:16:07 PST 2024
================
@@ -115,4 +115,10 @@
#endif // _LIBCPP_HARDENING_MODE == _LIBCPP_HARDENING_MODE_FAST
// clang-format on
+#if _LIBCPP_HARDENING_MODE == _LIBCPP_HARDENING_MODE_NONE
----------------
ldionne wrote:
It would be really nice if these attributes could automatically be added via the `_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS` assertion macro instead, since we pretty much want to have this attribute on each function that has such preconditions.
https://github.com/llvm/llvm-project/pull/119603
More information about the libcxx-commits
mailing list