[compiler-rt] [asan] Avoid -Wpointer-bool-conversion warning by explicitly casting (PR #164906)

Thurston Dang via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 23 15:48:57 PDT 2025


================
@@ -58,15 +58,15 @@ namespace __asan {
 
 static inline uptr MaybeRealStrnlen(const char *s, uptr maxlen) {
 #if SANITIZER_INTERCEPT_STRNLEN
-  if (REAL(strnlen))
----------------
thurstond wrote:

I'm worried there might be edge cases where REAL(strnlen) is defined to be zero but not a pointer.

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


More information about the llvm-commits mailing list