[libcxx-commits] [libcxx] [libc++][hardening] Categorize more assertions. (PR #75918)

Mark de Wever via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jan 5 08:26:26 PST 2024


================
@@ -4587,28 +4587,36 @@ public:
 
   // element access:
   _LIBCPP_HIDE_FROM_ABI difference_type length(size_type __sub = 0) const {
-    _LIBCPP_ASSERT_UNCATEGORIZED(ready(), "match_results::length() called when not ready");
+    // If the match results are not ready, this will return `0`.
+    _LIBCPP_ASSERT_PEDANTIC(ready(), "match_results::length() called when not ready");
     return (*this)[__sub].length();
----------------
mordante wrote:

interesting, then it seems there is a bug in our code.

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


More information about the libcxx-commits mailing list