[PATCH] D151079: [llvm][ADT] Change isEqual for DenseMapInfo<std::variant<...>>
Elliot Goodrich via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 23 07:37:39 PDT 2023
IncludeGuardian added inline comments.
================
Comment at: llvm/unittests/ADT/DenseMapTest.cpp:739-740
DenseMapInfo<variant>::getHashValue(Keys[1]));
+ EXPECT_TRUE(DenseMapInfo<variant>::isEqual(Keys[0], Keys[0]));
+ EXPECT_FALSE(DenseMapInfo<variant>::isEqual(Keys[0], Keys[1]));
}
----------------
It is worth testing a type were `isEqual` and `operator==` disagree? The tombstone and empty keys in `StringRef` would be an example where they don't work with `operator==` https://github.com/llvm/llvm-project/blob/a68bbf42fa680c7159165be8915d73e012c50f96/llvm/include/llvm/ADT/StringRef.h#L911-L931
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151079/new/
https://reviews.llvm.org/D151079
More information about the llvm-commits
mailing list