[PATCH] D97403: updated character tests to gtest
Asher Mancinelli via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 25 11:06:43 PST 2021
ashermancinelli added inline comments.
================
Comment at: flang/unittests/RuntimeGTest/CharacterTest.cpp:28
+ }
+ ASSERT_FALSE(std::memcmp(x, "abcDE ", limit)) << "x = '" << x << "'";
+ }
----------------
awarzynski wrote:
> IIUC, at this point x = `abcDE ` and this `memcpy` simply overwrites `x` with similar value?
>
> I think that [[ https://en.cppreference.com/w/cpp/string/byte/memcpy | std::memcpy ]] either succeeds or we get UB. So this `ASSERT_FALSE` does not really add much, does it?
`memcmp`, not `memcpy`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97403/new/
https://reviews.llvm.org/D97403
More information about the llvm-commits
mailing list