While investigating the work done in D41416 I found out that the hash values for pointer and reference types are the same.
Diff Detail
- Repository
- rC Clang
Event Timeline
Looks reasonable, can you add a testcase that shows the ODR checker now distinguishes pointers/references to distinct types?
lib/AST/ODRHash.cpp | ||
---|---|---|
581 | This looks redundant, the above Visit(const Type*) function seems to already do this. |
lib/AST/ODRHash.cpp | ||
---|---|---|
581 | Ok, then I am a little confused. If VisitType is supposed to be nop why we call it in all VisitXXX functions. |
lib/AST/ODRHash.cpp | ||
---|---|---|
581 | Each Type calls its parent Type, all the way up to Type. It's just a manual traversal of the Type hierarchy. Right now, there's nothing in VisitType, but there might be in the future. |
Ok, that's great! Sorry for the delay and thanks for landing a similar patch. Btw, we should probably find a more terse way to test the ODRHash, eg. with unittests.
This looks redundant, the above Visit(const Type*) function seems to already do this.