ChuanqiXu added a comment. > what I'm asking is why we need to differentiate between the two, ie in which > cases do we want these two to have a different hash?
I don't understand. It should a basic requirement for different AST entities to have different values. > The way I understand your statement is that two "identical" Decls, including > isSame returning true, can have a different hashes. I mean when we can't work on ODRHash properly, we can choose that as a workaround. An important node here is that ODRHash is used to check the AST Nodes are keeping the same across compilations. There is gap to use ODRHash to check the semantical equality. --- Also I find I missed an important point. The standard says https://eel.is/c++draft/basic.def.odr#14.4. So that the example is not valid even if they are in global module fragments since they don't have same token sequences. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153003/new/ https://reviews.llvm.org/D153003 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits