[libc-commits] [PATCH] D150678: [libc][test] Improve memory check reporting

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Tue May 16 09:11:23 PDT 2023


sivachandra added inline comments.


================
Comment at: libc/test/src/string/memory_utils/memory_check_utils.h:111
 bool CheckBcmp(cpp::span<char> span1, cpp::span<char> span2, size_t size) {
+  const auto error = [=](const char *msg, int cmp,
+                         size_t mismatch_index) -> bool {
----------------
I did not look enough to see if the logging parts are runtime code or test only code. If it is test only, may be add a comment saying that? If not, then a better approach is to use `LIBC_ASSERT`:  https://github.com/llvm/llvm-project/blob/main/libc/src/__support/libc_assert.h


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150678/new/

https://reviews.llvm.org/D150678



More information about the libc-commits mailing list