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

Will Hawkins via libcxx-commits libcxx-commits at lists.llvm.org
Fri Dec 15 18:24:50 PST 2023


================
@@ -593,9 +593,10 @@ class _LIBCPP_TEMPLATE_VIS __parser {
           || (same_as<_CharT, wchar_t> && sizeof(wchar_t) == 2)
 #    endif
   _LIBCPP_HIDE_FROM_ABI constexpr bool __parse_fill_align(_Iterator& __begin, _Iterator __end, bool __use_range_fill) {
-    _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__begin != __end,
-                                        "when called with an empty input the function will cause "
-                                        "undefined behavior by evaluating data not in the input");
+    _LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(
+        __begin != __end,
+        "when called with an empty input the function will cause "
----------------
hawkinsw wrote:

Nit: (hopefully helpful) All other assertion messages begin with capital letters. 
```suggestion
        "When called with an empty input, the function will cause "
```

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


More information about the libcxx-commits mailing list