[libc-commits] [PATCH] D85790: [libc][NFC] Extend <ASSERT|EXPECT>_STR* macros to compare with nullptr.

Alex Brachet via Phabricator via libc-commits libc-commits at lists.llvm.org
Tue Aug 11 15:28:12 PDT 2020


abrachet added inline comments.


================
Comment at: libc/utils/UnitTest/Test.cpp:245-246
                      unsigned long Line) {
+  if (LHS == nullptr || RHS == nullptr)
+    return LHS == RHS;
   return internal::test(Ctx, Cond_EQ, llvm::StringRef(LHS),
----------------
These should use `internal::test(Ctx, Cond_EQ, LHS, RHS, ...)` so we get nice error messages and are actually reported as failures.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85790



More information about the libc-commits mailing list