[PATCH] D156693: [clang][ASTImporter]Skip check friend template depth

Balázs Kéri via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 8 03:59:26 PDT 2023


balazske added a comment.

This fix can cause problems because the depth comparison is omitted all times. It would be better to omit depth check if the imported template is a friend, and has a `ClassTemplateSpecializationDecl` as context. Probably even then it is possible to construct cases where the checked template has references to other templates with different "depth" which should not omitted in the check. But I have no idea of a better solution, only to pass a `ClassTemplateDecl` or `ClassTemplateSpecializationDecl` to `StructuralEquivalenceContext` and omit the depth check only at this object.


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