[PATCH] D153003: [ODRHash] Fix ODR hashing of template names
Richard Smith - zygoloid via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 28 09:24:08 PDT 2023
rsmith added a comment.
I think the behavior change for the testcase here is correct, though I'm not sure that the patch is getting that behaviour change in the right way. Per [temp.type]/1.4 (http://eel.is/c++draft/temp.type#1.4),
> Two template-ids are the same if [...] their corresponding template template-arguments refer to the same template.
so `B<A>` and `B<NS::A>` are the same type. The stricter "same sequence of tokens" rule doesn't apply here, because using-declarations are not definitions.
But that also suggests that ODR hashing should not be visiting these template arguments in using-declarations at all, because the ODR does not apply to the types specified in a namespace-scope using-declaration. How to we even get into the ODR hasher here? I thought we only applied it to function and class definitions (to which the ODR does apply).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153003/new/
https://reviews.llvm.org/D153003
More information about the cfe-commits
mailing list