[libc-commits] [libc] [libc] Expand usage of libc null checks. (PR #116262)

Nick Desaulniers via libc-commits libc-commits at lists.llvm.org
Fri Feb 7 13:11:06 PST 2025


================
@@ -19,6 +20,8 @@ namespace LIBC_NAMESPACE_DECL {
 template <typename Comp>
 LIBC_INLINE constexpr char *inline_strstr(const char *haystack,
                                           const char *needle, Comp &&comp) {
+  LIBC_CRASH_ON_NULLPTR(haystack);
+  LIBC_CRASH_ON_NULLPTR(needle);
----------------
nickdesaulniers wrote:

So in other cases, you moved the checks out of the helpers and into the entrypoints. Not so here, which seems inconsistent.

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


More information about the libc-commits mailing list