[libc-commits] [libc] [libc] fix behavior of strrchr(x, '\0') (PR #112620)

Nick Desaulniers via libc-commits libc-commits at lists.llvm.org
Wed Oct 16 14:37:37 PDT 2024


nickdesaulniers wrote:

Thanks for the patch! Yes, that's a bug!

I thought the nice thing about `ASSERT_EQ` or in this case `ASSERT_STREQ` is that when the assertion fails, it tells you what was expected vs what was observed (i.e. `NULL` vs `'a'`) rather than `expected true, saw false`? I think that kind of behavior is nice to retain.

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


More information about the libc-commits mailing list