[PATCH] D156693: [clang][ASTImporter]Skip check depth of friend template parameter
Qizhi Hu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 21 10:33:38 PDT 2023
jcsxky added a comment.
In D156693#4603537 <https://reviews.llvm.org/D156693#4603537>, @balazske wrote:
> My concern was related to nested namespaces or nested classes with friend declarations that are equivalent and differ only in the nesting level. It may be possible to construct code where a declaration at an inner (nested) level is found to be equivalent with a similar looking class at an outer level. But I now do not have time to look for an example to test it, and I am not fully familiar with exact rules of friend declarations, so I accept this fix.
- The same declcontext will make the template class and friend template class in the same namespace.
- Namespace will not change the depth of template class parameter. So, the equvalence will not be changed whether ignore the depth or not.
- Declcontext of friend tempalte class is outer namespace (if exists), So, classes in this declcontext are equvalent with identical name.
According the the conclusion above, the nested namespace or nested class will not affect the equvalence of the two classes (as far as I concerned).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156693/new/
https://reviews.llvm.org/D156693
More information about the cfe-commits
mailing list