[clang] [clang][ASTImporter] skip TemplateTypeParmDecl in VisitTypeAliasTemplateDecl (PR #74919)

Balázs Kéri via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 13 02:44:35 PST 2023


balazske wrote:

`VisitTypeAliasTemplateDecl` looks wrong and some fix should be made, this PR is good for the fix. This import function is different from the others because `ConflictingDecls` is populated when an object with different type is found, but this is the correct way. I think that `TemplateTypeParmDecl` objects are found with the lookup. A good fix would be to change the loop in `VisitTypeAliasTemplateDecl` to check for structural equivalence too, if equivalent is found use `MapImported`, otherwise add to `ConflictingDecls`. But skip all found objects that are not `TypeAliasTemplateDecl`. This makes it similar to the others, even if not correct, the remaining problem can be fixed later (and looks less important).

https://github.com/llvm/llvm-project/pull/74919


More information about the cfe-commits mailing list