[libcxx-commits] [libcxx] [libc++][hardening] Categorize more 'valid-element-access' checks. (PR #71620)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Wed Nov 8 11:07:01 PST 2023


================
@@ -109,16 +109,16 @@ class common_iterator {
 
   _LIBCPP_HIDE_FROM_ABI constexpr decltype(auto) operator*()
   {
-    _LIBCPP_ASSERT_UNCATEGORIZED(std::holds_alternative<_Iter>(__hold_),
-                                 "Attempted to dereference a non-dereferenceable common_iterator");
+    _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(std::holds_alternative<_Iter>(__hold_),
----------------
ldionne wrote:

Can we add a test for this one?

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


More information about the libcxx-commits mailing list