[PATCH] D58749: [index-while-building] IndexRecordHasher
Dmitri Gribenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 12 13:44:22 PDT 2019
gribozavr added a comment.
> I basically didn't really like the idea of testing against hard-coded hash values in unittests as I consider it to be an implementation detail.
Sorry, that's not what I was suggesting. There are better ways to test hashing. For example, write a piece of source code and check that the hash codes for two declarations that only differ in one aspect are same or different.
void f(int &&);
void f(int &);
and then assert that hashes for two decls are same or different depending on the desired specification.
> I was thinking about integration tests that would work around this by both writing index and reading index and writing assertions against that data.
How is hashing used in this process?
CHANGES SINCE LAST ACTION
More information about the cfe-commits